|
@@ -1186,10 +1186,11 @@ static void gen6_cleanup(void)
|
|
|
/* Certain Gen5 chipsets require require idling the GPU before
|
|
|
* unmapping anything from the GTT when VT-d is enabled.
|
|
|
*/
|
|
|
-extern int intel_iommu_gfx_mapped;
|
|
|
static inline int needs_idle_maps(void)
|
|
|
{
|
|
|
+#ifdef CONFIG_INTEL_IOMMU
|
|
|
const unsigned short gpu_devid = intel_private.pcidev->device;
|
|
|
+ extern int intel_iommu_gfx_mapped;
|
|
|
|
|
|
/* Query intel_iommu to see if we need the workaround. Presumably that
|
|
|
* was loaded first.
|
|
@@ -1198,7 +1199,7 @@ static inline int needs_idle_maps(void)
|
|
|
gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
|
|
|
intel_iommu_gfx_mapped)
|
|
|
return 1;
|
|
|
-
|
|
|
+#endif
|
|
|
return 0;
|
|
|
}
|
|
|
|