[PATCH] agp/intel-gtt: Make it use DMA API dynamically.
From: Konrad Rzeszutek Wilk
Date: Wed Oct 28 2015 - 10:17:17 EST
It is 2015 and DMA API is pretty much a MUST in the x86 world.
Make the fake AGP driver choose dynamically whether to use
the DMA API based on the GTT version instead of having
an dependency on Intel IOMMU being compiled in.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
drivers/char/agp/intel-gtt.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 1341a94..f38c4d4 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -26,18 +26,6 @@
#include "intel-agp.h"
#include <drm/intel-gtt.h>
-/*
- * If we have Intel graphics, we're not going to have anything other than
- * an Intel IOMMU. So make the correct use of the PCI DMA API contingent
- * on the Intel IOMMU support (CONFIG_INTEL_IOMMU).
- * Only newer chipsets need to bother with this, of course.
- */
-#ifdef CONFIG_INTEL_IOMMU
-#define USE_PCI_DMA_API 1
-#else
-#define USE_PCI_DMA_API 0
-#endif
-
struct intel_gtt_driver {
unsigned int gen : 8;
unsigned int is_g33 : 1;
@@ -650,7 +638,7 @@ static int intel_gtt_init(void)
intel_private.stolen_size = intel_gtt_stolen_size();
- intel_private.needs_dmar = USE_PCI_DMA_API && INTEL_GTT_GEN > 2;
+ intel_private.needs_dmar = INTEL_GTT_GEN > 2;
ret = intel_gtt_setup_scratch_page();
if (ret != 0) {
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/