Patchwork [2/2] UBUNTU: SAUCE: Nouveau: Disable acceleration on MacBook Pros

login
register
mail settings
Submitter Andy Whitcroft
Date Sept. 17, 2010, 4:17 p.m.
Message ID <1284740276-5551-3-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/65088/
State Accepted
Delegated to: Leann Ogasawara
Headers show

Comments

Andy Whitcroft - Sept. 17, 2010, 4:17 p.m.
From: Christopher James Halse Rogers <raof@ubuntu.com>

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

Upstream obviously wants to fix acceleration rather than disable it.
For Lucid however we need these cards to boot more than we need them to
be fast.

With acceleration enabled these cards hang during boot.

Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/nouveau/nouveau_state.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index 00a4e88..f93278d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -692,6 +692,15 @@  static void nouveau_apply_noaccel_quirks (struct drm_device *dev)
 	if (nouveau_noaccel == -1) {
 		/* If not specified, noaccel should default off */
 		nouveau_noaccel = 0;
+
+		/* MacBook Pro laptops with 9600GT cards hang with acceleration */
+		/* See https://bugs.launchpad.net/bugs/546393 */
+		if ((dev->pdev->device == 0x0647) &&
+		    (dev->pdev->subsystem_vendor == 0x106b)) {
+			nouveau_noaccel = 1;
+			NV_INFO(dev, "Detected MacBook Pro 9600GT chip. "
+				 "Disabling acceleration\n");
+		}
 	}
 }