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

leann.ogasawara at canonical.com leann.ogasawara at canonical.com
Tue Aug 31 17:13:13 BST 2010


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

Signed-off-by: Andy Whitcroft <apw at canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara 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 02ea0ae..06b5795 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -585,6 +585,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.4




More information about the kernel-team mailing list