drm/sched: make sure timer is restarted
authorChristian König <christian.koenig@amd.com>
Fri, 12 Oct 2018 14:32:40 +0000 (16:32 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Nov 2018 19:21:01 +0000 (14:21 -0500)
Make sure we always restart the timer after a timeout and remove the
device specific workarounds.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/etnaviv/etnaviv_sched.c
drivers/gpu/drm/scheduler/sched_main.c
drivers/gpu/drm/v3d/v3d_sched.c

index e7c3ed6c9a2e10ddcd7665e851a1bffb9ff0247f..f8c5f1e6c5e29faa073b03a3b6d4663853e5d896 100644 (file)
@@ -105,8 +105,6 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job)
        change = dma_addr - gpu->hangcheck_dma_addr;
        if (change < 0 || change > 16) {
                gpu->hangcheck_dma_addr = dma_addr;
-               schedule_delayed_work(&sched_job->sched->work_tdr,
-                                     sched_job->sched->timeout);
                return;
        }
 
index 44fe587aaef97d30d4bb744fef25c851eacdcf82..73449c653b6e60eb477dc41424963bde88c6b0c0 100644 (file)
@@ -283,6 +283,7 @@ static void drm_sched_job_timedout(struct work_struct *work)
 already_signaled:
                ;
        }
+       drm_sched_start_timeout(sched);
        spin_unlock(&sched->job_list_lock);
 }
 
index 9243dea6e6ad106169c81dd384d5d4bc36c6d3ea..80b641ffc3be78a1dcd597b4ba32af64ce67adde 100644 (file)
@@ -167,9 +167,6 @@ v3d_job_timedout(struct drm_sched_job *sched_job)
        if (job->timedout_ctca != ctca || job->timedout_ctra != ctra) {
                job->timedout_ctca = ctca;
                job->timedout_ctra = ctra;
-
-               schedule_delayed_work(&job->base.sched->work_tdr,
-                                     job->base.sched->timeout);
                return;
        }