diff options
author | Junwei Zhang <Jerry.Zhang@amd.com> | 2015-10-13 11:14:23 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-14 16:20:32 -0400 |
commit | 2fcef6ec87a044221fc3c2f16873f7c02b9ae991 (patch) | |
tree | fac287c80563619e101bfe3610380a1e262c9305 /drivers/gpu/drm/amd/scheduler | |
parent | 2440ff2c9151120c8ae27de6565b11831ee07e08 (diff) | |
download | op-kernel-dev-2fcef6ec87a044221fc3c2f16873f7c02b9ae991.zip op-kernel-dev-2fcef6ec87a044221fc3c2f16873f7c02b9ae991.tar.gz |
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/amd/scheduler')
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 |
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 a413dee..7fa1d7a 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) DRM_ERROR("[%s] scheduler is timeout!\n", sched->name); /* Clean all pending fences */ + spin_lock_irqsave(&sched->fence_list_lock, flags); list_for_each_entry_safe(entity, tmp, &sched->fence_list, list) { DRM_ERROR(" fence no %d\n", entity->base.seqno); - cancel_delayed_work_sync(&entity->dwork); - spin_lock_irqsave(&sched->fence_list_lock, flags); + cancel_delayed_work(&entity->dwork); list_del_init(&entity->list); - spin_unlock_irqrestore(&sched->fence_list_lock, flags); fence_put(&entity->base); } + spin_unlock_irqrestore(&sched->fence_list_lock, flags); } static int amd_sched_main(void *param) |