mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
drm/imagination: Fix value of HWRT address in pvr_job_create tracepoint
The pvr_job_create tracepoint was using pvr_fw_object::fw_addr_offset
to display the firmware address of the render target structure attached
to a job, but that's an offset into the firmware heap, not the expected
full address, which is more useful in general e.g. for cross referencing
against firmware logs.
Use pvr_fw_object_get_fw_addr() to get the full firmware address.
Fixes: c1079aebb4 ("drm/imagination: Add support for trace points")
Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
Link: https://patch.msgid.link/20260720-fix-pvr-job-trace-hwrt-v1-1-b24551802efb@imgtec.com
Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
This commit is contained in:
parent
1ff399c4cd
commit
112badb724
|
|
@ -41,6 +41,17 @@ TRACE_EVENT(pvr_job_submit_ioctl,
|
|||
__entry->count)
|
||||
);
|
||||
|
||||
#define PVR_JOB_GET_HWRT_FW_ADDR(job) \
|
||||
({ \
|
||||
struct pvr_job *_job = (job); \
|
||||
u32 _hwrt_fw_addr = 0; \
|
||||
\
|
||||
if (_job && _job->hwrt) \
|
||||
pvr_fw_object_get_fw_addr(_job->hwrt->fw_obj, &_hwrt_fw_addr); \
|
||||
\
|
||||
_hwrt_fw_addr; \
|
||||
})
|
||||
|
||||
#define PVR_JOB_TYPE_TO_STR(val) \
|
||||
__print_symbolic(val, \
|
||||
{ DRM_PVR_JOB_TYPE_GEOMETRY, "geometry" }, \
|
||||
|
|
@ -64,9 +75,7 @@ TRACE_EVENT(pvr_job_create,
|
|||
__entry->ctx = job->ctx;
|
||||
__entry->fw_obj = job->ctx->fw_obj;
|
||||
pvr_fw_object_get_fw_addr(job->ctx->fw_obj, &__entry->fw_addr);
|
||||
__entry->hwrt_addr = job->hwrt ?
|
||||
job->hwrt->fw_obj->fw_addr_offset :
|
||||
0;
|
||||
__entry->hwrt_addr = PVR_JOB_GET_HWRT_FW_ADDR(job);
|
||||
__entry->job = job;
|
||||
__entry->job_type = job->type;
|
||||
__entry->sync_op_count = sync_op_count;),
|
||||
|
|
@ -82,6 +91,7 @@ TRACE_EVENT(pvr_job_create,
|
|||
);
|
||||
|
||||
#undef PVR_JOB_TYPE_TO_STR
|
||||
#undef PVR_JOB_GET_HWRT_FW_ADDR
|
||||
|
||||
TRACE_EVENT(pvr_job_submit_fw,
|
||||
TP_PROTO(struct pvr_job *job),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user