From d36541487327ad1d9b412aaec2b7fbc1ac2f2219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Mon, 13 Jun 2016 09:39:32 +0200 Subject: [PATCH] drm/amdgpu: stop trying to schedule() with a spin held MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the lock before calling cancel_delayed_work_sync(). Signed-off-by: Christian König --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 74aa0b3..b1d49c5 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -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, -- 2.5.0