[arch-commits] Commit in xorg-server/trunk (4 files)

Jan de Groot jgc at archlinux.org
Mon May 30 08:22:15 UTC 2011


    Date: Monday, May 30, 2011 @ 04:22:14
  Author: jgc
Revision: 125806

upgpkg: xorg-server 1.10.2-1
Update to 1.10.2
Add latest fixes from upstream 1.10 branch
Patch autoconfig to use nouveau/nv/nvidia instead of only nv

Added:
  xorg-server/trunk/autoconfig-nvidia.patch
  xorg-server/trunk/git-fixes.patch
Modified:
  xorg-server/trunk/PKGBUILD
Deleted:
  xorg-server/trunk/glx-pixmap-crash.patch

-------------------------+
 PKGBUILD                |   17 +-
 autoconfig-nvidia.patch |  104 +++++++++++++++
 git-fixes.patch         |  318 ++++++++++++++++++++++++++++++++++++++++++++++
 glx-pixmap-crash.patch  |   85 ------------
 4 files changed, 434 insertions(+), 90 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-05-30 07:26:22 UTC (rev 125805)
+++ PKGBUILD	2011-05-30 08:22:14 UTC (rev 125806)
@@ -3,7 +3,7 @@
 
 pkgbase=xorg-server
 pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
-pkgver=1.10.1
+pkgver=1.10.2
 pkgrel=1
 arch=('i686' 'x86_64')
 license=('custom')
@@ -11,18 +11,20 @@
 makedepends=('pixman' 'libx11' 'mesa' 'libgl' 'xf86driproto' 'xcmiscproto' 'xtrans' 'bigreqsproto' 'randrproto' 'inputproto' 'fontsproto' 'videoproto' 'compositeproto' 'recordproto' 'scrnsaverproto' 'resourceproto' 'xineramaproto' 'libxkbfile' 'libxfont' 'renderproto' 'libpciaccess' 'libxv' 'xf86dgaproto' 'libxmu' 'libxrender' 'libxi' 'dmxproto' 'libxaw' 'libdmx' 'libxtst' 'libxres' 'xorg-xkbcomp' 'xorg-util-macros' 'xorg-font-util')
 options=('!libtool')
 source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
+        git-fixes.patch
         bg-none-revert.patch
-        glx-pixmap-crash.patch
         xserver-1.10-pointer-barriers.patch
         xorg-redhat-die-ugly-pattern-die-die-die.patch
+        autoconfig-nvidia.patch
         xvfb-run
         xvfb-run.1
         10-quirks.conf)
