1 From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001
2 From: Fedora X Ninjas <x@fedoraproject.org>
3 Date: Tue, 16 Feb 2010 11:38:17 +1000
4 Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs
6 Also, don't treat DRI setup failure as an error for nouveau.
9 Append nvidia driver to the list of prefered drivers
11 glx/glxdri.c | 7 +++++--
12 glx/glxdri2.c | 7 +++++--
13 hw/xfree86/common/xf86AutoConfig.c | 19 ++++++++++++++++++-
14 3 files changed, 28 insertions(+), 5 deletions(-)
18 @@ -978,6 +978,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
19 const __DRIconfig **driConfigs;
20 const __DRIextension **extensions;
24 if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
25 !DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
26 @@ -1057,7 +1058,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
28 screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
29 if (screen->driver == NULL) {
30 - LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
31 + if (!strcmp(driverName, "nouveau"))
33 + LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
37 @@ -1193,7 +1196,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
41 - LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
42 + LogMessage(from, "AIGLX: reverting to software rendering\n");
48 @@ -708,6 +708,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
49 const __DRIextension **extensions;
50 const __DRIconfig **driConfigs;
54 screen = calloc(1, sizeof *screen);
56 @@ -734,7 +735,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
58 screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
59 if (screen->driver == NULL) {
60 - LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
61 + if (!strcmp(driverName, "nouveau"))
63 + LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
67 @@ -826,7 +829,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
71 - LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n");
72 + LogMessage(from, "AIGLX: reverting to software rendering\n");
76 --- a/hw/xfree86/common/xf86pciBus.c
77 +++ b/hw/xfree86/common/xf86pciBus.c
78 @@ -1123,7 +1123,25 @@ videoPtrToDriverList(struct pci_device *
80 case 0x102b: driverList[0] = "mga"; break;
81 case 0x10c8: driverList[0] = "neomagic"; break;
82 - case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
83 + case 0x10de: case 0x12d2:
84 + switch (dev->device_id) {
88 + driverList[0] = "vesa";
93 + driverList[0] = "nv";
96 + driverList[0] = "nouveau";
97 + driverList[1] = "nv";
98 + driverList[2] = "nvidia";
102 case 0x1106: driverList[0] = "openchrome"; break;
103 case 0x1b36: driverList[0] = "qxl"; break;
104 case 0x1163: driverList[0] = "rendition"; break;