summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/scheduler
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-06-13 17:12:42 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 21:51:31 +0300
commita8bd3e1c71c342782b6597ac6bf4680d1f13254d (patch)
tree3f9b43a85a4d4c2a4ca72d7c983b84aa9ff3fba1 /drivers/gpu/drm/amd/scheduler
parente70a15f5563d87f0235360db2598396ec0cf0001 (diff)
downloadlinux-a8bd3e1c71c342782b6597ac6bf4680d1f13254d.tar.xz
drm/amdgpu: stop trying to schedule() with a spin held
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>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 74aa0b32f3e3..b1d49c5d8e44 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,