-sha1sums=('59ada4c9a59f7f1eb4b68c359e9cd58272aa4809'
+sha1sums=('fd831b3c6297d1a68830c602d767752d87b9ca54'
+          '6dd2bcd9d8b17d1a50ed8c15eb1cba480558e695'
           '629c6d8d52126eab81ee1b72a9e4209535f8cb81'
-          '19e7164dcf9814ad64231b50a46f651b0e68a27a'
           '1b95e91384a57d966428c7db98ed06f4cc562f91'
           '0efcdf61bde3c0cd813072b94e2b30ab922775b9'
+          'f9328fd7bc931bb02c8909ecfcef35403de33782'
           'c94f742d3f9cabf958ae58e4015d9dd185aabedc'
           '6838fc00ef4618c924a77e0fb03c05346080908a'
           '993798f3d22ad672d769dae5f48d1fa068d5578f')
@@ -37,8 +39,13 @@
 
   # Patches from ~ajax/xserver xserver-next branch
   patch -Np1 -i "${srcdir}/bg-none-revert.patch"
-  patch -Np1 -i "${srcdir}/glx-pixmap-crash.patch"
 
+  # Upstream fixes from 1.10 branch
+  patch -Np1 -i "${srcdir}/git-fixes.patch"
+
+  # Use nouveau/nv/nvidia drivers for nvidia devices
+  patch -Np1 -i "${srcdir}/autoconfig-nvidia.patch"
+
   autoreconf
   ./configure --prefix=/usr \
       --enable-ipv6 \

Added: autoconfig-nvidia.patch
===================================================================
--- autoconfig-nvidia.patch	                        (rev 0)
+++ autoconfig-nvidia.patch	2011-05-30 08:22:14 UTC (rev 125806)
@@ -0,0 +1,104 @@
+From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001
+From: Fedora X Ninjas <x at fedoraproject.org>
+Date: Tue, 16 Feb 2010 11:38:17 +1000
+Subject: [PATCH 08/17] autoconfig: select nouveau by default for NVIDIA GPUs
+
+Also, don't treat DRI setup failure as an error for nouveau.
+
+Modified by Archlinux:
+Append nvidia driver to the list of prefered drivers
+---
+ glx/glxdri.c                       |    7 +++++--
+ glx/glxdri2.c                      |    7 +++++--
+ hw/xfree86/common/xf86AutoConfig.c |   19 ++++++++++++++++++-
+ 3 files changed, 28 insertions(+), 5 deletions(-)
+
+--- a/glx/glxdri.c
++++ b/glx/glxdri.c
+@@ -978,6 +978,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
+     const __DRIconfig **driConfigs;
+     const __DRIextension **extensions;
+     int i;
++    int from = X_ERROR;
+ 
+     if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
+ 	!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
+@@ -1057,7 +1058,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;
+     }
+@@ -1193,7 +1196,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;
+ }
+--- a/glx/glxdri2.c
++++ b/glx/glxdri2.c
+@@ -708,6 +708,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
+     const __DRIextension **extensions;
+     const __DRIconfig **driConfigs;
+     int i;
++    int from = X_ERROR;
+ 
+     screen = calloc(1, sizeof *screen);
+     if (screen == NULL)
+@@ -734,7 +735,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;
+     }
+@@ -826,7 +829,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;
+ }
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1123,7 +1123,25 @@ videoPtrToDriverList(struct pci_device *
+ 	    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:
++		driverList[0] = "nouveau";
++		driverList[1] = "nv";
++		driverList[2] = "nvidia";
++		break;
++	    }
++	    break;
+ 	case 0x1106:		    driverList[0] = "openchrome"; break;
+         case 0x1b36:		    driverList[0] = "qxl"; break;
+ 	case 0x1163:		    driverList[0] = "rendition"; break;

Added: git-fixes.patch
===================================================================
--- git-fixes.patch	                        (rev 0)
+++ git-fixes.patch	2011-05-30 08:22:14 UTC (rev 125806)
@@ -0,0 +1,318 @@
+From 613e0e9ef74c4542ed458200165adbcdfdf3cd17 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Wed, 13 Apr 2011 18:51:30 +0000
+Subject: Send events that were missing from RRSelectInput
+
+The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out
+events corresponding to the event mask, if there have been changes to
+CRTCs or outputs.  Only screen events were being generated, however.
+
+Fixes http://bugs.freedesktop.org/21760
+
+Signed-off-by: Federico Mena Quintero <federico at novell.com>
+Reviewd-by: Keith Packard <keithp at keithp.com>
+Signed-off-by: Keith Packard <keithp at keithp.com>
+(cherry picked from commit b2997431fd426ab318bc5dfd2cd43956d733ebec)
+---
+diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
+index ac4d2ac..2135504 100644
+--- a/randr/rrdispatch.c
++++ b/randr/rrdispatch.c
+@@ -146,7 +146,7 @@ ProcRRSelectInput (ClientPtr client)
+ 	/*
+ 	 * Now see if the client needs an event
+ 	 */
+-	if (pScrPriv && (pRREvent->mask & RRScreenChangeNotifyMask))
++	if (pScrPriv)
+ 	{
+ 	    pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum];
+ 	    if (CompareTimeStamps (pTimes->setTime, 
+@@ -154,7 +154,35 @@ ProcRRSelectInput (ClientPtr client)
+ 		CompareTimeStamps (pTimes->configTime, 
+ 				   pScrPriv->lastConfigTime) != 0)
+ 	    {
+-		RRDeliverScreenEvent (client, pWin, pScreen);
++		if (pRREvent->mask & RRScreenChangeNotifyMask)
++		{
++		    RRDeliverScreenEvent (client, pWin, pScreen);
++		}
++
++		if (pRREvent->mask & RRCrtcChangeNotifyMask)
++		{
++		    int i;
++
++		    for (i = 0; i < pScrPriv->numCrtcs; i++)
++		    {
++			RRDeliverCrtcEvent (client, pWin, pScrPriv->crtcs[i]);
++		    }
++		}
++
++		if (pRREvent->mask & RROutputChangeNotifyMask)
++		{
++		    int i;
++
++		    for (i = 0; i < pScrPriv->numOutputs; i++)
++		    {
++			RRDeliverOutputEvent (client, pWin, pScrPriv->outputs[i]);
++		    }
++		}
++
++		/* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't
++		 * say if there ought to be notifications of changes to output properties
++		 * if those changes occurred before the time RRSelectInput is called.
++		 */
+ 	    }
+ 	}
+     }
+--
+cgit v0.8.3-6-g21f6
+From 50b9d3142ff90af2f7fa35b7b1bf9e5a07723dbd Mon Sep 17 00:00:00 2001
+From: Aaron Plattner <aplattner at nvidia.com>
+Date: Tue, 24 May 2011 23:02:42 +0000
+Subject: randr: check rotated virtual size limits correctly
+
+Commit d1107918d4626268803b54033a07405122278e7f introduced checks to
+the RandR path that cause RRSetScreenConfig requests to fail if the
+size is too large.  Unfortunately, when RandR 1.1 rotation is enabled
+it compares the rotated screen dimensions to the unrotated limits,
+which causes 90- and 270-degree rotation to fail unless your screen
+happens to be square:
+
+  X Error of failed request:  BadValue (integer parameter out of range for operation)
+    Major opcode of failed request:  153 (RANDR)
+    Minor opcode of failed request:  2 (RRSetScreenConfig)
+    Value in failed request:  0x780
+    Serial number of failed request:  14
+    Current serial number in output stream:  14
+
+Fix this by moving the check above the code that swaps the dimensions
+based on the rotation.
+
+Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
+Tested-by: Robert Hooker <robert.hooker at canonical.com>
+Tested-by: Kent Baxley <kent.baxley at canonical.com>
+Signed-off-by: Keith Packard <keithp at keithp.com>
+(cherry picked from commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3)
+---
+diff --git a/randr/rrscreen.c b/randr/rrscreen.c
+index 1bc1a9e..da6d48d 100644
+--- a/randr/rrscreen.c
++++ b/randr/rrscreen.c
+@@ -910,12 +910,6 @@ ProcRRSetScreenConfig (ClientPtr client)
+      */
+     width = mode->mode.width;
+     height = mode->mode.height;
+-    if (rotation & (RR_Rotate_90|RR_Rotate_270))
+-    {
+-	width = mode->mode.height;
+-	height = mode->mode.width;
+-    }
+-
+     if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) {
+ 	client->errorValue = width;
+ 	free(pData);
+@@ -927,6 +921,12 @@ ProcRRSetScreenConfig (ClientPtr client)
+ 	return BadValue;
+     }
+ 
++    if (rotation & (RR_Rotate_90|RR_Rotate_270))
++    {
++	width = mode->mode.height;
++	height = mode->mode.width;
++    }
++
+     if (width != pScreen->width || height != pScreen->height)
+     {
+ 	int	c;
+--
+cgit v0.8.3-6-g21f6
+From 4bfb22e7667c4cd55da5e7a31af29ce5769ecc65 Mon Sep 17 00:00:00 2001
+From: Aaron Plattner <aplattner at nvidia.com>
+Date: Mon, 18 Apr 2011 15:23:48 +0000
+Subject: linux: Retry VT ioctls while errno == EINTR
+
+When the smart scheduler is enabled, the VT ioctls (particularly
+VT_WAITACTIVE) can be interrupted by the smart scheduler's SIGALRMs.
+Previously, this caused the server to immediately continue on to
+ScreenInit, almost certainly causing a crash or failure because the X
+server that owned the VT hadn't finished cleaning up.  As of commit
+7ee965a300c9eddcc1acacf9414cfe3e589222a8, it causes a FatalError
+instead.
+
+Retrying the ioctl as long as it fails with errno == EINTR fixes the
+problem and allows server regenerations to trigger VT switches that
+actually succeed.
+
+Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+Reviewed-by: Cyril Brulebois <kibi at debian.org>
+Signed-off-by: Keith Packard <keithp at keithp.com>
+(cherry picked from commit 88c4622b594a1725d0cee86bc82ad640d241c520)
+---
+diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
+index 9c71a42..77dfb2f 100644
+--- a/hw/xfree86/os-support/linux/lnx_init.c
++++ b/hw/xfree86/os-support/linux/lnx_init.c
+@@ -62,17 +62,21 @@ drain_console(int fd, void *closure)
+ static void
+ switch_to(int vt, const char *from)
+ {
+-    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0)
+-        FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
++    int ret;
+ 
+-    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0)
+-        FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
++    SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
++    if (ret < 0)
++	FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
++
++    SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
++    if (ret < 0)
++	FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
+ }
+ 
+ void
+ xf86OpenConsole(void)
+ {
+-    int i, fd = -1;
++    int i, fd = -1, ret;
+     struct vt_mode VT;
+     struct vt_stat vts;
+     MessageType from = X_PROBED;
+@@ -107,17 +111,19 @@ xf86OpenConsole(void)
+ 
+             if (ShareVTs)
+             {
+-                if (ioctl(fd, VT_GETSTATE, &vts) == 0)
+-                    xf86Info.vtno = vts.v_active;
+-                else
+-                    FatalError("xf86OpenConsole: Cannot find the current"
+-                               " VT (%s)\n", strerror(errno));
++		SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts));
++		if (ret < 0)
++		    FatalError("xf86OpenConsole: Cannot find the current"
++			       " VT (%s)\n", strerror(errno));
++                xf86Info.vtno = vts.v_active;
+             } else {
+-	        if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
+-		    (xf86Info.vtno == -1))
+-		    FatalError("xf86OpenConsole: Cannot find a free VT: %s\n",
+-                               strerror(errno));
+-            }
++		SYSCALL(ret = ioctl(fd, VT_OPENQRY, &xf86Info.vtno));
++		if (ret < 0)
++		    FatalError("xf86OpenConsole: Cannot find a free VT: "
++			       "%s\n", strerror(errno));
++		if (xf86Info.vtno == -1)
++		    FatalError("xf86OpenConsole: Cannot find a free VT\n");
++	    }
+ 	    close(fd);
+ 	}
+ 
+@@ -159,7 +165,8 @@ xf86OpenConsole(void)
+ 	 * Linux doesn't switch to an active vt after the last close of a vt,
+ 	 * so we do this ourselves by remembering which is active now.
+ 	 */
+-	if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts) < 0)
++	SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts));
++	if (ret < 0)
+ 	    xf86Msg(X_WARNING,"xf86OpenConsole: VT_GETSTATE failed: %s\n",
+ 		    strerror(errno));
+ 	else
+@@ -171,7 +178,7 @@ xf86OpenConsole(void)
+ 	     * Detach from the controlling tty to avoid char loss
+ 	     */
+ 	    if ((i = open("/dev/tty",O_RDWR)) >= 0) {
+-		ioctl(i, TIOCNOTTY, 0);
++		SYSCALL(ioctl(i, TIOCNOTTY, 0));
+ 		close(i);
+ 	    }
+ 	}
+@@ -186,9 +193,10 @@ xf86OpenConsole(void)
+ 	     */
+             switch_to(xf86Info.vtno, "xf86OpenConsole");
+ 
+-	    if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
+-	        FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
+-		           strerror(errno));
++	    SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
++	    if (ret < 0)
++		FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
++			   strerror(errno));
+ 
+ 	    signal(SIGUSR1, xf86VTRequest);
+ 
+@@ -196,20 +204,23 @@ xf86OpenConsole(void)
+ 	    VT.relsig = SIGUSR1;
+ 	    VT.acqsig = SIGUSR1;
+ 
+-	    if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
+-	        FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n",
++	    SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
++	    if (ret < 0)
++		FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n",
+ 		    strerror(errno));
+-	
+-	    if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
+-	        FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
+-		           strerror(errno));
++
++	    SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
++	    if (ret < 0)
++		FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n",
++			   strerror(errno));
+ 
+             tcgetattr(xf86Info.consoleFd, &tty_attr);
+-            ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
++	    SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode));
+ 
+-            if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0)
+-                FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+-                        strerror(errno));
++	    SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
++	    if (ret < 0)
++		FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
++			strerror(errno));
+ 
+             nTty = tty_attr;
+             nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
+@@ -241,6 +252,7 @@ void
+ xf86CloseConsole(void)
+ {
+     struct vt_mode   VT;
++    int ret;
+ 
+     if (ShareVTs) {
+         close(xf86Info.consoleFd);
+@@ -253,20 +265,23 @@ xf86CloseConsole(void)
+     };
+ 
+     /* Back to text mode ... */
+-    if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0)
++    SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
++    if (ret < 0)
+ 	xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
+ 		strerror(errno));
+ 
+-    ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
++    SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
+     tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+ 
+-    if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) 
++    SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
++    if (ret < 0)
+ 	xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
+ 		strerror(errno));
+     else {
+ 	/* set dflt vt handling */
+ 	VT.mode = VT_AUTO;
+-	if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) 
++	SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT));
++	if (ret < 0)
+ 	    xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n",
+ 		    strerror(errno));
+     }
+--
+cgit v0.8.3-6-g21f6

