提交 2fcef6ec 编写于 作者: J Junwei Zhang 提交者: Alex Deucher

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: NJunwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
上级 2440ff2c
...@@ -352,14 +352,14 @@ static void amd_sched_fence_work_func(struct work_struct *work) ...@@ -352,14 +352,14 @@ static void amd_sched_fence_work_func(struct work_struct *work)
DRM_ERROR("[%s] scheduler is timeout!\n", sched->name); DRM_ERROR("[%s] scheduler is timeout!\n", sched->name);
/* Clean all pending fences */ /* Clean all pending fences */
spin_lock_irqsave(&sched->fence_list_lock, flags);
list_for_each_entry_safe(entity, tmp, &sched->fence_list, list) { list_for_each_entry_safe(entity, tmp, &sched->fence_list, list) {
DRM_ERROR(" fence no %d\n", entity->base.seqno); DRM_ERROR(" fence no %d\n", entity->base.seqno);
cancel_delayed_work_sync(&entity->dwork); cancel_delayed_work(&entity->dwork);
spin_lock_irqsave(&sched->fence_list_lock, flags);
list_del_init(&entity->list); list_del_init(&entity->list);
spin_unlock_irqrestore(&sched->fence_list_lock, flags);
fence_put(&entity->base); fence_put(&entity->base);
} }
spin_unlock_irqrestore(&sched->fence_list_lock, flags);
} }
static int amd_sched_main(void *param) static int amd_sched_main(void *param)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册