[PATCH 1/6] UBUNTU: SAUCE: i915 KMS -- support disabling KMS for known broken devices

Andy Whitcroft apw at canonical.com
Fri Apr 16 17:09:10 UTC 2010


BugLink: http://bugs.launchpad.net/bugs/563277

Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
 drivers/gpu/drm/i915/i915_drv.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index f7d7c12..11378c7 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -565,6 +565,19 @@ static int __init i915_init(void)
 	 * Allow optional vga_text_mode_force boot option to override
 	 * the default behavior.
 	 */
+	/*
+	 * If the user has not specified modesetting the check for known
+         * bad devices and disable them.
+         */
+	if (i915_modeset == -1) {
+		static struct pci_device_id i915_badmodeset[] = {
+			{ },
+		};
+		if (pci_dev_present(i915_badmodeset)) {
+			DRM_INFO("i915 disabling kernel modesetting for known bad device.\n");
+			i915_modeset = 0;
+		}
+	}
 #if defined(CONFIG_DRM_I915_KMS)
 	if (i915_modeset != 0)
 		driver.driver_features |= DRIVER_MODESET;
-- 
1.7.0





More information about the kernel-team mailing list