drivers/gpu/drm/xe/xe_exec_queue_types.h

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/xe_exec_queue_types.h
Extension
.h
Size
10773 bytes
Lines
326
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_exec_queue_group {
	/** @primary: Primary queue of this group */
	struct xe_exec_queue *primary;
	/** @cgp_bo: BO for the Context Group Page */
	struct xe_bo *cgp_bo;
	/** @xa: xarray to store LRCs */
	struct xarray xa;
	/** @list: List of all secondary queues in the group */
	struct list_head list;
	/** @list_lock: Secondary queue list lock */
	struct mutex list_lock;
	/** @sync_pending: CGP_SYNC_DONE g2h response pending */
	bool sync_pending;
	/** @banned: Group banned */
	bool banned;
	/** @stopped: Group is stopped, protected by list_lock */
	bool stopped;
};

/**
 * struct xe_exec_queue - Execution queue
 *
 * Contains all state necessary for submissions. Can either be a user object or
 * a kernel object.
 */
struct xe_exec_queue {
	/** @xef: Back pointer to xe file if this is user created exec queue */
	struct xe_file *xef;

	/** @gt: GT structure this exec queue can submit to */
	struct xe_gt *gt;
	/**
	 * @hwe: A hardware of the same class. May (physical engine) or may not
	 * (virtual engine) be where jobs actual engine up running. Should never
	 * really be used for submissions.
	 */
	struct xe_hw_engine *hwe;
	/** @refcount: ref count of this exec queue */
	struct kref refcount;
	/** @vm: VM (address space) for this exec queue */
	struct xe_vm *vm;
	/**
	 * @user_vm: User VM (address space) for this exec queue (bind queues
	 * only)
	 */
	struct xe_vm *user_vm;

	/** @class: class of this exec queue */
	enum xe_engine_class class;
	/**
	 * @logical_mask: logical mask of where job submitted to exec queue can run
	 */
	u32 logical_mask;
	/** @name: name of this exec queue */
	char name[MAX_FENCE_NAME_LEN];
	/** @width: width (number BB submitted per exec) of this exec queue */
	u16 width;
	/** @msix_vec: MSI-X vector (for platforms that support it) */
	u16 msix_vec;
	/** @fence_irq: fence IRQ used to signal job completion */
	struct xe_hw_fence_irq *fence_irq;

	/**
	 * @last_fence: last fence on exec queue, protected by vm->lock in write
	 * mode if bind exec queue, protected by dma resv lock if non-bind exec
	 * queue
	 */
	struct dma_fence *last_fence;

/* queue used for kernel submission only */
#define EXEC_QUEUE_FLAG_KERNEL			BIT(0)
/* kernel engine only destroyed at driver unload */
#define EXEC_QUEUE_FLAG_PERMANENT		BIT(1)
/* for VM jobs. Caller needs to hold rpm ref when creating queue with this flag */
#define EXEC_QUEUE_FLAG_VM			BIT(2)
/* child of VM queue for multi-tile VM jobs */
#define EXEC_QUEUE_FLAG_BIND_ENGINE_CHILD	BIT(3)
/* kernel exec_queue only, set priority to highest level */
#define EXEC_QUEUE_FLAG_HIGH_PRIORITY		BIT(4)
/* flag to indicate low latency hint to guc */
#define EXEC_QUEUE_FLAG_LOW_LATENCY		BIT(5)
/* for migration (kernel copy, clear, bind) jobs */
#define EXEC_QUEUE_FLAG_MIGRATE			BIT(6)
/* for programming COMMON_SLICE_CHICKEN3 on first submission */
#define EXEC_QUEUE_FLAG_DISABLE_STATE_CACHE_PERF_FIX	BIT(7)

	/**
	 * @flags: flags for this exec queue, should statically setup aside from ban
	 * bit
	 */

Annotation

Implementation Notes