diff options
| author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2025-05-26 12:54:47 +0000 |
|---|---|---|
| committer | Philipp Stanner <[email protected]> | 2025-05-28 14:16:10 +0000 |
| commit | 76d97c870f291e690037c3e82ab67d343702b14c (patch) | |
| tree | 05b99969999d0785c1e9d4d46ff7cffdc3111c2f /drivers/gpu/drm/scheduler/sched_entity.c | |
| parent | drm/sched: Cleanup gpu_scheduler trace events (diff) | |
| download | kernel-76d97c870f291e690037c3e82ab67d343702b14c.tar.gz kernel-76d97c870f291e690037c3e82ab67d343702b14c.zip | |
drm/sched: Trace dependencies for GPU jobs
We can't trace dependencies from drm_sched_job_add_dependency
because when it's called the job's fence is not available yet.
So instead each dependency is traced individually when
drm_sched_entity_push_job is used.
Tracing the dependencies allows tools to analyze the dependencies
between the jobs (previously it was only possible for fences
traced by drm_sched_job_wait_dep).
Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/scheduler/sched_entity.c')
| -rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index ff553d8dc5f4..8c1589f476ae 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -586,6 +586,14 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job) ktime_t submit_ts; trace_drm_sched_job(sched_job, entity); + + if (trace_drm_sched_job_add_dep_enabled()) { + struct dma_fence *entry; + unsigned long index; + + xa_for_each(&sched_job->dependencies, index, entry) + trace_drm_sched_job_add_dep(sched_job, entry); + } atomic_inc(entity->rq->sched->score); WRITE_ONCE(entity->last_user, current->group_leader); |
