Message ID | 20210825032509.12230-1-shawn.c.lee@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/gt: do_idle_maps on gen8 and later platform. | expand |
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;
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@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Cooper Chiou <cooper.chiou@intel.com> Cc: Huang Derek <derek.huang@intel.com> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com> --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 6 ++++++ 1 file changed, 6 insertions(+)