drivers/gpu/drm/xe/xe_guc_engine_activity_types.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_guc_engine_activity_types.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_guc_engine_activity_types.h- Extension
.h- Size
- 2669 bytes
- Lines
- 103
- 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/types.hxe_guc_fwif.h
Detected Declarations
struct engine_activitystruct engine_activity_groupstruct engine_activity_bufferstruct xe_guc_engine_activity
Annotated Snippet
struct engine_activity {
/** @active: current activity */
u64 active;
/** @last_cpu_ts: cpu timestamp in nsec of previous sample */
u64 last_cpu_ts;
/** @quanta: total quanta used on HW */
u64 quanta;
/** @quanta_ns: total quanta_ns used on HW */
u64 quanta_ns;
/**
* @quanta_remainder_ns: remainder when the CPU time is scaled as
* per the quanta_ratio. This remainder is used in subsequent
* quanta calculations.
*/
u64 quanta_remainder_ns;
/** @total: total engine activity */
u64 total;
/** @running: true if engine is running some work */
bool running;
/** @metadata: snapshot of engine activity metadata */
struct guc_engine_activity_metadata metadata;
/** @activity: snapshot of engine activity counter */
struct guc_engine_activity activity;
};
/**
* struct engine_activity_group - Activity data for all engines
*/
struct engine_activity_group {
/** @engine: engine specific activity data */
struct engine_activity engine[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS];
};
/**
* struct engine_activity_buffer - engine activity buffers
*
* This contains the buffers allocated for metadata and activity data
*/
struct engine_activity_buffer {
/** @activity_bo: object allocated to hold activity data */
struct xe_bo *activity_bo;
/** @metadata_bo: object allocated to hold activity metadata */
struct xe_bo *metadata_bo;
};
/**
* struct xe_guc_engine_activity - Data used by engine activity implementation
*/
struct xe_guc_engine_activity {
/** @gpm_timestamp_shift: Right shift value for the gpm timestamp */
u32 gpm_timestamp_shift;
/** @num_activity_group: number of activity groups */
u32 num_activity_group;
/** @num_functions: number of functions */
u32 num_functions;
/** @supported: indicates support for engine activity stats */
bool supported;
/**
* @eag: holds the device level engine activity data in native mode.
* In SRIOV mode, points to an array with entries which holds the engine
* activity data for PF and VF's
*/
struct engine_activity_group *eag;
/** @device_buffer: buffer object for global engine activity */
struct engine_activity_buffer device_buffer;
/** @function_buffer: buffer object for per-function engine activity */
struct engine_activity_buffer function_buffer;
};
#endif
Annotation
- Immediate include surface: `linux/types.h`, `xe_guc_fwif.h`.
- Detected declarations: `struct engine_activity`, `struct engine_activity_group`, `struct engine_activity_buffer`, `struct xe_guc_engine_activity`.
- 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.