drivers/gpu/drm/i915/gt/uc/intel_guc.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gt/uc/intel_guc.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/i915/gt/uc/intel_guc.h
Extension
.h
Size
16839 bytes
Lines
555
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 intel_guc {
	/** @fw: the GuC firmware */
	struct intel_uc_fw fw;
	/** @log: sub-structure containing GuC log related data and objects */
	struct intel_guc_log log;
	/** @ct: the command transport communication channel */
	struct intel_guc_ct ct;
	/** @slpc: sub-structure containing SLPC related data and objects */
	struct intel_guc_slpc slpc;
	/** @capture: the error-state-capture module's data and objects */
	struct intel_guc_state_capture *capture;

	/** @dbgfs_node: debugfs node */
	struct dentry *dbgfs_node;

	/** @sched_engine: Global engine used to submit requests to GuC */
	struct i915_sched_engine *sched_engine;
	/**
	 * @stalled_request: if GuC can't process a request for any reason, we
	 * save it until GuC restarts processing. No other request can be
	 * submitted until the stalled request is processed.
	 */
	struct i915_request *stalled_request;
	/**
	 * @submission_stall_reason: reason why submission is stalled
	 */
	enum {
		STALL_NONE,
		STALL_REGISTER_CONTEXT,
		STALL_MOVE_LRC_TAIL,
		STALL_ADD_REQUEST,
	} submission_stall_reason;

	/* intel_guc_recv interrupt related state */
	/** @irq_lock: protects GuC irq state */
	spinlock_t irq_lock;
	/**
	 * @msg_enabled_mask: mask of events that are processed when receiving
	 * an INTEL_GUC_ACTION_DEFAULT G2H message.
	 */
	unsigned int msg_enabled_mask;

	/**
	 * @outstanding_submission_g2h: number of outstanding GuC to Host
	 * responses related to GuC submission, used to determine if the GT is
	 * idle
	 */
	atomic_t outstanding_submission_g2h;

	/** @tlb_lookup: xarray to store all pending TLB invalidation requests */
	struct xarray tlb_lookup;

	/**
	 * @serial_slot: id to the initial waiter created in tlb_lookup,
	 * which is used only when failed to allocate new waiter.
	 */
	u32 serial_slot;

	/** @next_seqno: the next id (sequence number) to allocate. */
	u32 next_seqno;

	/** @interrupts: pointers to GuC interrupt-managing functions. */
	struct {
		bool enabled;
		void (*reset)(struct intel_guc *guc);
		void (*enable)(struct intel_guc *guc);
		void (*disable)(struct intel_guc *guc);
	} interrupts;

	/**
	 * @submission_state: sub-structure for submission state protected by
	 * single lock
	 */
	struct {
		/**
		 * @submission_state.lock: protects everything in
		 * submission_state, ce->guc_id.id, and ce->guc_id.ref
		 * when transitioning in and out of zero
		 */
		spinlock_t lock;
		/**
		 * @submission_state.guc_ids: used to allocate new
		 * guc_ids, single-lrc
		 */
		struct ida guc_ids;
		/**
		 * @submission_state.num_guc_ids: Number of guc_ids, selftest
		 * feature to be able to reduce this number while testing.
		 */
		int num_guc_ids;

Annotation

Implementation Notes