Patchwork [5/6] UBUNTU: SAUCE: radeon KMS -- support disabling KMS for known broken devices

login
register
mail settings
Submitter Andy Whitcroft
Date April 16, 2010, 5:09 p.m.
Message ID <1271437755-16680-6-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/50342/
State Accepted
Delegated to: Andy Whitcroft
Headers show

Comments

Andy Whitcroft - April 16, 2010, 5:09 p.m.
BugLink: http://bugs.launchpad.net/bugs/546743

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index f537433..2486f37 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -324,6 +324,16 @@  static int __init radeon_init(void)
 		radeon_modeset = 0;
 	}
 #endif
+	/* Check for known bad devices by default. */
+	if (radeon_modeset == -1) {
+		static struct pci_device_id radeon_badmodeset[] = {
+			{ },
+		};
+		if (pci_dev_present(radeon_badmodeset)) {
+			DRM_INFO("radeon disabling kernel modesetting for known bad device.\n");
+			radeon_modeset = 0;
+		}
+	}
 	/* if enabled by default */
 	if (radeon_modeset == -1) {
 #ifdef CONFIG_DRM_RADEON_KMS