mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm: Get rid of drm_sched_job.id
Its only purpose was for trace events, but jobs can already be uniquely identified using their fence. The downside of using the fence is that it's only available after 'drm_sched_job_arm' was called which is true for all trace events that used job.id so they can safely switch to using it. Suggested-by: Tvrtko Ursulin <tursulin@igalia.com> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Arvind Yadav <arvind.yadav@amd.com> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://lore.kernel.org/r/20250526125505.2360-9-pierre-eric.pelloux-prayer@amd.com
This commit is contained in:
committed by
Philipp Stanner
parent
f6743e6a00
commit
4f7fa5fa41
@@ -167,7 +167,6 @@ TRACE_EVENT(amdgpu_cs_ioctl,
|
||||
TP_PROTO(struct amdgpu_job *job),
|
||||
TP_ARGS(job),
|
||||
TP_STRUCT__entry(
|
||||
__field(uint64_t, sched_job_id)
|
||||
__string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||
__field(unsigned int, context)
|
||||
__field(unsigned int, seqno)
|
||||
@@ -177,15 +176,14 @@ TRACE_EVENT(amdgpu_cs_ioctl,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->sched_job_id = job->base.id;
|
||||
__assign_str(timeline);
|
||||
__entry->context = job->base.s_fence->finished.context;
|
||||
__entry->seqno = job->base.s_fence->finished.seqno;
|
||||
__assign_str(ring);
|
||||
__entry->num_ibs = job->num_ibs;
|
||||
),
|
||||
TP_printk("sched_job=%llu, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
|
||||
__entry->sched_job_id, __get_str(timeline), __entry->context,
|
||||
TP_printk("timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
|
||||
__get_str(timeline), __entry->context,
|
||||
__entry->seqno, __get_str(ring), __entry->num_ibs)
|
||||
);
|
||||
|
||||
@@ -193,7 +191,6 @@ TRACE_EVENT(amdgpu_sched_run_job,
|
||||
TP_PROTO(struct amdgpu_job *job),
|
||||
TP_ARGS(job),
|
||||
TP_STRUCT__entry(
|
||||
__field(uint64_t, sched_job_id)
|
||||
__string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||
__field(unsigned int, context)
|
||||
__field(unsigned int, seqno)
|
||||
@@ -202,15 +199,14 @@ TRACE_EVENT(amdgpu_sched_run_job,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->sched_job_id = job->base.id;
|
||||
__assign_str(timeline);
|
||||
__entry->context = job->base.s_fence->finished.context;
|
||||
__entry->seqno = job->base.s_fence->finished.seqno;
|
||||
__assign_str(ring);
|
||||
__entry->num_ibs = job->num_ibs;
|
||||
),
|
||||
TP_printk("sched_job=%llu, timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
|
||||
__entry->sched_job_id, __get_str(timeline), __entry->context,
|
||||
TP_printk("timeline=%s, context=%u, seqno=%u, ring_name=%s, num_ibs=%u",
|
||||
__get_str(timeline), __entry->context,
|
||||
__entry->seqno, __get_str(ring), __entry->num_ibs)
|
||||
);
|
||||
|
||||
@@ -551,7 +547,6 @@ TRACE_EVENT(amdgpu_ib_pipe_sync,
|
||||
TP_ARGS(sched_job, fence),
|
||||
TP_STRUCT__entry(
|
||||
__string(ring, sched_job->base.sched->name)
|
||||
__field(uint64_t, id)
|
||||
__field(struct dma_fence *, fence)
|
||||
__field(uint64_t, ctx)
|
||||
__field(unsigned, seqno)
|
||||
@@ -559,13 +554,12 @@ TRACE_EVENT(amdgpu_ib_pipe_sync,
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(ring);
|
||||
__entry->id = sched_job->base.id;
|
||||
__entry->fence = fence;
|
||||
__entry->ctx = fence->context;
|
||||
__entry->seqno = fence->seqno;
|
||||
),
|
||||
TP_printk("job ring=%s, id=%llu, need pipe sync to fence=%p, context=%llu, seq=%u",
|
||||
__get_str(ring), __entry->id,
|
||||
TP_printk("job ring=%s need pipe sync to fence=%p, context=%llu, seq=%u",
|
||||
__get_str(ring),
|
||||
__entry->fence, __entry->ctx,
|
||||
__entry->seqno)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user