xorg-server: Changes to 'ubuntu'
debian/changelog | 15
debian/control | 2
debian/patches/214_glx_dri_searchdirs.patch | 445 ++++++++++++++++++++++++++++
debian/patches/series | 1
debian/rules | 2
5 files changed, 463 insertions(+), 2 deletions(-)
New commits:
commit aa86cf58ad16d437c6304db2aaba2bca5ac846fa
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Feb 18 22:06:25 2011 +1100
UNRELEASED → natty
diff --git a/debian/changelog b/debian/changelog
index 065fb54..4e90aeb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) UNRELEASED; urgency=low
+xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) natty; urgency=low
* debian/patches/214_glx_dri_searchdirs.patch:
- Search for DRI drivers for AIGLX in the same set of directories as mesa.
commit 569835203afcb80a49c069e4cceec710b74c6296
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Feb 18 22:01:58 2011 +1100
Bump build-depends on mesa to pick up drisearchdirs variable
diff --git a/debian/changelog b/debian/changelog
index 2561b9c..065fb54 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) UNRELEASED; urgency=low
* debian/rules:
- --disable-builddocs → --disable-devel-docs to match upstream rename.
Makes local builds faster and less prone to doxygen errors.
+ * debian/control:
+ - Bump build-depends on mesa to pick up new drisearchdirs variable in
+ dri.pc
-- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 18 Feb 2011 17:03:46 +1100
diff --git a/debian/control b/debian/control
index 2c69d38..c9cf4e3 100644
--- a/debian/control
+++ b/debian/control
@@ -56,7 +56,7 @@ Build-Depends:
x11proto-xf86dri-dev (>= 2.1.0),
libdrm-dev (>= 2.4.3) [!hurd-i386],
x11proto-gl-dev (>= 1.4.10),
- mesa-common-dev (>= 7.8),
+ mesa-common-dev (>= 7.10.1~git20110215.cc1636b6-0ubuntu2),
libgl1-mesa-dev (>= 7.8),
libxmuu-dev (>= 1:0.99.1),
libxext-dev (>= 1:0.99.1),
commit 09afde3084c210c5171f54338738849ced81f9bc
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Feb 18 17:06:15 2011 +1100
Add UNRELEASED tag.
diff --git a/debian/changelog b/debian/changelog
index 4dae038..2561b9c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) natty; urgency=low
+xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) UNRELEASED; urgency=low
* debian/patches/214_glx_dri_searchdirs.patch:
- Search for DRI drivers for AIGLX in the same set of directories as mesa.
commit c1cdd964aa61200271e39a174806f38a2f04bb60
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Feb 18 17:04:32 2011 +1100
Fix --disable-builddocs option; Non-chroot builds are now less fragile
diff --git a/debian/changelog b/debian/changelog
index 646a0d5..4dae038 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,11 @@ xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) natty; urgency=low
- Search for DRI drivers for AIGLX in the same set of directories as mesa.
Allows us to fall back to the classic radeon drivers when KMS is not
available.
+ * debian/rules:
+ - --disable-builddocs → --disable-devel-docs to match upstream rename.
+ Makes local builds faster and less prone to doxygen errors.
- -- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 18 Feb 2011 11:19:30 +1100
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 18 Feb 2011 17:03:46 +1100
xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu5) natty; urgency=low
diff --git a/debian/rules b/debian/rules
index 7b9eb33..54b4771 100755
--- a/debian/rules
+++ b/debian/rules
@@ -93,7 +93,7 @@ confflags += \
--with-builderstring="$(SOURCE_NAME) $(SOURCE_VERSION) ($(BUILDER))" \
--with-xkb-path=/usr/share/X11/xkb \
--with-xkb-output=/var/lib/xkb \
- --disable-builddocs \
+ --disable-devel-docs \
--disable-install-libxf86config \
--enable-mitshm \
--enable-xres \
commit 572295996ca7b851517eb72301dd42c829c369fc
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Feb 18 11:22:41 2011 +1100
Search for DRI drivers in the same directories as mesa
diff --git a/debian/changelog b/debian/changelog
index 418e6e0..646a0d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu6) natty; urgency=low
+
+ * debian/patches/214_glx_dri_searchdirs.patch:
+ - Search for DRI drivers for AIGLX in the same set of directories as mesa.
+ Allows us to fall back to the classic radeon drivers when KMS is not
+ available.
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Fri, 18 Feb 2011 11:19:30 +1100
+
xorg-server (2:1.9.99.901+git20110131.be3be758-0ubuntu5) natty; urgency=low
* Add 213_xichangehierarchy-check-oom.patch: Another NULL pointer check
diff --git a/debian/patches/214_glx_dri_searchdirs.patch b/debian/patches/214_glx_dri_searchdirs.patch
new file mode 100644
index 0000000..4baaa0a
--- /dev/null
+++ b/debian/patches/214_glx_dri_searchdirs.patch
@@ -0,0 +1,445 @@
+Index: xorg-server/glx/glxdri.c
+===================================================================
+--- xorg-server.orig/glx/glxdri.c 2011-02-18 12:53:47.493408035 +1100
++++ xorg-server/glx/glxdri.c 2011-02-18 12:53:47.963408733 +1100
+@@ -858,8 +858,6 @@
+
+
+
+-static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ static Bool
+ glxDRIEnterVT (int index, int flags)
+ {
+@@ -971,13 +969,11 @@
+ drm_handle_t hFB;
+ int junk;
+ __GLXDRIscreen *screen;
+- char filename[128];
+ Bool isCapable;
+ size_t buffer_size;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ const __DRIconfig **driConfigs;
+- const __DRIextension **extensions;
+- int i;
++ void *cookie = NULL;
+ int from = X_ERROR;
+
+ if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
+@@ -1053,43 +1049,15 @@
+ goto handle_error;
+ }
+
+- snprintf(filename, sizeof filename, "%s/%s_dri.so",
+- dri_driver_path, driverName);
+-
+- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+- if (screen->driver == NULL) {
+- if (!strcmp(driverName, "nouveau"))
+- from = X_INFO;
+- LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
+- filename, dlerror());
+- goto handle_error;
+- }
+-
+- extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
+- if (extensions == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+- driverName, dlerror());
+- goto handle_error;
+- }
+-
+- for (i = 0; extensions[i]; i++) {
+- if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
+- extensions[i]->version >= __DRI_CORE_VERSION) {
+- screen->core = (__DRIcoreExtension *) extensions[i];
+- }
+-
+- if (strcmp(extensions[i]->name, __DRI_LEGACY) == 0 &&
+- extensions[i]->version >= __DRI_LEGACY_VERSION) {
+- screen->legacy = (__DRIlegacyExtension *) extensions[i];
+- }
+- }
+-
+- if (screen->core == NULL || screen->legacy == NULL) {
+- LogMessage(X_ERROR,
+- "AIGLX error: %s does not export required DRI extension\n",
+- driverName);
+- goto handle_error;
+- }
++ from = strcmp(driverName, "nouveau_vieux") ? X_ERROR : X_INFO;
++ screen->driver = glxProbeDriver(driverName, &cookie,
++ (void **)&screen->core,
++ __DRI_CORE, __DRI_CORE_VERSION,
++ (void **)&screen->legacy,
++ __DRI_LEGACY, __DRI_LEGACY_VERSION);
++ if (screen->driver == NULL) {
++ goto handle_error;
++ }
+
+ /*
+ * Get device-specific info. pDevPriv will point to a struct
+@@ -1100,7 +1068,7 @@
+ if (!DRIGetDeviceInfo(pScreen, &hFB, &junk,
+ &framebuffer.size, &framebuffer.stride,
+ &framebuffer.dev_priv_size, &framebuffer.dev_priv)) {
+- LogMessage(X_ERROR, "AIGLX error: XF86DRIGetDeviceInfo failed\n");
++ LogMessage(from, "AIGLX error: XF86DRIGetDeviceInfo failed\n");
+ goto handle_error;
+ }
+
+@@ -1111,7 +1079,7 @@
+ status = drmMap(fd, hFB, framebuffer.size,
+ (drmAddressPtr)&framebuffer.base);
+ if (status != 0) {
+- LogMessage(X_ERROR, "AIGLX error: drmMap of framebuffer failed (%s)\n",
++ LogMessage(from, "AIGLX error: drmMap of framebuffer failed (%s)\n",
+ strerror(-status));
+ goto handle_error;
+ }
+@@ -1121,7 +1089,7 @@
+ */
+ status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA);
+ if (status != 0) {
+- LogMessage(X_ERROR, "AIGLX error: drmMap of SAREA failed (%s)\n",
++ LogMessage(from, "AIGLX error: drmMap of SAREA failed (%s)\n",
+ strerror(-status));
+ goto handle_error;
+ }
+@@ -1139,7 +1107,7 @@
+ screen);
+
+ if (screen->driScreen == NULL) {
+- LogMessage(X_ERROR,
++ LogMessage(from,
+ "AIGLX error: Calling driver entry point failed\n");
+ goto handle_error;
+ }
+@@ -1175,7 +1143,7 @@
+ pScrn->LeaveVT = glxDRILeaveVT;
+
+ LogMessage(X_INFO,
+- "AIGLX: Loaded and initialized %s\n", filename);
++ "AIGLX: Loaded and initialized %s\n", driverName);
+
+ return &screen->base;
+
+Index: xorg-server/glx/glxdri2.c
+===================================================================
+--- xorg-server.orig/glx/glxdri2.c 2011-02-18 12:53:47.493408035 +1100
++++ xorg-server/glx/glxdri2.c 2011-02-18 12:53:47.963408733 +1100
+@@ -599,8 +599,6 @@
+ NULL
+ };
+
+-static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ static Bool
+ glxDRIEnterVT (int index, int flags)
+ {
+@@ -701,13 +699,11 @@
+ __glXDRIscreenProbe(ScreenPtr pScreen)
+ {
+ const char *driverName, *deviceName;
++ void *cookie = NULL;
+ __GLXDRIscreen *screen;
+- char filename[128];
+ size_t buffer_size;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+- const __DRIextension **extensions;
+ const __DRIconfig **driConfigs;
+- int i;
+ int from = X_ERROR;
+
+ screen = calloc(1, sizeof *screen);
+@@ -730,54 +726,24 @@
+
+ __glXInitExtensionEnableBits(screen->glx_enable_bits);
+
+- snprintf(filename, sizeof filename,
+- "%s/%s_dri.so", dri_driver_path, driverName);
+-
+- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+- if (screen->driver == NULL) {
+- if (!strcmp(driverName, "nouveau"))
+- from = X_INFO;
+- LogMessage(from, "AIGLX error: dlopen of %s failed (%s)\n",
+- filename, dlerror());
+- goto handle_error;
+- }
+-
+- extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
+- if (extensions == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+- driverName, dlerror());
+- goto handle_error;
+- }
++ do {
++ screen->driver = glxProbeDriver(driverName, &cookie,
++ (void **)&screen->core, __DRI_CORE, 1,
++ (void **)&screen->dri2, __DRI_DRI2, 1);
++ if (screen->driver == NULL)
++ goto handle_error;
+
+- for (i = 0; extensions[i]; i++) {
+- if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
+- extensions[i]->version >= 1) {
+- screen->core = (const __DRIcoreExtension *) extensions[i];
+- }
+- if (strcmp(extensions[i]->name, __DRI_DRI2) == 0 &&
+- extensions[i]->version >= 1) {
+- screen->dri2 = (const __DRIdri2Extension *) extensions[i];
++ screen->driScreen =
++ (*screen->dri2->createNewScreen)(pScreen->myNum,
++ screen->fd,
++ loader_extensions,
++ &driConfigs,
++ screen);
++ if (screen->driScreen == NULL) {
++ LogMessage(X_INFO,
++ "AIGLX: Calling driver entry point failed\n");
+ }
+- }
+-
+- if (screen->core == NULL || screen->dri2 == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: %s exports no DRI extension\n",
+- driverName);
+- goto handle_error;
+- }
+-
+- screen->driScreen =
+- (*screen->dri2->createNewScreen)(pScreen->myNum,
+- screen->fd,
+- loader_extensions,
+- &driConfigs,
+- screen);
+-
+- if (screen->driScreen == NULL) {
+- LogMessage(X_ERROR,
+- "AIGLX error: Calling driver entry point failed\n");
+- goto handle_error;
+- }
++ } while (screen->driScreen == NULL);
+
+ initializeExtensions(screen);
+
+@@ -819,7 +785,7 @@
+ pScrn->LeaveVT = glxDRILeaveVT;
+
+ LogMessage(X_INFO,
+- "AIGLX: Loaded and initialized %s\n", filename);
++ "AIGLX: Loaded and initialized %s\n", driverName);
+
+ return &screen->base;
+
+Index: xorg-server/glx/glxdricommon.c
+===================================================================
+--- xorg-server.orig/glx/glxdricommon.c 2011-02-18 12:53:23.303372560 +1100
++++ xorg-server/glx/glxdricommon.c 2011-02-18 16:52:47.373554735 +1100
+@@ -29,6 +29,7 @@
+
+ #include <stdint.h>
+ #include <errno.h>
++#include <dlfcn.h>
+ #include <sys/time.h>
+ #include <GL/gl.h>
+ #include <GL/glxtokens.h>
+@@ -39,6 +40,17 @@
+ #include "glxscreens.h"
+ #include "glxdricommon.h"
+
++#ifndef PATH_MAX
++#include <sys/param.h>
++#ifndef PATH_MAX
++#ifdef MAXPATHLEN
++#define PATH_MAX MAXPATHLEN
++#else
++#define PATH_MAX 1024
++#endif
++#endif
++#endif
++
+ static int
+ getUST(int64_t *ust)
+ {
+@@ -204,3 +216,70 @@
+
+ return head.next;
+ }
++
++static const char dri_driver_path[] = DRI_DRIVER_PATH;
++
++void *
++glxProbeDriver(const char *driverName, void **cookie,
++ void **coreExt, const char *coreName, int coreVersion,
++ void **renderExt, const char *renderName, int renderVersion)
++{
++ int i;
++ void *driver;
++ char filename[PATH_MAX];
++ const __DRIextension **extensions;
++ char *driDriverPath;
++ const char *pathStart = *cookie ? (const char*)*cookie : dri_driver_path;
++ const char *pathEnd = strchr(pathStart, ':');
++
++ for (; *pathStart; pathEnd = strchr(pathStart, ':')) {
++ driDriverPath = strndup(pathStart,
++ pathEnd ? pathEnd - pathStart : sizeof filename);
++ snprintf(filename, sizeof filename, "%s/%s_dri.so",
++ driDriverPath, driverName);
++ free(driDriverPath);
++ pathStart = pathEnd ? pathEnd + 1 : pathStart + strlen(pathStart);
++ *cookie = (void *)pathStart;
++
++ LogMessage(X_INFO, "AIGLX: Trying DRI driver %s\n", filename);
++
++ driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
++ if (driver == NULL) {
++ LogMessage(X_INFO, "AIGLX: dlopen of %s failed (%s)\n",
++ filename, dlerror());
++ continue;
++ }
++
++ extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
++ if (extensions == NULL) {
++ LogMessage(X_INFO, "AIGLX: %s exports no extensions (%s)\n",
++ driverName, dlerror());
++ free(driver);
++ continue;
++ }
++
++ for (i = 0; extensions[i]; i++) {
++ if (strcmp(extensions[i]->name, coreName) == 0 &&
++ extensions[i]->version >= coreVersion) {
++ *coreExt = (void *)extensions[i];
++ }
++
++ if (strcmp(extensions[i]->name, renderName) == 0 &&
++ extensions[i]->version >= renderVersion) {
++ *renderExt = (void *)extensions[i];
++ }
++ }
++
++ if (*coreExt == NULL || *renderExt == NULL) {
++ LogMessage(X_INFO,
++ "AIGLX: %s does not export required DRI extension\n",
++ driverName);
++ *coreExt = *renderExt = NULL;
++ free(driver);
++ continue;
++ }
++ return driver;
++ }
++ *coreExt = *renderExt = NULL;
++ return NULL;
++}
+Index: xorg-server/glx/glxdricommon.h
+===================================================================
+--- xorg-server.orig/glx/glxdricommon.h 2011-02-18 12:53:23.383372676 +1100
++++ xorg-server/glx/glxdricommon.h 2011-02-18 12:53:47.963408733 +1100
+@@ -38,4 +38,9 @@
+
+ extern const __DRIsystemTimeExtension systemTimeExtension;
+
++void *
++glxProbeDriver(const char *name, void **cookie,
++ void **coreExt, const char *coreName, int coreVersion,
++ void **renderExt, const char *renderName, int renderVersion);
++
+ #endif
+Index: xorg-server/glx/glxdriswrast.c
+===================================================================
+--- xorg-server.orig/glx/glxdriswrast.c 2011-02-18 12:53:23.313372568 +1100
++++ xorg-server/glx/glxdriswrast.c 2011-02-18 12:53:47.963408733 +1100
+@@ -427,17 +427,13 @@
+ }
+ }
+
+-static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ static __GLXscreen *
+ __glXDRIscreenProbe(ScreenPtr pScreen)
+ {
+ const char *driverName = "swrast";
++ void *cookie = NULL;
+ __GLXDRIscreen *screen;
+- char filename[128];
+- const __DRIextension **extensions;
+ const __DRIconfig **driConfigs;
+- int i;
+
+ screen = calloc(1, sizeof *screen);
+ if (screen == NULL)
+@@ -449,40 +445,15 @@
+ screen->base.swapInterval = NULL;
+ screen->base.pScreen = pScreen;
+
+- snprintf(filename, sizeof filename,
+- "%s/%s_dri.so", dri_driver_path, driverName);
+-
+- screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
++ screen->driver = glxProbeDriver(driverName, &cookie,
++ (void **)&screen->core,
++ __DRI_CORE, __DRI_CORE_VERSION,
++ (void **)&screen->swrast,
++ __DRI_SWRAST, __DRI_SWRAST_VERSION);
+ if (screen->driver == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
+- filename, dlerror());
+ goto handle_error;
+ }
+
+- extensions = dlsym(screen->driver, __DRI_DRIVER_EXTENSIONS);
+- if (extensions == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+- driverName, dlerror());
+- goto handle_error;
+- }
+-
+- for (i = 0; extensions[i]; i++) {
+- if (strcmp(extensions[i]->name, __DRI_CORE) == 0 &&
+- extensions[i]->version >= __DRI_CORE_VERSION) {
+- screen->core = (const __DRIcoreExtension *) extensions[i];
+- }
+- if (strcmp(extensions[i]->name, __DRI_SWRAST) == 0 &&
+- extensions[i]->version >= __DRI_SWRAST_VERSION) {
+- screen->swrast = (const __DRIswrastExtension *) extensions[i];
+- }
+- }
+-
+- if (screen->core == NULL || screen->swrast == NULL) {
+- LogMessage(X_ERROR, "AIGLX error: %s exports no DRI extension\n",
+- driverName);
+- goto handle_error;
+- }
+-
+ screen->driScreen =
+ (*screen->swrast->createNewScreen)(pScreen->myNum,
+ loader_extensions,
+@@ -508,7 +479,7 @@
+ screen->base.GLXminor = 4;
+
+ LogMessage(X_INFO,
+- "AIGLX: Loaded and initialized %s\n", filename);
++ "AIGLX: Loaded and initialized %s\n", driverName);
+
+ return &screen->base;
+
+Index: xorg-server/configure.ac
+===================================================================
+--- xorg-server.orig/configure.ac 2011-02-18 12:53:47.823408519 +1100
++++ xorg-server/configure.ac 2011-02-18 12:53:47.963408733 +1100
+@@ -1254,7 +1254,12 @@
+ AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
+ AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path])
+ dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
+-AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path])
++drisearchdirs=`$PKG_CONFIG --variable=drisearchdirs dri`
++if test -n "$drisearchdirs" ; then
++ AC_DEFINE_DIR(DRI_DRIVER_PATH, drisearchdirs, [Default DRI search dirs])
++else
++ AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path])
++fi
+ AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name])
+ AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name])
+ AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release])
diff --git a/debian/patches/series b/debian/patches/series
index 1240c39..3968b7b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -33,3 +33,4 @@
211_glx_fix_bindtextimageext_length_check.patch
212_fix_request_length_check_for_createglxpbuffersgix.patch
213_xichangehierarchy-check-oom.patch
+214_glx_dri_searchdirs.patch
Reply to: