summaryrefslogtreecommitdiff
path: root/extra/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'extra/xorg-server')
-rw-r--r--extra/xorg-server/PKGBUILD19
-rw-r--r--extra/xorg-server/autoconfig-nvidia.patch104
-rw-r--r--extra/xorg-server/git-fixes.patch318
3 files changed, 435 insertions, 6 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD
index b48bbea7f..7448e3fb5 100644
--- a/extra/xorg-server/PKGBUILD
+++ b/extra/xorg-server/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 119887 2011-04-16 12:07:45Z andyrtr $
+# $Id: PKGBUILD 125806 2011-05-30 08:22:14Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
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 @@ url="http://xorg.freedesktop.org"
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,7 +39,12 @@ build() {
# 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 \
diff --git a/extra/xorg-server/autoconfig-nvidia.patch b/extra/xorg-server/autoconfig-nvidia.patch
new file mode 100644
index 000000000..c56586d54
--- /dev/null
+++ b/extra/xorg-server/autoconfig-nvidia.patch
@@ -0,0 +1,104 @@
+From a685b5cf34532cef96fc9b05f735088ac0c0c7ad Mon Sep 17 00:00:00 2001
+From: Fedora X Ninjas <x@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;
diff --git a/extra/xorg-server/git-fixes.patch b/extra/xorg-server/git-fixes.patch
new file mode 100644
index 000000000..3eadd81ba
--- /dev/null
+++ b/extra/xorg-server/git-fixes.patch
@@ -0,0 +1,318 @@
+From 613e0e9ef74c4542ed458200165adbcdfdf3cd17 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu@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@novell.com>
+Reviewd-by: Keith Packard <keithp@keithp.com>
+Signed-off-by: Keith Packard <keithp@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@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@nvidia.com>
+Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+Tested-by: Robert Hooker <robert.hooker@canonical.com>
+Tested-by: Kent Baxley <kent.baxley@canonical.com>
+Signed-off-by: Keith Packard <keithp@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@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@nvidia.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Cyril Brulebois <kibi@debian.org>
+Signed-off-by: Keith Packard <keithp@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