aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJunwei Zhang <Jerry.Zhang@amd.com>2015-10-12 23:14:23 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-10-14 16:20:32 -0400
commit2fcef6ec87a044221fc3c2f16873f7c02b9ae991 (patch)
treefac287c80563619e101bfe3610380a1e262c9305 /drivers/gpu/drm
parent2440ff2c9151120c8ae27de6565b11831ee07e08 (diff)
drm/amdgpu: fix lockup when clean pending fences
The first lockup fence will lock the fence list of scheduler. Then cancel the delayed workqueues for all clean pending fences without waiting the workqueues to finish. Change-Id: I9bec826de1aa49d587b0662f3fb4a95333979429 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index a413dee7cd19..7fa1d7a438e9 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -352,14 +352,14 @@ static void amd_sched_fence_work_func(struct work_struct *work)
352 DRM_ERROR("[%s] scheduler is timeout!\n", sched->name); 352 DRM_ERROR("[%s] scheduler is timeout!\n", sched->name);
353 353
354 /* Clean all pending fences */ 354 /* Clean all pending fences */
355 spin_lock_irqsave(&sched->fence_list_lock, flags);
355 list_for_each_entry_safe(entity, tmp, &sched->fence_list, list) { 356 list_for_each_entry_safe(entity, tmp, &sched->fence_list, list) {
356 DRM_ERROR(" fence no %d\n", entity->base.seqno); 357 DRM_ERROR(" fence no %d\n", entity->base.seqno);
357 cancel_delayed_work_sync(&entity->dwork); 358 cancel_delayed_work(&entity->dwork);
358 spin_lock_irqsave(&sched->fence_list_lock, flags);
359 list_del_init(&entity->list); 359 list_del_init(&entity->list);
360 spin_unlock_irqrestore(&sched->fence_list_lock, flags);
361 fence_put(&entity->base); 360 fence_put(&entity->base);
362 } 361 }
362 spin_unlock_irqrestore(&sched->fence_list_lock, flags);
363} 363}
364 364
365static int amd_sched_main(void *param) 365static int amd_sched_main(void *param)