Skip to content

Commit 5a71019

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 <John.C.Harrison@Intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: stable@vger.kernel.org Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3164 Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241023221200.1797832-1-matthew.brost@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 0191fdd commit 5a71019

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
@@ -401,6 +401,16 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
401401

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

0 commit comments

Comments
 (0)