drm/etnaviv: remove lastctx member from gpu struct
authorLucas Stach <l.stach@pengutronix.de>
Thu, 22 Nov 2018 14:29:27 +0000 (15:29 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 18 Dec 2018 10:55:16 +0000 (11:55 +0100)
It only written and we don't infer any useful information from
it anymore. Remove it.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
drivers/gpu/drm/etnaviv/etnaviv_buffer.c
drivers/gpu/drm/etnaviv/etnaviv_drv.c
drivers/gpu/drm/etnaviv/etnaviv_gpu.c
drivers/gpu/drm/etnaviv/etnaviv_gpu.h

index 7fea74861a87fdff9a30c3a313a06360093aba80..160ce3c060a5666b40c542372436f1ebb0ff4b5e 100644 (file)
@@ -439,6 +439,4 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
 
        if (drm_debug & DRM_UT_DRIVER)
                etnaviv_buffer_dump(gpu, buffer, 0, 0x50);
-
-       gpu->lastctx = cmdbuf->ctx;
 }
index 1bb1d09e5fb042ad9c8e3c6c5370c6975d292d33..96efc84396bf73e7abe6dfe3cac90384099f9db2 100644 (file)
@@ -72,14 +72,8 @@ static void etnaviv_postclose(struct drm_device *dev, struct drm_file *file)
        for (i = 0; i < ETNA_MAX_PIPES; i++) {
                struct etnaviv_gpu *gpu = priv->gpu[i];
 
-               if (gpu) {
-                       mutex_lock(&gpu->lock);
-                       if (gpu->lastctx == ctx)
-                               gpu->lastctx = NULL;
-                       mutex_unlock(&gpu->lock);
-
+               if (gpu)
                        drm_sched_entity_destroy(&ctx->sched_entity[i]);
-               }
        }
 
        kfree(ctx);
index aefb17e39ad04eb1b855a9f9d90ea3056aa94915..6904535475de1828efc6a273612e4da7ad3284b6 100644 (file)
@@ -997,7 +997,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gpu *gpu)
        spin_unlock(&gpu->event_spinlock);
 
        etnaviv_gpu_hw_init(gpu);
-       gpu->lastctx = NULL;
        gpu->exec_state = -1;
 
        mutex_unlock(&gpu->lock);
@@ -1546,7 +1545,6 @@ static int etnaviv_gpu_hw_resume(struct etnaviv_gpu *gpu)
        etnaviv_gpu_update_clock(gpu);
        etnaviv_gpu_hw_init(gpu);
 
-       gpu->lastctx = NULL;
        gpu->exec_state = -1;
 
        mutex_unlock(&gpu->lock);
index 56b6a8ee7ec0f521e9fde6b4eaaa1bf7c1cc0b21..9bcf151f706bb7d1da8d518a92d2b446134fbad9 100644 (file)
@@ -97,7 +97,6 @@ struct etnaviv_gpu {
        struct mutex lock;
        struct etnaviv_chip_identity identity;
        enum etnaviv_sec_mode sec_mode;
-       struct etnaviv_file_private *lastctx;
        struct workqueue_struct *wq;
        struct drm_gpu_scheduler sched;