[Intel-gfx] [PATCH] drm/i915/gt: do_idle_maps on gen8 and later platform.
Lee Shawn C
shawn.c.lee at intel.com
Wed Aug 25 03:25:09 UTC 2021
We are seeing "DMAR faults [reason 7, next page table ptr is invalid]"
on TGL while running suspend stress test. Refer to 'commit 84361529ee85
("drm/i915: Sleep around performing iommu unmaps on Tigerlake")'.
Driver check needs_idle_maps() in i915_gmch_probe() but it applicable
for gen5 and earlier generations. Add needs_idle_maps() in gen8_gmch_probe()
then it will benifit gen8 and later platform.
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
Cc: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Cooper Chiou <cooper.chiou at intel.com>
Cc: Huang Derek <derek.huang at intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee at intel.com>
---
drivers/gpu/drm/i915/gt/intel_ggtt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index de3ac58fceec..9510da0ae6b5 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -911,6 +911,12 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
ggtt->vm.alloc_pt_dma = alloc_pt_dma;
+ if (needs_idle_maps(i915)) {
+ drm_notice(&i915->drm,
+ "Flushing DMA requests before IOMMU unmaps; performance may be degraded\n");
+ ggtt->do_idle_maps = true;
+ }
+
ggtt->vm.total = (size / sizeof(gen8_pte_t)) * I915_GTT_PAGE_SIZE;
ggtt->vm.cleanup = gen6_gmch_remove;
ggtt->vm.insert_page = gen8_ggtt_insert_page;
--
2.17.1
More information about the Intel-gfx
mailing list