summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2026-09-02 13:41:23 +0100
committerMatthew Auld <matthew.auld@intel.com>2026-09-03 11:33:26 +0100
commitc874bc70c897c554cc460cfe1fa2c715f780d368 (patch)
treef177abe8de87d3815b5d2b35763c43898c00225e /scripts/Makefile.thinlto
parent6df8aa0e8a323201a1eb85a98864e90b6b59230a (diff)
downloadlinux-next-c874bc70c897c554cc460cfe1fa2c715f780d368.tar.gz
linux-next-c874bc70c897c554cc460cfe1fa2c715f780d368.zip
drm/xe/vram: add early VRAM health check
During early probe, use the last page as a canary for BAR sizing, CCS sizing, identity map setup etc. If something is wrong the last page is where we will likely find it. Hit it with everything we have. For now this is gated behind a debug config option, so shouldn't trigger on production. Main motivation is around CCS sizing where on some BMG cards the CCS offset is programmed misaligned, for whatever reason, and our handling of that was busted, as found by Linus, leading to some amount of CCS storage getting pulled into the allocator as normal VRAM. Nothing in our CI farm has such a misaligned offset it would seem, however I did get this to pop on my b570, which does also have the misaligned CCS offset: Tile 0: Running VRAM memtest... Tile 0: VRAM bounds overlap CCS region! VRAM sizing is incorrect. With the fix from Linus, this goes away: Tile 0: Running VRAM memtest... Tile 0: VRAM memtest completed. For the VRAM health check itself, this adds: - CPU access to the last page (BAR). - GPU access to the last page (identity map). - CCS overlap check. This one is more involved, but overall idea is fill the last page with a known pattern, and also save the CCS state for the first 4M of VRAM to some scratch memory. We then zero the CCS storage for that same range, all using the proper CCS copy instruction. At this point we readback the last page, and check if the pattern we wrote changed. Finally we restore the CCS state. This works since CCS 1:1 maps with VRAM, so the start of the raw CCS, should map to the start of VRAM. This successfully catches the issue that Linus found and fixed. 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: Linus Torvalds <torvalds@linux-foundation.org> Cc: Stuart Summers <stuart.summers@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-12-matthew.auld@intel.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions