From: ZhenGuo Yin zhenguo.yin@amd.com
mainline inclusion from mainline-v6.5-rc1 commit 4f9b94d848696166011bead3109541ec2a523bb8 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB3ULB
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
[Why] drm_sched_entity_add_dependency_cb ignores the scheduled fence and return false. If entity's dependency is a scheduler error fence and drm_sched_stop is called due to TDR, drm_sched_entity_pop_job will wait for the dependency infinitely.
[How] Do not wait or ignore the scheduled error fence, add drm_sched_entity_wakeup callback for the dependency with scheduled error fence.
Signed-off-by: ZhenGuo Yin zhenguo.yin@amd.com Acked-by: Alex Deucher alexander.deucher@amd.com Reviewed-by: Christian König christian.koenig@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com
Conflicts: context conflicts in below file: drivers/gpu/drm/scheduler/sched_entity.c
Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/gpu/drm/scheduler/sched_entity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index be0d5bfb5df1..3d5c94496aa3 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -368,7 +368,7 @@ static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity) }
s_fence = to_drm_sched_fence(fence); - if (s_fence && s_fence->sched == sched) { + if (!fence->error && s_fence && s_fence->sched == sched) {
/* * Fence is from the same scheduler, only need to wait for