drivers/gpu/drm/xe/xe_oa_types.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_oa_types.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_oa_types.h- Extension
.h- Size
- 6747 bytes
- Lines
- 272
- 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/bitops.hlinux/idr.hlinux/mutex.hlinux/types.huapi/drm/xe_drm.hregs/xe_reg_defs.hxe_hw_engine_types.h
Detected Declarations
struct drm_syncobjstruct xe_oa_formatstruct xe_oa_regsstruct xe_oa_unitstruct xe_oa_gtstruct xe_oastruct xe_oa_bufferstruct xe_oa_streamenum xe_oa_report_headerenum xe_oa_format_name
Annotated Snippet
struct xe_oa_format {
/** @counter_select: counter select value (see Bspec 52198/60942) */
u32 counter_select;
/** @size: record size as written by HW (multiple of 64 byte cachelines) */
int size;
/** @type: of enum drm_xe_oa_format_type */
int type;
/** @header: 32 or 64 bit report headers */
enum xe_oa_report_header header;
/** @counter_size: counter size value (see Bspec 60942) */
u16 counter_size;
/** @bc_report: BC report value (see Bspec 60942) */
u16 bc_report;
};
/** struct xe_oa_regs - Registers for each OA unit */
struct xe_oa_regs {
u32 base;
struct xe_reg oa_head_ptr;
struct xe_reg oa_tail_ptr;
struct xe_reg oa_buffer;
struct xe_reg oa_ctx_ctrl;
struct xe_reg oa_ctrl;
struct xe_reg oa_debug;
struct xe_reg oa_status;
struct xe_reg oa_mmio_trg;
u32 oa_ctrl_counter_select_mask;
};
/**
* struct xe_oa_unit - Hardware OA unit
*/
struct xe_oa_unit {
/** @oa_unit_id: identifier for the OA unit */
u16 oa_unit_id;
/** @gt: gt associated with the OA unit */
struct xe_gt *gt;
/** @type: Type of OA unit - OAM, OAG etc. */
enum drm_xe_oa_unit_type type;
/** @regs: OA registers for programming the OA unit */
struct xe_oa_regs regs;
/** @num_engines: number of engines attached to this OA unit */
u32 num_engines;
/** @exclusive_stream: The stream currently using the OA unit */
struct xe_oa_stream *exclusive_stream;
};
/**
* struct xe_oa_gt - OA per-gt information
*/
struct xe_oa_gt {
/** @gt_lock: lock protecting create/destroy OA streams */
struct mutex gt_lock;
/** @num_oa_units: number of oa units for each gt */
u32 num_oa_units;
/** @oa_unit: array of oa_units */
struct xe_oa_unit *oa_unit;
};
/**
* struct xe_oa - OA device level information
*/
struct xe_oa {
/** @xe: back pointer to xe device */
struct xe_device *xe;
/** @metrics_kobj: kobj for metrics sysfs */
struct kobject *metrics_kobj;
/** @metrics_lock: lock protecting add/remove configs */
struct mutex metrics_lock;
/** @metrics_idr: List of dynamic configurations (struct xe_oa_config) */
struct idr metrics_idr;
/** @oa_formats: tracks all OA formats across platforms */
const struct xe_oa_format *oa_formats;
/** @format_mask: tracks valid OA formats for a platform */
unsigned long format_mask[BITS_TO_LONGS(__XE_OA_FORMAT_MAX)];
/** @oa_unit_ids: tracks oa unit ids assigned across gt's */
u16 oa_unit_ids;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/idr.h`, `linux/mutex.h`, `linux/types.h`, `uapi/drm/xe_drm.h`, `regs/xe_reg_defs.h`, `xe_hw_engine_types.h`.
- Detected declarations: `struct drm_syncobj`, `struct xe_oa_format`, `struct xe_oa_regs`, `struct xe_oa_unit`, `struct xe_oa_gt`, `struct xe_oa`, `struct xe_oa_buffer`, `struct xe_oa_stream`, `enum xe_oa_report_header`, `enum xe_oa_format_name`.
- 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.