diff --git a/local/recipes/gpu/redox-drm/source/src/drivers/intel/gtt.rs b/local/recipes/gpu/redox-drm/source/src/drivers/intel/gtt.rs index bf472a856a..59aff67e42 100644 --- a/local/recipes/gpu/redox-drm/source/src/drivers/intel/gtt.rs +++ b/local/recipes/gpu/redox-drm/source/src/drivers/intel/gtt.rs @@ -7,6 +7,18 @@ use redox_driver_sys::memory::MmioRegion; use super::info::IntelGeneration; use crate::driver::{DriverError, Result}; +// ── Intel GGTT — Graphics GTT Page Tables ─────────────────────────────── +// GGTT (Global GTT) provides GPU-accessible virtual→physical address +// translation for all contexts. It's a single shared page table in BAR0. +// +// The GGTT aperture (BAR0) contains 64-bit PTE entries. Each entry maps +// one page (4KB or 64KB on Gen12.5+). Entries must be flushed via +// GFX_FLSH_CNTL register write + posting read after modification. +// +// alloc_range/release_range: free-list allocation with coalescing. +// map_range/unmap_range: PTE programming with flush. +// 64KB page support for Gen12.5+ (DG2, MTL, Xe2). + const GTT_BASE: usize = 0x0000; const GFX_FLSH_CNTL_REG: usize = 0x101008; const GFX_FLSH_CNTL_EN: u32 = 1 << 0; diff --git a/local/recipes/gpu/redox-drm/source/src/drivers/intel/info.rs b/local/recipes/gpu/redox-drm/source/src/drivers/intel/info.rs index 95c4275818..ee51171743 100644 --- a/local/recipes/gpu/redox-drm/source/src/drivers/intel/info.rs +++ b/local/recipes/gpu/redox-drm/source/src/drivers/intel/info.rs @@ -1,5 +1,15 @@ use log::warn; +// ── Intel Device Info — Generation + Platform Detection ────────────────── +// Maps PCI device IDs to Intel platforms, generations, and capabilities. +// Supports 161 device IDs from Gen4 (I965G, 2006) through Xe2 (BMG, 2025). +// +// Runtime detection: GMD_ID register (Gen12+) for IP version, EU/subslice +// count from GT_SLICE_INFO and EU_DISABLE fuse registers. +// +// Generation enum covers 11 variants: Gen4 through GenXe2 + Unknown. +// Each variant provides display_version, gt_version, and num_pipes. + const GMD_ID_MMIO: usize = 0x138040; const GEN8_EU_DISABLE0: usize = 0x1913C; const GEN8_EU_DISABLE1: usize = 0x19140;