diff options
author | Keith Packard <keithp@keithp.com> | 2011-10-28 13:28:00 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-11-08 05:50:27 -0500 |
commit | a08185a3eb658854b29c05bcbfac0f85038ffe9f (patch) | |
tree | 9411bc4cd2dc3dd5e4f29654b7b32669fe1434bb /drivers | |
parent | 35b09c9bf619c4fc6040c52dcea6bd5bd6af7679 (diff) |
agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set
Kernels with no iommu support cannot ever need the Ironlake
work-around, so never enable it in that case.
Might be better to completely remove the work-around from the kernel
in this case?
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 3a8d44886010..c92424ca1a55 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -1186,10 +1186,11 @@ static void gen6_cleanup(void) | |||
1186 | /* Certain Gen5 chipsets require require idling the GPU before | 1186 | /* Certain Gen5 chipsets require require idling the GPU before |
1187 | * unmapping anything from the GTT when VT-d is enabled. | 1187 | * unmapping anything from the GTT when VT-d is enabled. |
1188 | */ | 1188 | */ |
1189 | extern int intel_iommu_gfx_mapped; | ||
1190 | static inline int needs_idle_maps(void) | 1189 | static inline int needs_idle_maps(void) |
1191 | { | 1190 | { |
1191 | #ifdef CONFIG_INTEL_IOMMU | ||
1192 | const unsigned short gpu_devid = intel_private.pcidev->device; | 1192 | const unsigned short gpu_devid = intel_private.pcidev->device; |
1193 | extern int intel_iommu_gfx_mapped; | ||
1193 | 1194 | ||
1194 | /* Query intel_iommu to see if we need the workaround. Presumably that | 1195 | /* Query intel_iommu to see if we need the workaround. Presumably that |
1195 | * was loaded first. | 1196 | * was loaded first. |
@@ -1198,7 +1199,7 @@ static inline int needs_idle_maps(void) | |||
1198 | gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) && | 1199 | gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) && |
1199 | intel_iommu_gfx_mapped) | 1200 | intel_iommu_gfx_mapped) |
1200 | return 1; | 1201 | return 1; |
1201 | 1202 | #endif | |
1202 | return 0; | 1203 | return 0; |
1203 | } | 1204 | } |
1204 | 1205 | ||