Skip to content

Commit a08185a

Browse files
keith-packardairlied
authored andcommitted
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>
1 parent 35b09c9 commit a08185a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/char/agp/intel-gtt.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,10 +1186,11 @@ static void gen6_cleanup(void)
11861186
/* Certain Gen5 chipsets require require idling the GPU before
11871187
* unmapping anything from the GTT when VT-d is enabled.
11881188
*/
1189-
extern int intel_iommu_gfx_mapped;
11901189
static inline int needs_idle_maps(void)
11911190
{
1191+
#ifdef CONFIG_INTEL_IOMMU
11921192
const unsigned short gpu_devid = intel_private.pcidev->device;
1193+
extern int intel_iommu_gfx_mapped;
11931194

11941195
/* Query intel_iommu to see if we need the workaround. Presumably that
11951196
* was loaded first.
@@ -1198,7 +1199,7 @@ static inline int needs_idle_maps(void)
11981199
gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
11991200
intel_iommu_gfx_mapped)
12001201
return 1;
1201-
1202+
#endif
12021203
return 0;
12031204
}
12041205

0 commit comments

Comments
 (0)