drivers/gpu/drm/xe/xe_hw_engine.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_hw_engine.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_hw_engine.c- Extension
.c- Size
- 31033 bytes
- Lines
- 1114
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
xe_hw_engine.hlinux/nospec.hdrm/drm_managed.hdrm/drm_print.huapi/drm/xe_drm.hgenerated/xe_wa_oob.hregs/xe_engine_regs.hregs/xe_gt_regs.hregs/xe_irq_regs.hxe_assert.hxe_bo.hxe_configfs.hxe_device.hxe_execlist.hxe_force_wake.hxe_gsc.hxe_gt.hxe_gt_ccs_mode.hxe_gt_clock.hxe_gt_printk.hxe_gt_mcr.hxe_gt_topology.hxe_guc_capture.hxe_hw_engine_group.hxe_hw_fence.hxe_irq.hxe_lrc.hxe_mmio.hxe_reg_sr.hxe_reg_whitelist.hxe_rtp.hxe_sched_job.h
Detected Declarations
struct engine_infofunction hw_engine_finifunction xe_hw_engine_mmio_read32function xe_hw_engine_enable_ringfunction xe_hw_engine_match_fixed_cslice_modefunction xe_rtp_cfeg_wmtp_disabledfunction hw_engine_setup_default_lrc_statefunction xe_hw_engine_setup_reg_lrcfunction hw_engine_setup_default_statefunction get_msix_irq_offsetfunction hw_engine_init_earlyfunction adjust_idledlyfunction hw_engine_initfunction hw_engine_setup_logical_mappingfunction read_media_fusesfunction infer_svccopy_from_meml3function read_svccopy_fusesfunction read_copy_fusesfunction read_compute_fuses_from_dssfunction read_compute_fuses_from_regfunction read_compute_fusesfunction check_gsc_availabilityfunction check_sw_disablefunction xe_hw_engines_init_earlyfunction xe_hw_engines_initfunction for_each_hw_enginefunction xe_hw_engine_handle_irqfunction xe_hw_engine_snapshot_capturefunction xe_hw_engine_snapshot_freefunction xe_hw_engine_printfunction xe_hw_engine_mask_per_classfunction xe_hw_engine_is_reservedfunction xe_hw_engine_read_timestampfunction xe_hw_engine_to_fw_domainfunction xe_hw_engine_lookup
Annotated Snippet
struct engine_info {
const char *name;
unsigned int class : 8;
unsigned int instance : 8;
unsigned int irq_offset : 8;
enum xe_force_wake_domains domain;
u32 mmio_base;
};
static const struct engine_info engine_infos[] = {
[XE_HW_ENGINE_RCS0] = {
.name = "rcs0",
.class = XE_ENGINE_CLASS_RENDER,
.instance = 0,
.irq_offset = ilog2(INTR_RCS0),
.domain = XE_FW_RENDER,
.mmio_base = RENDER_RING_BASE,
},
[XE_HW_ENGINE_BCS0] = {
.name = "bcs0",
.class = XE_ENGINE_CLASS_COPY,
.instance = 0,
.irq_offset = ilog2(INTR_BCS(0)),
.domain = XE_FW_GT,
.mmio_base = BLT_RING_BASE,
},
[XE_HW_ENGINE_BCS1] = {
.name = "bcs1",
.class = XE_ENGINE_CLASS_COPY,
.instance = 1,
.irq_offset = ilog2(INTR_BCS(1)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS1_RING_BASE,
},
[XE_HW_ENGINE_BCS2] = {
.name = "bcs2",
.class = XE_ENGINE_CLASS_COPY,
.instance = 2,
.irq_offset = ilog2(INTR_BCS(2)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS2_RING_BASE,
},
[XE_HW_ENGINE_BCS3] = {
.name = "bcs3",
.class = XE_ENGINE_CLASS_COPY,
.instance = 3,
.irq_offset = ilog2(INTR_BCS(3)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS3_RING_BASE,
},
[XE_HW_ENGINE_BCS4] = {
.name = "bcs4",
.class = XE_ENGINE_CLASS_COPY,
.instance = 4,
.irq_offset = ilog2(INTR_BCS(4)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS4_RING_BASE,
},
[XE_HW_ENGINE_BCS5] = {
.name = "bcs5",
.class = XE_ENGINE_CLASS_COPY,
.instance = 5,
.irq_offset = ilog2(INTR_BCS(5)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS5_RING_BASE,
},
[XE_HW_ENGINE_BCS6] = {
.name = "bcs6",
.class = XE_ENGINE_CLASS_COPY,
.instance = 6,
.irq_offset = ilog2(INTR_BCS(6)),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS6_RING_BASE,
},
[XE_HW_ENGINE_BCS7] = {
.name = "bcs7",
.class = XE_ENGINE_CLASS_COPY,
.irq_offset = ilog2(INTR_BCS(7)),
.instance = 7,
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS7_RING_BASE,
},
[XE_HW_ENGINE_BCS8] = {
.name = "bcs8",
.class = XE_ENGINE_CLASS_COPY,
.instance = 8,
.irq_offset = ilog2(INTR_BCS8),
.domain = XE_FW_GT,
.mmio_base = XEHPC_BCS8_RING_BASE,
},
Annotation
- Immediate include surface: `xe_hw_engine.h`, `linux/nospec.h`, `drm/drm_managed.h`, `drm/drm_print.h`, `uapi/drm/xe_drm.h`, `generated/xe_wa_oob.h`, `regs/xe_engine_regs.h`, `regs/xe_gt_regs.h`.
- Detected declarations: `struct engine_info`, `function hw_engine_fini`, `function xe_hw_engine_mmio_read32`, `function xe_hw_engine_enable_ring`, `function xe_hw_engine_match_fixed_cslice_mode`, `function xe_rtp_cfeg_wmtp_disabled`, `function hw_engine_setup_default_lrc_state`, `function xe_hw_engine_setup_reg_lrc`, `function hw_engine_setup_default_state`, `function get_msix_irq_offset`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.