[Intel-gfx] [PATCH] agp/intel: Disable use of WC for GMM updates

Chris Wilson chris at chris-wilson.co.uk
Wed Apr 8 14:59:02 UTC 2020


It appears that Ironlake is very sensitive to having its GGTT PTE
updates flushed in a timely manner and requires UC rather than WC for
all, and not just under VT'd.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/char/agp/intel-gtt.c | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 66a62d17a3f5..afe5e81bafac 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -565,35 +565,12 @@ static void intel_gtt_cleanup(void)
 	intel_gtt_teardown_scratch_page();
 }
 
-/* Certain Gen5 chipsets require require idling the GPU before
- * unmapping anything from the GTT when VT-d is enabled.
- */
-static inline int needs_ilk_vtd_wa(void)
-{
-#ifdef CONFIG_INTEL_IOMMU
-	const unsigned short gpu_devid = intel_private.pcidev->device;
-
-	/* Query intel_iommu to see if we need the workaround. Presumably that
-	 * was loaded first.
-	 */
-	if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG ||
-	     gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
-	     intel_iommu_gfx_mapped)
-		return 1;
-#endif
-	return 0;
-}
-
 static bool intel_gtt_can_wc(void)
 {
 	if (INTEL_GTT_GEN <= 2)
 		return false;
 
-	if (INTEL_GTT_GEN >= 6)
-		return false;
-
-	/* Reports of major corruption with ILK vt'd enabled */
-	if (needs_ilk_vtd_wa())
+	if (INTEL_GTT_GEN >= 5)
 		return false;
 
 	return true;
-- 
2.20.1



More information about the Intel-gfx mailing list