drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/xe_gt_sriov_vf_types.h
Extension
.h
Size
2853 bytes
Lines
99
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_gt_sriov_vf_selfconfig {
	/** @num_ctxs: assigned number of GuC submission context IDs. */
	u16 num_ctxs;
	/** @num_dbs: assigned number of GuC doorbells IDs. */
	u16 num_dbs;
};

/**
 * struct xe_gt_sriov_vf_runtime - VF runtime data.
 */
struct xe_gt_sriov_vf_runtime {
	/** @gmdid: cached value of the GDMID register. */
	u32 gmdid;
	/** @uses_sched_groups: whether PF enabled sched groups or not. */
	bool uses_sched_groups;
	/** @regs_size: size of runtime register array. */
	u32 regs_size;
	/** @num_regs: number of runtime registers in the array. */
	u32 num_regs;
	/** @regs: pointer to array of register offset/value pairs. */
	struct vf_runtime_reg {
		/** @regs.offset: register offset. */
		u32 offset;
		/** @regs.value: register value. */
		u32 value;
	} *regs;
};

/**
 * struct xe_gt_sriov_vf_migration - VF migration data.
 */
struct xe_gt_sriov_vf_migration {
	/** @worker: VF migration recovery worker */
	struct work_struct worker;
	/** @lock: Protects recovery_queued, teardown */
	spinlock_t lock;
	/** @wq: wait queue for migration fixes */
	wait_queue_head_t wq;
	/** @scratch: Scratch memory for VF recovery */
	void *scratch;
	/** @fixups_complete_count: Counts completed fixups stages */
	atomic_t fixups_complete_count;
	/** @debug: Debug hooks for delaying migration */
	struct {
		/**
		 * @debug.resfix_stoppers: Stop and wait at different stages
		 * during post migration recovery
		 */
		u8 resfix_stoppers;
	} debug;
	/**
	 * @resfix_marker: Marker sent on start and on end of post-migration
	 * steps.
	 */
	u8 resfix_marker;
	/** @recovery_teardown: VF post migration recovery is being torn down */
	bool recovery_teardown;
	/** @recovery_queued: VF post migration recovery in queued */
	bool recovery_queued;
	/** @recovery_inprogress: VF post migration recovery in progress */
	bool recovery_inprogress;
	/** @ggtt_need_fixes: VF GGTT and references to it need fixes */
	bool ggtt_need_fixes;
};

/**
 * struct xe_gt_sriov_vf - GT level VF virtualization data.
 */
struct xe_gt_sriov_vf {
	/** @wanted_guc_version: minimum wanted GuC ABI version. */
	struct xe_uc_fw_version wanted_guc_version;
	/** @guc_version: negotiated GuC ABI version. */
	struct xe_uc_fw_version guc_version;
	/** @self_config: resource configurations. */
	struct xe_gt_sriov_vf_selfconfig self_config;
	/** @runtime: runtime data retrieved from the PF. */
	struct xe_gt_sriov_vf_runtime runtime;
	/** @migration: migration data for the VF. */
	struct xe_gt_sriov_vf_migration migration;
};

#endif

Annotation

Implementation Notes