drivers/gpu/drm/xe/xe_guc_ct_types.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_guc_ct_types.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_guc_ct_types.h- Extension
.h- Size
- 5219 bytes
- Lines
- 174
- 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/interrupt.hlinux/iosys-map.hlinux/spinlock_types.hlinux/stackdepot.hlinux/wait.hlinux/xarray.habi/guc_communication_ctb_abi.h
Detected Declarations
struct xe_bostruct guc_ctb_infostruct guc_ctbstruct guc_ctb_snapshotstruct xe_guc_ct_snapshotstruct xe_dead_ctstruct xe_fast_req_fencestruct xe_guc_ctenum xe_guc_ct_state
Annotated Snippet
struct guc_ctb_info {
/** @size: size of CTB commands (DW) */
u32 size;
/** @resv_space: reserved space of CTB commands (DW) */
u32 resv_space;
/** @head: head of CTB commands (DW) */
u32 head;
/** @tail: tail of CTB commands (DW) */
u32 tail;
/** @space: space in CTB commands (DW) */
u32 space;
/** @broken: channel broken */
bool broken;
};
/**
* struct guc_ctb - GuC command transport buffer (CTB)
*/
struct guc_ctb {
/** @bo: Xe BO for CTB */
struct xe_bo *bo;
/** @desc: dma buffer map for CTB descriptor */
struct iosys_map desc;
/** @cmds: dma buffer map for CTB commands */
struct iosys_map cmds;
/** @info: CTB info */
struct guc_ctb_info info;
};
/**
* struct guc_ctb_snapshot - GuC command transport buffer (CTB) snapshot
*/
struct guc_ctb_snapshot {
/** @desc: snapshot of the CTB descriptor */
struct guc_ct_buffer_desc desc;
/** @info: snapshot of the CTB info */
struct guc_ctb_info info;
};
/**
* struct xe_guc_ct_snapshot - GuC command transport (CT) snapshot
*/
struct xe_guc_ct_snapshot {
/** @ct_enabled: CT enabled info at capture time. */
bool ct_enabled;
/** @g2h_outstanding: G2H outstanding info at the capture time */
u32 g2h_outstanding;
/** @g2h: G2H CTB snapshot */
struct guc_ctb_snapshot g2h;
/** @h2g: H2G CTB snapshot */
struct guc_ctb_snapshot h2g;
/** @ctb_size: size of the snapshot of the CTB */
size_t ctb_size;
/** @ctb: snapshot of the entire CTB */
void *ctb;
};
/**
* enum xe_guc_ct_state - CT state
* @XE_GUC_CT_STATE_NOT_INITIALIZED: CT not initialized, messages not expected in this state
* @XE_GUC_CT_STATE_DISABLED: CT disabled, messages not expected in this state
* @XE_GUC_CT_STATE_STOPPED: CT stopped, drop messages without errors
* @XE_GUC_CT_STATE_ENABLED: CT enabled, messages sent / received in this state
*/
enum xe_guc_ct_state {
XE_GUC_CT_STATE_NOT_INITIALIZED = 0,
XE_GUC_CT_STATE_DISABLED,
XE_GUC_CT_STATE_STOPPED,
XE_GUC_CT_STATE_ENABLED,
};
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
/** struct xe_dead_ct - Information for debugging a dead CT */
struct xe_dead_ct {
/** @lock: protects memory allocation/free operations, and @reason updates */
spinlock_t lock;
/** @reason: bit mask of CT_DEAD_* reason codes */
unsigned int reason;
/** @reported: for preventing multiple dumps per error sequence */
bool reported;
/** @worker: worker thread to get out of interrupt context before dumping */
struct work_struct worker;
/** @snapshot_ct: copy of CT state and CTB content at point of error */
struct xe_guc_ct_snapshot *snapshot_ct;
/** @snapshot_log: copy of GuC log at point of error */
struct xe_guc_log_snapshot *snapshot_log;
};
/** struct xe_fast_req_fence - Used to track FAST_REQ messages by fence to match error responses */
struct xe_fast_req_fence {
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/iosys-map.h`, `linux/spinlock_types.h`, `linux/stackdepot.h`, `linux/wait.h`, `linux/xarray.h`, `abi/guc_communication_ctb_abi.h`.
- Detected declarations: `struct xe_bo`, `struct guc_ctb_info`, `struct guc_ctb`, `struct guc_ctb_snapshot`, `struct xe_guc_ct_snapshot`, `struct xe_dead_ct`, `struct xe_fast_req_fence`, `struct xe_guc_ct`, `enum xe_guc_ct_state`.
- 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.