mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/xe/vram: revamp CPU VRAM mapping
Previously, we called devm_ioremap_wc() for the entire PCI LMEM BAR (which can be significantly larger than usable memory, e.g., mapping 16G for a 10G card), and then simply assigned subsets of this global mapping to each tile. By moving the devm_ioremap_wc() call into vram_region_init() and mapping on a per-tile basis, we restrict the virtual address space to exactly the usable_size of each tile. The other big win is that the core kernel will place a guard page at the end of each per-tile mapping to help catch OOB CPU writes (e.g. into the flat CCS storage) by triggering an immediate page fault instead of silent memory corruption. As a consequence the global vram->mapping is now NULL. But that was unused anyway, with CPU access already correctly routed through the per tile mapping. v2 (Sashiko) - Make sure to update the panic flow to now use the root tile. Assisted-by: Gemini:gemini-3.1-pro-preview Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20260902124117.918018-10-matthew.auld@intel.com
This commit is contained in:
parent
d00b7f4f03
commit
bab69ad31c
2 changed files with 11 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue