diff options
author | Keith Packard <keithp@keithp.com> | 2011-10-28 10:28:00 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-10-28 13:06:44 -0700 |
commit | c5e62bdd73da80e1017058c923336a5a150af9f2 (patch) | |
tree | d10c4c00a011790c2974af4decc0dc6a50c4db1f /drivers | |
parent | 3fca806cf343155d0bb0dfbdbc2e51ef47b65750 (diff) | |
download | linux-stable-c5e62bdd73da80e1017058c923336a5a150af9f2.tar.gz linux-stable-c5e62bdd73da80e1017058c923336a5a150af9f2.tar.bz2 linux-stable-c5e62bdd73da80e1017058c923336a5a150af9f2.zip |
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) /* 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; } |