2010-11-24 23:49:36 +00:00
|
|
|
From 2e79f2eb5a0fbef5f0698b066938d8f1ada44698 Mon Sep 17 00:00:00 2001
|
2009-06-23 04:02:10 +00:00
|
|
|
From: Fedora X Ninjas <x@fedoraproject.org>
|
2010-02-16 05:59:00 +00:00
|
|
|
Date: Tue, 16 Feb 2010 11:38:17 +1000
|
2010-11-24 23:49:36 +00:00
|
|
|
Subject: [PATCH] autoconfig: select nouveau by default for NVIDIA GPUs
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
Also, don't treat DRI setup failure as an error for nouveau.
|
|
|
|
---
|
2010-07-05 00:07:04 +00:00
|
|
|
glx/glxdri.c | 7 +++++--
|
|
|
|
glx/glxdri2.c | 7 +++++--
|
|
|
|
hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++-
|
2010-02-16 05:59:00 +00:00
|
|
|
3 files changed, 27 insertions(+), 5 deletions(-)
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
diff --git a/glx/glxdri.c b/glx/glxdri.c
|
2010-11-24 23:49:36 +00:00
|
|
|
index db3fcd5..82cdb87 100644
|
2009-06-23 04:02:10 +00:00
|
|
|
--- a/glx/glxdri.c
|
|
|
|
+++ b/glx/glxdri.c
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -979,6 +979,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
const __DRIconfig **driConfigs;
|
|
|
|
const __DRIextension **extensions;
|
|
|
|
int i;
|
|
|
|
+ int from = X_ERROR;
|
|
|
|
|
|
|
|
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
|
|
|
|
!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -1058,7 +1059,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
|
|
|
|
if (screen->driver == NULL) {
|
|
|
|
- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
|
|
|
|
+ if (!strcmp(driverName, "nouveau"))
|
|
|
|
+ from = X_INFO;
|
|
|
|
+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
|
|
|
|
filename, dlerror());
|
|
|
|
goto handle_error;
|
|
|
|
}
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -1194,7 +1197,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
|
2010-07-05 00:07:04 +00:00
|
|
|
free(screen);
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
|
|
|
|
+ LogMessage(from, "AIGLX: reverting to software rendering\n");
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
|
2010-11-24 23:49:36 +00:00
|
|
|
index 0b69201..1c58023 100644
|
2009-06-23 04:02:10 +00:00
|
|
|
--- a/glx/glxdri2.c
|
|
|
|
+++ b/glx/glxdri2.c
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -709,6 +709,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
const __DRIextension **extensions;
|
|
|
|
const __DRIconfig **driConfigs;
|
|
|
|
int i;
|
|
|
|
+ int from = X_ERROR;
|
|
|
|
|
2010-07-05 00:07:04 +00:00
|
|
|
screen = calloc(1, sizeof *screen);
|
2009-06-23 04:02:10 +00:00
|
|
|
if (screen == NULL)
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -735,7 +736,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
|
|
|
|
if (screen->driver == NULL) {
|
|
|
|
- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
|
|
|
|
+ if (!strcmp(driverName, "nouveau"))
|
|
|
|
+ from = X_INFO;
|
|
|
|
+ LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
|
|
|
|
filename, dlerror());
|
|
|
|
goto handle_error;
|
|
|
|
}
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -827,7 +830,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
2009-06-23 04:02:10 +00:00
|
|
|
|
2010-07-05 00:07:04 +00:00
|
|
|
free(screen);
|
2009-06-23 04:02:10 +00:00
|
|
|
|
|
|
|
- LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
|
|
|
|
+ LogMessage(from, "AIGLX: reverting to software rendering\n");
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
2010-07-05 00:07:04 +00:00
|
|
|
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
|
2010-11-24 23:49:36 +00:00
|
|
|
index 3e9c455..e34e6d6 100644
|
2010-07-05 00:07:04 +00:00
|
|
|
--- a/hw/xfree86/common/xf86pciBus.c
|
|
|
|
+++ b/hw/xfree86/common/xf86pciBus.c
|
2010-11-24 23:49:36 +00:00
|
|
|
@@ -1123,7 +1123,23 @@ videoPtrToDriverList(struct pci_device *dev,
|
2009-06-23 04:02:10 +00:00
|
|
|
break;
|
|
|
|
case 0x102b: driverList[0] = "mga"; break;
|
|
|
|
case 0x10c8: driverList[0] = "neomagic"; break;
|
|
|
|
- case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
|
|
|
|
+ case 0x10de: case 0x12d2:
|
|
|
|
+ switch (dev->device_id) {
|
|
|
|
+ /* NV1 */
|
|
|
|
+ case 0x0008:
|
|
|
|
+ case 0x0009:
|
|
|
|
+ driverList[0] = "vesa";
|
|
|
|
+ break;
|
|
|
|
+ /* NV3 */
|
|
|
|
+ case 0x0018:
|
|
|
|
+ case 0x0019:
|
|
|
|
+ driverList[0] = "nv";
|
|
|
|
+ break;
|
|
|
|
+ default:
|
2009-08-24 05:05:49 +00:00
|
|
|
+ driverList[0] = "nouveau";
|
2009-06-23 04:02:10 +00:00
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
case 0x1106: driverList[0] = "openchrome"; break;
|
2010-02-16 05:59:00 +00:00
|
|
|
case 0x1b36: driverList[0] = "qxl"; break;
|
2009-06-23 04:02:10 +00:00
|
|
|
case 0x1163: driverList[0] = "rendition"; break;
|
|
|
|
--
|
2010-11-24 23:49:36 +00:00
|
|
|
1.7.3.2
|
2009-06-23 04:02:10 +00:00
|
|
|
|