Josh Boyer 34f9218
From e13491e4c394907ffdd834aeccca279213818079 Mon Sep 17 00:00:00 2001
Jesse Keating 7a32965
From: drago01 <drago01@gmail.com>
Josh Boyer 34f9218
Date: Wed, 26 Oct 2011 13:37:27 -0400
Josh Boyer 34f9218
Subject: [PATCH] Default to igfx_off
Jesse Keating 7a32965
Jesse Keating 7a32965
This option seems to causes way to many issues, it is
Jesse Keating 7a32965
being investigated by Intel's chipset team for months now and
Jesse Keating 7a32965
we still don't have any outcome.
Jesse Keating 7a32965
Jesse Keating 7a32965
The results so far are "black screen when starting X",
Jesse Keating 7a32965
"system hangs when using GL", "system does not resume".
Jesse Keating 7a32965
Jesse Keating 7a32965
The patch adds an intel_iommu=igfx_on option, which makes it opt in,
Jesse Keating 7a32965
rather than opt out.
Jesse Keating 7a32965
Jesse Keating 7a32965
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Jesse Keating 7a32965
Reviewed-by: Adam Jackson <ajax@redhat.com>
Jesse Keating 7a32965
---
Jesse Keating 7a32965
 Documentation/kernel-parameters.txt |   11 +++++------
Josh Boyer 34f9218
 drivers/iommu/intel-iommu.c         |    9 +++++----
Jesse Keating 7a32965
 2 files changed, 10 insertions(+), 10 deletions(-)
Jesse Keating 7a32965
Jesse Keating 7a32965
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
Josh Boyer 34f9218
index a8ba119..8ddc43a 100644
Jesse Keating 7a32965
--- a/Documentation/kernel-parameters.txt
Jesse Keating 7a32965
+++ b/Documentation/kernel-parameters.txt
Josh Boyer 34f9218
@@ -998,12 +998,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Jesse Keating 7a32965
 			Enable intel iommu driver.
Jesse Keating 7a32965
 		off
Jesse Keating 7a32965
 			Disable intel iommu driver.
Jesse Keating 7a32965
-		igfx_off [Default Off]
Jesse Keating 7a32965
-			By default, gfx is mapped as normal device. If a gfx
Jesse Keating 7a32965
-			device has a dedicated DMAR unit, the DMAR unit is
Jesse Keating 7a32965
-			bypassed by not enabling DMAR with this option. In
Jesse Keating 7a32965
-			this case, gfx device will use physical address for
Jesse Keating 7a32965
-			DMA.
Jesse Keating 7a32965
+		igfx_on [Default Off]
Jesse Keating 7a32965
+			By default, the gfx's DMAR unit is bypassed by not enabling
Jesse Keating 7a32965
+			DMAR with this option. So the gfx device will use physical
Jesse Keating 7a32965
+			address for DMA. When this option is enabled it the gfx is
Jesse Keating 7a32965
+			mapped as normal device.
Jesse Keating 7a32965
 		forcedac [x86_64]
Jesse Keating 7a32965
 			With this option iommu will not optimize to look
Josh Boyer 34f9218
 			for io virtual address below 32-bit forcing dual
Josh Boyer 34f9218
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
Josh Boyer 34f9218
index be1953c..2e23af1 100644
Kyle McMartin 4a20417
--- a/drivers/iommu/intel-iommu.c
Kyle McMartin 4a20417
+++ b/drivers/iommu/intel-iommu.c
Josh Boyer 34f9218
@@ -404,7 +404,8 @@ int dmar_disabled = 0;
Jesse Keating 7a32965
 int dmar_disabled = 1;
Josh Boyer 34f9218
 #endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/
Josh Boyer 34f9218
 
Jesse Keating 7a32965
-static int dmar_map_gfx = 1;
Jesse Keating 7a32965
+/* disabled by default; causes way too many issues */
Jesse Keating 7a32965
+static int dmar_map_gfx = 0;
Jesse Keating 7a32965
 static int dmar_forcedac;
Jesse Keating 7a32965
 static int intel_iommu_strict;
Josh Boyer 34f9218
 static int intel_iommu_superpage = 1;
Josh Boyer 34f9218
@@ -429,10 +430,10 @@ static int __init intel_iommu_setup(char *str)
Jesse Keating 7a32965
 		} else if (!strncmp(str, "off", 3)) {
Jesse Keating 7a32965
 			dmar_disabled = 1;
Jesse Keating 7a32965
 			printk(KERN_INFO "Intel-IOMMU: disabled\n");
Jesse Keating 7a32965
-		} else if (!strncmp(str, "igfx_off", 8)) {
Jesse Keating 7a32965
-			dmar_map_gfx = 0;
Jesse Keating 7a32965
+		} else if (!strncmp(str, "igfx_on", 7)) {
Jesse Keating 7a32965
+			dmar_map_gfx = 1;
Jesse Keating 7a32965
 			printk(KERN_INFO
Jesse Keating 7a32965
-				"Intel-IOMMU: disable GFX device mapping\n");
Jesse Keating 7a32965
+				"Intel-IOMMU: enabled GFX device mapping\n");
Jesse Keating 7a32965
 		} else if (!strncmp(str, "forcedac", 8)) {
Jesse Keating 7a32965
 			printk(KERN_INFO
Jesse Keating 7a32965
 				"Intel-IOMMU: Forcing DAC for PCI devices\n");
Jesse Keating 7a32965
-- 
Josh Boyer 34f9218
1.7.6.4
Jesse Keating 7a32965