Skip to content

Commit 993ca0e

Browse files
mbrost05lucasdemarchi
authored andcommitted
drm/xe: Add mmio read before GGTT invalidate
On LNL without a mmio read before a GGTT invalidate the GuC can incorrectly read the GGTT scratch page upon next access leading to jobs not getting scheduled. A mmio read before a GGTT invalidate seems to fix this. Since a GGTT invalidate is not a hot code path, blindly do a mmio read before each GGTT invalidate. Cc: John Harrison <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: [email protected] Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reported-by: Paulo Zanoni <[email protected]> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3164 Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit 5a71019) [ Fix conflict with mmio vs gt argument ] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 6a9d2e2 commit 993ca0e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/gpu/drm/xe/xe_ggtt.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,16 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
397397

398398
static void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
399399
{
400+
struct xe_device *xe = tile_to_xe(ggtt->tile);
401+
402+
/*
403+
* XXX: Barrier for GGTT pages. Unsure exactly why this required but
404+
* without this LNL is having issues with the GuC reading scratch page
405+
* vs. correct GGTT page. Not particularly a hot code path so blindly
406+
* do a mmio read here which results in GuC reading correct GGTT page.
407+
*/
408+
xe_mmio_read32(xe_root_mmio_gt(xe), VF_CAP_REG);
409+
400410
/* Each GT in a tile has its own TLB to cache GGTT lookups */
401411
ggtt_invalidate_gt_tlb(ggtt->tile->primary_gt);
402412
ggtt_invalidate_gt_tlb(ggtt->tile->media_gt);

0 commit comments

Comments
 (0)