diff options
Diffstat (limited to 'extra/xorg-server')
-rw-r--r-- | extra/xorg-server/PKGBUILD | 34 | ||||
-rw-r--r-- | extra/xorg-server/autoconfig-nvidia.patch | 104 | ||||
-rw-r--r-- | extra/xorg-server/git-fixes.patch | 318 |
3 files changed, 445 insertions, 11 deletions
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD index 20913828a..03dbc50e1 100644 --- a/extra/xorg-server/PKGBUILD +++ b/extra/xorg-server/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 114590 2011-03-14 10:49:00Z jgc $ +# $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.9.4.901 +pkgver=1.10.2 pkgrel=1 arch=('i686' 'x86_64') license=('custom') @@ -11,25 +11,37 @@ 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') options=('!libtool') source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2 - vbe-fix-malloc-size-bug.patch + git-fixes.patch + bg-none-revert.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) -md5sums=('0fde9023db0581e9b145b4cd0784a3c5' - 'c22e6ec412769b1c30c44b1f45b50e02' - '1a336eb22e27cbf443ec5a2ecddfa93c' - '52fd3effd80d7bc6c1660d4ecf23d31c' - '376c70308715cd2643f7bff936d9934b' - 'd4f7dfc6be4ef4e2c6dd7632a9d88abe') +sha1sums=('fd831b3c6297d1a68830c602d767752d87b9ca54' + '6dd2bcd9d8b17d1a50ed8c15eb1cba480558e695' + '629c6d8d52126eab81ee1b72a9e4209535f8cb81' + '1b95e91384a57d966428c7db98ed06f4cc562f91' + '0efcdf61bde3c0cd813072b94e2b30ab922775b9' + 'f9328fd7bc931bb02c8909ecfcef35403de33782' + 'c94f742d3f9cabf958ae58e4015d9dd185aabedc' + '6838fc00ef4618c924a77e0fb03c05346080908a' + '993798f3d22ad672d769dae5f48d1fa068d5578f') build() { cd "${srcdir}/${pkgbase}-${pkgver}" patch -Np1 -i "${srcdir}/vbe-fix-malloc-size-bug.patch" - # Get rid of the ugly pattern - patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" + # Patches from ~ajax/xserver xserver-next branch + patch -Np1 -i "${srcdir}/bg-none-revert.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" ./configure --prefix=/usr \ --enable-ipv6 \ 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 |