On 16 November 2010 00:09, Thierry Vignaud <[email protected]> wrote: >>> This patch selects nouveau by default for NVIDIA GPUs >>> Also, don't treat DRI setup failure as an error for nouveau. >> >> Can you please split this patch in two parts since there are two >> completely orthogonal changes? Also, it would be good if the commit >> message explained why these changes are necessary. See:
(...) > here you are: > > This patch default to a proper driver for nvidia cards considering that: And this patch make xorg not treat DRI setup failure as an error for nouveau : nouveau 3D support is quite new (needs latest mesa, new enough kernel with the proper build options). What's more, the DRM interface got broken several times (see http://lwn.net/Articles/377953/) So treat faillure to set up DRI for nouveau gracefully.
From 9edb8ba5f8217f6f8ed80e064d57a97f4f3e9201 Mon Sep 17 00:00:00 2001 Original patch from Fedora X Ninjas <[email protected]> Don't treat DRI setup failure as an error for nouveau. nouveau 3D support is quite new (needs latest mesa, new enough kernel with the proper build options). What's more, the DRM interface got broken several times (see http://lwn.net/Articles/377953/) So treat faillure to set up DRI for nouveau gracefully. --- diff --git a/glx/glxdri.c b/glx/glxdri.c index 32b35db..f3a501e 100644 --- a/glx/glxdri.c +++ b/glx/glxdri.c @@ -968,6 +968,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIconfig **driConfigs; const __DRIextension **extensions; int i; + int from = X_ERROR; if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") || !DRIQueryDirectRenderingCapable(pScreen, &isCapable) || @@ -1047,7 +1048,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) 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; } @@ -1185,7 +1188,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) free(screen); - 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 index 970a51a..c78d4b3 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -696,6 +696,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIextension **extensions; const __DRIconfig **driConfigs; int i; + int from = X_ERROR; screen = calloc(1, sizeof *screen); if (screen == NULL) @@ -722,7 +723,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) 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; } @@ -816,7 +819,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) free(screen); - LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + LogMessage(from, "AIGLX: reverting to software rendering\n"); return NULL; }
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
