drivers/gpu/drm/imagination/pvr_trace.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/imagination/pvr_trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/imagination/pvr_trace.h- Extension
.h- Size
- 3714 bytes
- Lines
- 114
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
pvr_context.hpvr_device.hpvr_fw.hpvr_hwrt.hpvr_job.hpvr_sync.hlinux/stringify.hlinux/types.hlinux/tracepoint.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM pvr
#if !defined(PVR_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define PVR_TRACE_H
#include "pvr_context.h"
#include "pvr_device.h"
#include "pvr_fw.h"
#include "pvr_hwrt.h"
#include "pvr_job.h"
#include "pvr_sync.h"
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/tracepoint.h>
/*
* NOTE:
* When adding trace points, or extra data to existing ones - you must capture
* all the data in the TP_fast_assign section that you wish to use in the
* TP_printk section. This is because the printk is performed on demand from the
* captured data when you `cat /sys/kernel/tracing/trace` and by the time this
* happens any pointers you captured will likely no longer point to valid data.
*/
/* Job submit */
TRACE_EVENT(pvr_job_submit_ioctl,
TP_PROTO(struct pvr_device *pvr_dev, u32 count),
TP_ARGS(pvr_dev, count),
TP_STRUCT__entry(__field(struct pvr_device *, pvr_dev)
__field(u32, count)),
TP_fast_assign(__entry->pvr_dev = pvr_dev;
__entry->count = count;),
TP_printk("pvr_dev=%p count=%u",
__entry->pvr_dev,
__entry->count)
);
#define PVR_JOB_TYPE_TO_STR(val) \
__print_symbolic(val, \
{ DRM_PVR_JOB_TYPE_GEOMETRY, "geometry" }, \
{ DRM_PVR_JOB_TYPE_FRAGMENT, "fragment" }, \
{ DRM_PVR_JOB_TYPE_COMPUTE, "compute" }, \
{ DRM_PVR_JOB_TYPE_TRANSFER_FRAG, "transfer" })
TRACE_EVENT(pvr_job_create,
TP_PROTO(struct pvr_device *pvr_dev, struct pvr_job *job,
u32 sync_op_count),
TP_ARGS(pvr_dev, job, sync_op_count),
TP_STRUCT__entry(__field(struct pvr_device *, pvr_dev)
__field(struct pvr_context *, ctx)
__field(struct pvr_fw_object *, fw_obj)
__field(u32, fw_addr)
__field(u32, hwrt_addr)
__field(struct pvr_job *, job)
__field(enum drm_pvr_job_type, job_type)
__field(u32, sync_op_count)),
TP_fast_assign(__entry->pvr_dev = pvr_dev;
__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->job = job;
__entry->job_type = job->type;
__entry->sync_op_count = sync_op_count;),
TP_printk("pvr_dev=%p ctx=%p fw_obj=%p fw_addr=0x%x hwrt_addr=0x%x job=%p job_type=%s sync_op_count=%u",
__entry->pvr_dev,
__entry->ctx,
__entry->fw_obj,
__entry->fw_addr,
__entry->hwrt_addr,
__entry->job,
PVR_JOB_TYPE_TO_STR(__entry->job_type),
__entry->sync_op_count)
);
#undef PVR_JOB_TYPE_TO_STR
TRACE_EVENT(pvr_job_submit_fw,
TP_PROTO(struct pvr_job *job),
TP_ARGS(job),
TP_STRUCT__entry(__field(struct pvr_job *, job)
__field(u32, done_seqno)),
TP_fast_assign(__entry->job = job;
__entry->done_seqno = job->done_fence->seqno;),
TP_printk("job=%p done_seqno=%u",
Annotation
- Immediate include surface: `pvr_context.h`, `pvr_device.h`, `pvr_fw.h`, `pvr_hwrt.h`, `pvr_job.h`, `pvr_sync.h`, `linux/stringify.h`, `linux/types.h`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.