mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
drm/amdgpu: add macro to retrieve timeline name v2
This helps de-duplicate a long expression and removes overly long lines. v2: Rename macro and undef it Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ced2ef66dc
commit
c98b5c9714
1 changed files with 8 additions and 4 deletions
|
@ -11,6 +11,9 @@
|
||||||
#define TRACE_SYSTEM amdgpu
|
#define TRACE_SYSTEM amdgpu
|
||||||
#define TRACE_INCLUDE_FILE amdgpu_trace
|
#define TRACE_INCLUDE_FILE amdgpu_trace
|
||||||
|
|
||||||
|
#define AMDGPU_JOB_GET_TIMELINE_NAME(job) \
|
||||||
|
job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished)
|
||||||
|
|
||||||
TRACE_EVENT(amdgpu_mm_rreg,
|
TRACE_EVENT(amdgpu_mm_rreg,
|
||||||
TP_PROTO(unsigned did, uint32_t reg, uint32_t value),
|
TP_PROTO(unsigned did, uint32_t reg, uint32_t value),
|
||||||
TP_ARGS(did, reg, value),
|
TP_ARGS(did, reg, value),
|
||||||
|
@ -102,7 +105,7 @@ TRACE_EVENT(amdgpu_cs_ioctl,
|
||||||
TP_ARGS(job),
|
TP_ARGS(job),
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(uint64_t, sched_job_id)
|
__field(uint64_t, sched_job_id)
|
||||||
__string(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished))
|
__string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||||
__field(unsigned int, context)
|
__field(unsigned int, context)
|
||||||
__field(unsigned int, seqno)
|
__field(unsigned int, seqno)
|
||||||
__field(struct dma_fence *, fence)
|
__field(struct dma_fence *, fence)
|
||||||
|
@ -112,7 +115,7 @@ TRACE_EVENT(amdgpu_cs_ioctl,
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
__entry->sched_job_id = job->base.id;
|
__entry->sched_job_id = job->base.id;
|
||||||
__assign_str(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished))
|
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||||
__entry->context = job->base.s_fence->finished.context;
|
__entry->context = job->base.s_fence->finished.context;
|
||||||
__entry->seqno = job->base.s_fence->finished.seqno;
|
__entry->seqno = job->base.s_fence->finished.seqno;
|
||||||
__entry->ring_name = job->ring->name;
|
__entry->ring_name = job->ring->name;
|
||||||
|
@ -128,7 +131,7 @@ TRACE_EVENT(amdgpu_sched_run_job,
|
||||||
TP_ARGS(job),
|
TP_ARGS(job),
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(uint64_t, sched_job_id)
|
__field(uint64_t, sched_job_id)
|
||||||
__string(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished))
|
__string(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||||
__field(unsigned int, context)
|
__field(unsigned int, context)
|
||||||
__field(unsigned int, seqno)
|
__field(unsigned int, seqno)
|
||||||
__field(char *, ring_name)
|
__field(char *, ring_name)
|
||||||
|
@ -137,7 +140,7 @@ TRACE_EVENT(amdgpu_sched_run_job,
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
__entry->sched_job_id = job->base.id;
|
__entry->sched_job_id = job->base.id;
|
||||||
__assign_str(timeline, job->base.s_fence->finished.ops->get_timeline_name(&job->base.s_fence->finished))
|
__assign_str(timeline, AMDGPU_JOB_GET_TIMELINE_NAME(job))
|
||||||
__entry->context = job->base.s_fence->finished.context;
|
__entry->context = job->base.s_fence->finished.context;
|
||||||
__entry->seqno = job->base.s_fence->finished.seqno;
|
__entry->seqno = job->base.s_fence->finished.seqno;
|
||||||
__entry->ring_name = job->ring->name;
|
__entry->ring_name = job->ring->name;
|
||||||
|
@ -365,6 +368,7 @@ TRACE_EVENT(amdgpu_ttm_bo_move,
|
||||||
__entry->new_placement, __entry->bo_size)
|
__entry->new_placement, __entry->bo_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#undef AMDGPU_JOB_GET_TIMELINE_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
|
|
Loading…
Reference in a new issue