Skip to content

Commit e4dc45b

Browse files
ArvindYadavAMDChristianKoenigAMD
authored andcommitted
drm/sched: Use parent fence instead of finished
Using the parent fence instead of the finished fence to get the job status. This change is to avoid GPU scheduler timeout error which can cause GPU reset. Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220914164321.2156-6-Arvind.Yadav@amd.com Signed-off-by: Christian König <christian.koenig@amd.com>
1 parent b96fb1e commit e4dc45b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/scheduler/sched_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
829829
job = list_first_entry_or_null(&sched->pending_list,
830830
struct drm_sched_job, list);
831831

832-
if (job && dma_fence_is_signaled(&job->s_fence->finished)) {
832+
if (job && dma_fence_is_signaled(job->s_fence->parent)) {
833833
/* remove job from pending_list */
834834
list_del_init(&job->list);
835835

@@ -841,7 +841,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
841841

842842
if (next) {
843843
next->s_fence->scheduled.timestamp =
844-
job->s_fence->finished.timestamp;
844+
job->s_fence->parent->timestamp;
845845
/* start TO timer for next job */
846846
drm_sched_start_timeout(sched);
847847
}

0 commit comments

Comments
 (0)