drivers/gpu/drm/xe/xe_hw_engine_types.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_hw_engine_types.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/xe_hw_engine_types.h
Extension
.h
Size
5766 bytes
Lines
188
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct xe_hw_engine_class_intf {
	/**
	 * @sched_props: scheduling properties
	 * @defaults: default scheduling properties
	 */
	struct {
		/** @sched_props.job_timeout_ms: Set job timeout in ms for engine */
		u32 job_timeout_ms;
		/** @sched_props.job_timeout_min: Min job timeout in ms for engine */
		u32 job_timeout_min;
		/** @sched_props.job_timeout_max: Max job timeout in ms for engine */
		u32 job_timeout_max;
		/** @sched_props.timeslice_us: timeslice period in micro-seconds */
		u32 timeslice_us;
		/** @sched_props.timeslice_min: min timeslice period in micro-seconds */
		u32 timeslice_min;
		/** @sched_props.timeslice_max: max timeslice period in micro-seconds */
		u32 timeslice_max;
		/** @sched_props.preempt_timeout_us: preemption timeout in micro-seconds */
		u32 preempt_timeout_us;
		/** @sched_props.preempt_timeout_min: min preemption timeout in micro-seconds */
		u32 preempt_timeout_min;
		/** @sched_props.preempt_timeout_max: max preemption timeout in micro-seconds */
		u32 preempt_timeout_max;
	} sched_props, defaults;
};

/**
 * struct xe_hw_engine - Hardware engine
 *
 * Contains all the hardware engine state for physical instances.
 */
struct xe_hw_engine {
	/** @gt: GT structure this hw engine belongs to */
	struct xe_gt *gt;
	/** @name: name of this hw engine */
	const char *name;
	/** @class: class of this hw engine */
	enum xe_engine_class class;
	/** @instance: physical instance of this hw engine */
	u16 instance;
	/** @logical_instance: logical instance of this hw engine */
	u16 logical_instance;
	/** @irq_offset: IRQ offset of this hw engine */
	u16 irq_offset;
	/** @irq_page: MEMIRQ page used by this HW engine */
	u16 irq_page;
	/** @mmio_base: MMIO base address of this hw engine*/
	u32 mmio_base;
	/**
	 * @reg_sr: table with registers to be restored on GT init/resume/reset
	 */
	struct xe_reg_sr reg_sr;
	/**
	 * @reg_whitelist: table with registers to be whitelisted
	 */
	struct xe_reg_sr reg_whitelist;
	/**
	 * @reg_lrc: LRC workaround registers
	 */
	struct xe_reg_sr reg_lrc;
	/** @domain: force wake domain of this hw engine */
	enum xe_force_wake_domains domain;
	/** @hwsp: hardware status page buffer object */
	struct xe_bo *hwsp;
	/** @exl_port: execlists port */
	struct xe_execlist_port *exl_port;
	/** @fence_irq: fence IRQ to run when a hw engine IRQ is received */
	struct xe_hw_fence_irq *fence_irq;
	/** @irq_handler: IRQ handler to run when hw engine IRQ is received */
	void (*irq_handler)(struct xe_hw_engine *hwe, u16 intr_vec);
	/** @engine_id: id  for this hw engine */
	enum xe_hw_engine_id engine_id;
	/** @eclass: pointer to per hw engine class interface */
	struct xe_hw_engine_class_intf *eclass;
	/** @oa_unit: oa unit for this hw engine */
	struct xe_oa_unit *oa_unit;
	/** @hw_engine_group: the group of hw engines this one belongs to */
	struct xe_hw_engine_group *hw_engine_group;
};

enum xe_hw_engine_snapshot_source_id {
	XE_ENGINE_CAPTURE_SOURCE_MANUAL,
	XE_ENGINE_CAPTURE_SOURCE_GUC
};

/**
 * struct xe_hw_engine_snapshot - Hardware engine snapshot
 *
 * Contains the snapshot of useful hardware engine info and registers.

Annotation

Implementation Notes