[PATCH] drm/sched: Only start TDR in drm_sched_job_begin on first job
Matthew Brost
matthew.brost at intel.com
Wed Jul 24 23:44:17 UTC 2024
Only start in drm_sched_job_begin on first job being added to the
pending list as if pending list non-empty the TDR has already been
started. It is problematic to restart the TDR as it will extend TDR
period for an already running job, potentially leading to dma-fence
signaling for a very long period of with continous stream of jobs.
Cc: Christian König <christian.koenig at amd.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/scheduler/sched_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 7e90c9f95611..feeeb9dbeb86 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -540,7 +540,8 @@ static void drm_sched_job_begin(struct drm_sched_job *s_job)
spin_lock(&sched->job_list_lock);
list_add_tail(&s_job->list, &sched->pending_list);
- drm_sched_start_timeout(sched);
+ if (list_is_singular(&sched->pending_list))
+ drm_sched_start_timeout(sched);
spin_unlock(&sched->job_list_lock);
}
--
2.34.1
More information about the Intel-xe
mailing list