Deleted: glx-pixmap-crash.patch
===================================================================
--- glx-pixmap-crash.patch	2011-05-30 07:26:22 UTC (rev 125805)
+++ glx-pixmap-crash.patch	2011-05-30 08:22:14 UTC (rev 125806)
@@ -1,85 +0,0 @@
-From 390ba6686d1baf80627c01d4a4273981d6606cc9 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax at redhat.com>
-Date: Mon, 28 Mar 2011 16:30:09 +0000
-Subject: glx: Fix lifetime tracking for pixmaps
-
-GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
-IDs can be destroyed in either order with no error.  Only windows need
-to be tracked under both XIDs.
-
-Fixes piglit/glx-pixmap-life.
-
-Reviewed-by: Michel Dänzer <michel at daenzer.net>
-Signed-off-by: Adam Jackson <ajax at redhat.com>
----
-diff --git a/glx/glxcmds.c b/glx/glxcmds.c
-index 66d4c7e..d5b764f 100644
---- a/glx/glxcmds.c
-+++ b/glx/glxcmds.c
-@@ -1127,10 +1127,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen,
- 	return BadAlloc;
-     }
- 
--    /* Add the glx drawable under the XID of the underlying X drawable
--     * too.  That way we'll get a callback in DrawableGone and can
--     * clean up properly when the drawable is destroyed. */
--    if (drawableId != glxDrawableId &&
-+    /*
-+     * Windows aren't refcounted, so track both the X and the GLX window
-+     * so we get called regardless of destruction order.
-+     */
-+    if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
- 	!AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
- 	pGlxDraw->destroy (pGlxDraw);
- 	return BadAlloc;
-@@ -1161,6 +1162,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config
-     err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
- 			      glxDrawableId, GLX_DRAWABLE_PIXMAP);
- 
-+    ((PixmapPtr)pDraw)->refcnt++;
-+
-     return err;
- }
- 
-diff --git a/glx/glxext.c b/glx/glxext.c
-index 3f3dd79..9cfc096 100644
---- a/glx/glxext.c
-+++ b/glx/glxext.c
-@@ -118,15 +118,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
- {
-     __GLXcontext *c, *next;
- 
--    /* If this drawable was created using glx 1.3 drawable
--     * constructors, we added it as a glx drawable resource under both
--     * its glx drawable ID and it X drawable ID.  Remove the other
--     * resource now so we don't a callback for freed memory. */
--    if (glxPriv->drawId != glxPriv->pDraw->id) {
--	if (xid == glxPriv->drawId)
--	    FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
--	else
--	    FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
-+    if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
-+        /* If this was created by glXCreateWindow, free the matching resource */
-+        if (glxPriv->drawId != glxPriv->pDraw->id) {
-+            if (xid == glxPriv->drawId)
-+                FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
-+            else
-+                FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
-+        }
-+        /* otherwise this window was implicitly created by MakeCurrent */
-     }
- 
-     for (c = glxAllContexts; c; c = next) {
-@@ -143,6 +143,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
- 	    c->readPriv = NULL;
-     }
- 
-+    /* drop our reference to any backing pixmap */
-+    if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
-+        glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw);
-+
-     glxPriv->destroy(glxPriv);
- 
-     return True;
---
-cgit v0.8.3-6-g21f6




More information about the arch-commits mailing list