drivers/gpu/drm/i915/i915_perf_types.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_perf_types.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_perf_types.h- Extension
.h- Size
- 12681 bytes
- Lines
- 512
- 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
linux/atomic.hlinux/device.hlinux/hrtimer.hlinux/llist.hlinux/poll.hlinux/sysfs.hlinux/types.hlinux/uuid.hlinux/wait.huapi/drm/i915_drm.hgt/intel_engine_types.hgt/intel_sseu.hi915_reg_defs.hintel_uncore.hintel_wakeref.h
Detected Declarations
struct drm_i915_privatestruct filestruct i915_activestruct i915_gem_contextstruct i915_perfstruct i915_vmastruct intel_contextstruct intel_engine_csstruct i915_perf_regsstruct i915_oa_formatstruct i915_oa_regstruct i915_oa_configstruct i915_perf_streamstruct i915_perf_stream_opsstruct i915_perf_streamstruct i915_oa_opsstruct i915_perf_groupstruct i915_perf_gtstruct i915_perfenum report_headerenum oa_type
Annotated Snippet
struct i915_perf_regs {
u32 base;
i915_reg_t oa_head_ptr;
i915_reg_t oa_tail_ptr;
i915_reg_t oa_buffer;
i915_reg_t oa_ctx_ctrl;
i915_reg_t oa_ctrl;
i915_reg_t oa_debug;
i915_reg_t oa_status;
u32 oa_ctrl_counter_format_shift;
};
enum oa_type {
TYPE_OAG,
TYPE_OAM,
};
struct i915_oa_format {
u32 format;
int size;
int type;
enum report_header header;
};
struct i915_oa_reg {
i915_reg_t addr;
u32 value;
};
struct i915_oa_config {
struct i915_perf *perf;
char uuid[UUID_STRING_LEN + 1];
int id;
const struct i915_oa_reg *mux_regs;
u32 mux_regs_len;
const struct i915_oa_reg *b_counter_regs;
u32 b_counter_regs_len;
const struct i915_oa_reg *flex_regs;
u32 flex_regs_len;
struct attribute_group sysfs_metric;
struct attribute *attrs[2];
struct kobj_attribute sysfs_metric_id;
struct kref ref;
struct rcu_head rcu;
};
struct i915_perf_stream;
/**
* struct i915_perf_stream_ops - the OPs to support a specific stream type
*/
struct i915_perf_stream_ops {
/**
* @enable: Enables the collection of HW samples, either in response to
* `I915_PERF_IOCTL_ENABLE` or implicitly called when stream is opened
* without `I915_PERF_FLAG_DISABLED`.
*/
void (*enable)(struct i915_perf_stream *stream);
/**
* @disable: Disables the collection of HW samples, either in response
* to `I915_PERF_IOCTL_DISABLE` or implicitly called before destroying
* the stream.
*/
void (*disable)(struct i915_perf_stream *stream);
/**
* @poll_wait: Call poll_wait, passing a wait queue that will be woken
* once there is something ready to read() for the stream
*/
void (*poll_wait)(struct i915_perf_stream *stream,
struct file *file,
poll_table *wait);
/**
* @wait_unlocked: For handling a blocking read, wait until there is
* something to ready to read() for the stream. E.g. wait on the same
* wait queue that would be passed to poll_wait().
*/
int (*wait_unlocked)(struct i915_perf_stream *stream);
/**
* @read: Copy buffered metrics as records to userspace
* **buf**: the userspace, destination buffer
* **count**: the number of bytes to copy, requested by userspace
* **offset**: zero at the start of the read, updated as the read
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/device.h`, `linux/hrtimer.h`, `linux/llist.h`, `linux/poll.h`, `linux/sysfs.h`, `linux/types.h`, `linux/uuid.h`.
- Detected declarations: `struct drm_i915_private`, `struct file`, `struct i915_active`, `struct i915_gem_context`, `struct i915_perf`, `struct i915_vma`, `struct intel_context`, `struct intel_engine_cs`, `struct i915_perf_regs`, `struct i915_oa_format`.
- 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.