799841b
From 602e1f209dd983e40d989e871cd253e8187899b8 Mon Sep 17 00:00:00 2001
Jesse Keating 7a32965
From: drago01 <drago01@gmail.com>
34f9218
Date: Wed, 26 Oct 2011 13:37:27 -0400
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 +++++------
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
799841b
index 81c287f..ee5693b 100644
Jesse Keating 7a32965
--- a/Documentation/kernel-parameters.txt
Jesse Keating 7a32965
+++ b/Documentation/kernel-parameters.txt
799841b
@@ -1014,12 +1014,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
34f9218
 			for io virtual address below 32-bit forcing dual
34f9218
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
799841b
index bdc447f..240db6b 100644
Kyle McMartin 4a20417
--- a/drivers/iommu/intel-iommu.c
Kyle McMartin 4a20417
+++ b/drivers/iommu/intel-iommu.c
799841b
@@ -408,7 +408,8 @@ int dmar_disabled = 1;
799841b
 int intel_iommu_enabled = 0;
799841b
 EXPORT_SYMBOL_GPL(intel_iommu_enabled);
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;
34f9218
 static int intel_iommu_superpage = 1;
799841b
@@ -433,10 +434,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
-- 
799841b
1.7.7.4
Jesse Keating 7a32965