]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: stop trying to schedule() with a spin held
authorChristian König <christian.koenig@amd.com>
Mon, 13 Jun 2016 14:12:42 +0000 (16:12 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 18:51:31 +0000 (14:51 -0400)
Drop the lock before calling cancel_delayed_work_sync().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96445

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 74aa0b32f3e36b70841f3694d8f1e2935e4ddc24..b1d49c5d8e44f9f10a7b48fb8d5cc1fb7952e046 100644 (file)
@@ -339,7 +339,9 @@ static void amd_sched_job_finish(struct work_struct *work)
        if (sched->timeout != MAX_SCHEDULE_TIMEOUT) {
                struct amd_sched_job *next;
 
+               spin_unlock_irqrestore(&sched->job_list_lock, flags);
                cancel_delayed_work_sync(&s_job->work_tdr);
+               spin_lock_irqsave(&sched->job_list_lock, flags);
 
                /* queue TDR for next job */
                next = list_first_entry_or_null(&sched->ring_mirror_list,