COPYING | 793 +--------- ChangeLog | 333 ++++ Xext/geext.c | 2 Xext/panoramiX.c | 6 configure.ac | 4 debian/changelog | 17 debian/patches/Change-default-for-ExaOptimizeMigration-to-false.diff | 38 debian/patches/series | 1 debian/serverminver | 2 dix/devices.c | 2 dix/events.c | 2 doc/Xserver.man.pre | 2 exa/exa_accel.c | 35 exa/exa_glyphs.c | 73 exa/exa_priv.h | 10 exa/exa_render.c | 2 exa/exa_unaccel.c | 2 glx/glxcmds.c | 44 glx/glxdrawable.h | 3 glx/glxdri.c | 2 glx/glxdri2.c | 51 hw/kdrive/src/kinput.c | 4 hw/xfree86/common/Makefile.am | 2 hw/xfree86/common/xf86Config.c | 5 hw/xfree86/ddc/print_edid.c | 6 hw/xfree86/doc/man/xorg.conf.man.pre | 11 hw/xfree86/dri2/dri2.c | 253 ++- hw/xfree86/dri2/dri2.h | 21 hw/xfree86/dri2/dri2ext.c | 6 hw/xfree86/exa/examodule.c | 2 hw/xfree86/loader/loader.c | 2 hw/xfree86/parser/Makefile.am | 10 hw/xfree86/ramdac/xf86Cursor.c | 6 os/xdmcp.c | 4 randr/randr.c | 11 randr/rrcrtc.c | 5 randr/rrscreen.c | 4 xkb/xkb.c | 8 38 files changed, 867 insertions(+), 917 deletions(-)
New commits: commit fb82f081f5e028c3edd8a74c716e1a222f8636e6 Author: Brice Goglin <bgog...@debian.org> Date: Mon Jul 13 23:35:17 2009 +0200 Prepare Changelog for upload diff --git a/debian/changelog b/debian/changelog index f520113..c05d3c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xorg-server (2:1.6.2-1) UNRELEASED; urgency=low +xorg-server (2:1.6.2-1) unstable; urgency=low [ Brice Goglin ] * New upstream release. @@ -19,7 +19,7 @@ xorg-server (2:1.6.2-1) UNRELEASED; urgency=low * xserver-xorg-core.bug.script: add a newline between X log and lshal output. - -- Brice Goglin <bgog...@debian.org> Mon, 13 Jul 2009 23:25:22 +0200 + -- Brice Goglin <bgog...@debian.org> Mon, 13 Jul 2009 23:35:13 +0200 xorg-server (2:1.6.1.901-3) unstable; urgency=low commit c0c0610b6ad2ff99284f61dfe42520b7d6a5dc69 Author: Brice Goglin <bgog...@debian.org> Date: Mon Jul 13 23:31:03 2009 +0200 New upstream release diff --git a/ChangeLog b/ChangeLog index ccf2e0f..c0b8045 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,336 @@ +commit 606f6dba16d42e3546a82a386d5a01087467b511 +Author: Adam Jackson <a...@redhat.com> +Date: Tue Apr 14 10:54:25 2009 -0400 + + xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) + + You could be more clever than this, but the wire protocol says this + really is an array of not more than 255 ARRAY8, so it's not just a + matter of changing the types. + + (cherry picked from commit 0eb19f9437b7d8c19592e49eedb028771d300d80) + +commit 396d3a7762abd0dd84042833b75f2ebf9d100bb0 +Author: Alan Coopersmith <alan.coopersm...@sun.com> +Date: Wed Jul 8 11:26:46 2009 -0700 + + Fix build of drivers with 1.6.2 when not using --install-libxf86config + + c859b736d1d23c5dc2f53958b1e76660e6d45018 removed duplicate entries for + these from the Makefile, but removed a different set than was done in + master branch, causing xf86Parser.h to not be installed, which in turn + breaks the build of drivers like -ati, -intel & -nv that use xf86Modes.h, + which includes xf86Parser.h + + Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 6f1aff5a2b45bc2985081abc240a8fed37170386 +Author: Keith Packard <kei...@keithp.com> +Date: Mon Jul 6 14:08:31 2009 -0700 + + Bump to version 1.6.2 + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 499f9f62e408510ed4efb6f2321a3f851f535567 +Author: Keith Packard <kei...@keithp.com> +Date: Wed Jul 1 14:01:57 2009 -0700 + + dri2: Preserve compatibility with 1.6 DRI2 API/ABI + + The old DRI2 buffer allocation API wasn't great, but there's no reason to + make the server stop working with those drivers. This patch has the + X server adapting to the API provided by the driver, using the new API where + available and falling back to the old API as necessary. A warning will be + placed in the log file when the old API is in use. + (cherry picked from commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit c859b736d1d23c5dc2f53958b1e76660e6d45018 +Author: Arkadiusz Miskiewicz <ar...@maven.pl> +Date: Fri Jul 3 11:03:32 2009 +0200 + + xfree86: remove duplicate header entries in Makefile.am + + fixes https://bugs.freedesktop.org/show_bug.cgi?id=22547 + + This bug was fixed in a big clean-up commit in master, which cannot be + backported (see commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3) + + Signed-off-by: Rémi Cardona <r...@gentoo.org> + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 6f82ca0f8bfc074474407cb5ffe782c3c128f838 +Author: Alan Hourihane <al...@vmware.com> +Date: Mon Feb 16 11:39:34 2009 +0000 + + dri2: support glXWaitGL & glXWaitX by copying fake front to front and + vice-versa. + (cherry picked from commit 2a8b8077d8f6001eb57deba60e1009fc99c28668) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit d478bc948838d11b3abcf6d2cdd3a00dccb344c4 +Author: Eric Anholt <e...@anholt.net> +Date: Tue Feb 17 09:59:17 2009 -0800 + + xinerama: Put the proto version in the code instead using proto headers. + + Proto headers updating resulting in the server advertising new versions is + broken. This should be applied to every extension. + + This fixes the build against slightly-older xineramaproto. + (cherry picked from commit b349a764e98f0d8f221190157ffa0904b91beca5) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit a7a93c12f91e0de72868f17a555215f1795d9e2f +Author: Keith Packard <kei...@keithp.com> +Date: Mon Jun 29 23:18:55 2009 -0700 + + Build against DRI_TEX_BUFFER_VERSION 1 + + setTexBuffer2 isn't present in this version of the structure, so don't try + to call it. + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 5b49aff4f8b5e4d15bc883f74509d93324f09f5f +Author: Keith Packard <kei...@keithp.com> +Date: Mon Jun 29 14:40:46 2009 -0700 + + Bump version to 1.6.1.902 + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit e97cabce4abdaf6b83d1a442f7972d4c45979b33 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Wed Mar 25 12:55:42 2009 +1000 + + xfree86: fix SWCursor check in xf86CursorSetCursor. + + Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when + the pointer left the screen (in a Xinerama setup). + We must call the sprite rendering function if + - SW cursors are enabled, or + - The current device is not the VCP and not attached to the VCP. + + Backported from commit 66089e9129a821cfb1983d3d35f41b975a52de5e for + server-1.6-branch by Peter Hutterer + + Reported-by: Gordon Yuan <gordony...@viatech.com.cn> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 17c5b2caf01deec1d1be9fc2ac68a3d636e64c44 +Author: Julien Cristau <jcris...@debian.org> +Date: Mon May 18 19:01:46 2009 +0200 + + Change default for ExaOptimizeMigration to false + + Quoting Michel Dänzer in <1234862541.4823.541.ca...@thor>: + + Unfortunately, there are still bugs left in EXA which prevent it from + working 100% correctly with the option enabled, see + + http://bugs.freedesktop.org/show_bug.cgi?id=16416 + + http://bugs.freedesktop.org/show_bug.cgi?id=19940 + + So disable it for now to avoid corruption. + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 8d65439d5c950ea01ec8e1e4dd989aff0fb4c3f0 +Author: Keith Packard <kei...@keithp.com> +Date: Thu May 28 14:43:27 2009 -0700 + + Make RANDR 'set' timestamps follow client specified time. Bug 21987. + + The lastSetTime value which indicates when the configuration within the + server was last changed was not getting set in the appropriate RandR + requests. + + Signed-off-by: Keith Packard <kei...@keithp.com> + (cherry picked from commit 69a9545d1f8110841538410818df19fd960412c5) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit d98f2792d2f523d7397eac70cc021761e9561219 +Author: Federico Mena Quintero <feder...@novell.com> +Date: Tue Jun 9 13:28:28 2009 -0700 + + dix/randr: Add missing fields to SRR*NotifyEvent() + + Also, remove redundant field swaps and make others match the order in which + they are declared in the xRR*NotifyEvent structs. + + Signed-off-by: Federico Mena Quintero <feder...@novell.com> + Signed-off-by: Keith Packard <kei...@keithp.com> + (cherry picked from commit e244a5991e2cc55f5aa2f6e5255f1dabf56f0235) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit f697b6c582095aa1eec3244fa05835922249425b +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Mon May 11 12:53:56 2009 +1000 + + kdrive: set Activate/Deactivate grab for input devices (#21591) + + X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591> + (cherry picked from commit b1b5ec45c1cb650ccb8c659218f9481379c777d9) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit c91accd173b5f17af771bd9f4e60b5860af15718 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Mon May 11 12:51:40 2009 +1000 + + dix: ensure Activate/DeactivateGrab has a valid value. + + Xephyr doesn't manually set Activate/DeactivateGrab for new devices, + resulting in a NULL-pointer dereference later when a grab is activated. + Avoid the segfault by ensuring that the pointer is always valid. + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + (cherry picked from commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit bd94c7c986aed4496cd4e8141bb30c3e4412f1f4 +Author: Alan Coopersmith <alan.coopersm...@sun.com> +Date: Tue May 12 16:11:01 2009 -0700 + + Resync COPYING file with notices in code base as of xorg-server-1.6.1 + + Remove notices for code no longer in tree (Xprint, Xgl, kdrive, cfb, etc.) + Add/update notices for new/changed code in tree + + Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> + (cherry picked from commit b746a00cffca5c553b607a8e9c1074294a23b443) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 597747c6551cd67487069415297e5eb441038321 +Author: Jeremy Huddleston <jerem...@freedesktop.org> +Date: Sat May 9 11:42:17 2009 -0700 + + Fix a couple off-by-one array boundary checks. + + Error: Write outside array bounds at Xext/geext.c:406 + in function 'GEWindowSetMask' [Symbolic analysis] + In array dereference of cli->nextSib[extension] with index 'extension' + Array size is 128 elements (of 4 bytes each), index <= 128 + + Error: Buffer overflow at dix/events.c:592 + in function 'SetMaskForEvent' [Symbolic analysis] + In array dereference of filters[deviceid] with index 'deviceid' + Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 + + Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 + in function 'LoaderOpen' [Symbolic analysis] + In array dereference of refCount[new_handle] with index 'new_handle' + Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 + + These bugs were found using the Parfait source code analysis tool. + For more information see http://research.sun.com/projects/parfait + + Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> + Signed-off-by: Adam Jackson <a...@redhat.com> + Acked-by: Peter Hutterer <peter.hutte...@who-t.net> + (cherry picked from commit b680bda34da130ce408783f04214771471e41e8d) + (cherry picked from commit 04c9e80f083659e63cffec8969fb3a0cfc551a97) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 10c06ddeefccc195e70adfed664e9488eeb53804 +Author: Peter Hutterer <peter.hutte...@who-t.net> +Date: Thu Apr 9 15:40:24 2009 +1000 + + xfree86: restore default off for DontZap + + Zapping is triggered by xkb these days, so note in the man page that it's the + Terminate_Server action. Since it's XKB, personal preferences towards or + against zapping should be achieved through xkb rulesets. + If Terminate_Server is not in the xkb actions, then we can't zap anyway and we + don't need a default of DontZap "on". + + This patch restores the old meaning of DontZap - disallow zapping altogether, + regardless of XKB's current keymap. + Ideally, this patch should be accompanied by b0f64bdab00db652e in + xkeyboard-config. + + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + (cherry picked from commit 737b49199a05299486064e6e762cf2a2f6f95be6) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 966349f8e068fa120470549b0db9a8fcf88aca5b +Author: Michel Dänzer <daen...@vmware.com> +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Always damage glyph cache pixmap manually after uploading a glyph. + + Signed-off-by: Michel Dänzer <daen...@vmware.com> + (cherry picked from commit 7c8327f0a75087a85864256a9cea80dd4b86def5) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit cc5e4b632aa99623ff577776039287c5950d921d +Author: Michel Dänzer <daen...@vmware.com> +Date: Fri May 15 15:48:37 2009 +0200 + + EXA: Take GC client clip type into account for migration. + + Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . + + Signed-off-by: Michel Dänzer <daen...@vmware.com> + (cherry picked from commit 850675d4de4373e5df95507dbf2cd9affaaf54bc) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit bbe0be1e459b0d5810a0e7b916cc890c440a4e21 +Author: Tomas Janousek <t...@nomi.cz> +Date: Wed May 20 15:03:01 2009 +0200 + + Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. + + In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and + .totalVModMapKeys were not initialized, contained random values and caused + accesses to unallocated and later modified memory, causing + XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of + nonzero values, resulting in writes past the end of an array in XkbSendMap. + + This patch initializes those values sensibly and reverts commits 5c0a2088 and + 6dd4fc46, which have been plain non-sense. + + Signed-off-by: Tomas Janousek <t...@nomi.cz> + Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> + (cherry picked from commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 6056d429e7dcc37fe706dd7bc8d3429fdb635e14 +Author: Kristian Høgsberg <k...@redhat.com> +Date: Wed Apr 1 17:42:33 2009 -0400 + + Support setTexBuffer2 in AIGLX. + + Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined + alpha channel for pixmaps. + (cherry picked from commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6) + + Signed-off-by: Keith Packard <kei...@keithp.com> + +commit 7cae08d21952b02ef664641af6588ef6bd727bf8 +Author: Adam Jackson <a...@redhat.com> +Date: Mon Jun 29 11:16:16 2009 -0400 + + EDID: Fix timing class names to match the spec + (cherry picked from commit 5c1afac5eea1d8327c74342d12d082b75f0cebde) + commit dbac41b624e4aa86a6a184b7ebb52bfdd367bbf0 Author: Adam Jackson <a...@redhat.com> Date: Fri Jun 19 12:42:07 2009 -0400 diff --git a/debian/changelog b/debian/changelog index b22c1d0..f520113 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,25 @@ -xorg-server (2:1.6.1.901-4) UNRELEASED; urgency=low +xorg-server (2:1.6.2-1) UNRELEASED; urgency=low - * Bump serverminver to 2:1.6.1.901-3 for the dri2 upstream changes in the + [ Brice Goglin ] + * New upstream release. + + Fixes dri2 madness introduced in previous upload + (closes: #534522, #536019, #534766, #534771, #534890). + + Fixes xkb bogus length in write keyboard desc, closes: #529625. + + Fixes SWCursor being multiply rendered, closes: #526260. + + Drop Change-default-for-ExaOptimizeMigration-to-false.diff, + applied upstream. + + Pull upstream server-1.6-branch up to commit 606f6dba. + * Bump serverminver to 2:1.6.2 for the dri2 upstream changes in the previous upload. + + [ Julien Cristau ] * Bump xserver-xorg-dev's dependency on dri2proto to >= 2.1 for the same reason. * Don't set PCI_TXT_IDS_DIR, we don't use that anymore. * xserver-xorg-core.bug.script: add a newline between X log and lshal output. - -- Julien Cristau <jcris...@debian.org> Wed, 24 Jun 2009 11:59:58 +0200 + -- Brice Goglin <bgog...@debian.org> Mon, 13 Jul 2009 23:25:22 +0200 xorg-server (2:1.6.1.901-3) unstable; urgency=low diff --git a/debian/patches/Change-default-for-ExaOptimizeMigration-to-false.diff b/debian/patches/Change-default-for-ExaOptimizeMigration-to-false.diff deleted file mode 100644 index 41930f9..0000000 --- a/debian/patches/Change-default-for-ExaOptimizeMigration-to-false.diff +++ /dev/null @@ -1,38 +0,0 @@ -From f9dd45e7b88a64892961a481678688dffd58c74c Mon Sep 17 00:00:00 2001 -From: Julien Cristau <jcris...@debian.org> -Date: Mon, 18 May 2009 19:01:46 +0200 -Subject: [PATCH] Change default for ExaOptimizeMigration to false -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 8bit - -Quoting Michel Dänzer in <1234862541.4823.541.ca...@thor>: - - Unfortunately, there are still bugs left in EXA which prevent it from - working 100% correctly with the option enabled, see - - http://bugs.freedesktop.org/show_bug.cgi?id=16416 - - http://bugs.freedesktop.org/show_bug.cgi?id=19940 - -So disable it for now to avoid corruption. ---- - hw/xfree86/exa/examodule.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c -index 601288c..27607a1 100644 ---- a/hw/xfree86/exa/examodule.c -+++ b/hw/xfree86/exa/examodule.c -@@ -146,7 +146,7 @@ exaDDXDriverInit(ScreenPtr pScreen) - pExaScr->optimize_migration = - xf86ReturnOptValBool(pScreenPriv->options, - EXAOPT_OPTIMIZE_MIGRATION, -- TRUE); -+ FALSE); - } - - if (xf86ReturnOptValBool(pScreenPriv->options, --- -1.6.2.4 - diff --git a/debian/patches/series b/debian/patches/series index 1af063f..e88aa73 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,7 +4,6 @@ kfreebsd-ftbfs.diff 0001-xorg.conf-5-refer-to-mousedrv-4-.-Debian-394058.patch Turn-on-ModeDebug-by-default.patch -Change-default-for-ExaOptimizeMigration-to-false.diff Add-libgcrypt-as-an-option-for-sha1.diff fedora-bad-fbdev-thats-mine.patch fedora-pci-primary.diff diff --git a/debian/serverminver b/debian/serverminver index 1debf10..7e5df81 100644 --- a/debian/serverminver +++ b/debian/serverminver @@ -1 +1 @@ -2:1.6.1.901-3 +2:1.6.2 commit 606f6dba16d42e3546a82a386d5a01087467b511 Author: Adam Jackson <a...@redhat.com> Date: Tue Apr 14 10:54:25 2009 -0400 xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) You could be more clever than this, but the wire protocol says this really is an array of not more than 255 ARRAY8, so it's not just a matter of changing the types. (cherry picked from commit 0eb19f9437b7d8c19592e49eedb028771d300d80) diff --git a/os/xdmcp.c b/os/xdmcp.c index 736cd3e..746f598 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -491,7 +491,9 @@ XdmcpRegisterConnection ( return; } } - newAddress = (CARD8 *) xalloc (addrlen * sizeof (CARD8)); + if (ConnectionAddresses.length + 1 == 256) + return; + newAddress = xalloc (addrlen * sizeof (CARD8)); if (!newAddress) return; if (!XdmcpReallocARRAY16 (&ConnectionTypes, ConnectionTypes.length + 1)) commit 396d3a7762abd0dd84042833b75f2ebf9d100bb0 Author: Alan Coopersmith <alan.coopersm...@sun.com> Date: Wed Jul 8 11:26:46 2009 -0700 Fix build of drivers with 1.6.2 when not using --install-libxf86config c859b736d1d23c5dc2f53958b1e76660e6d45018 removed duplicate entries for these from the Makefile, but removed a different set than was done in master branch, causing xf86Parser.h to not be installed, which in turn breaks the build of drivers like -ati, -intel & -nv that use xf86Modes.h, which includes xf86Parser.h Signed-off-by: Alan Coopersmith <alan.coopersm...@sun.com> Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am index 6ed1814..a2774a4 100644 --- a/hw/xfree86/parser/Makefile.am +++ b/hw/xfree86/parser/Makefile.am @@ -1,8 +1,5 @@ if INSTALL_LIBXF86CONFIG lib_LIBRARIES = libxf86config.a -LIBHEADERS = \ - xf86Optrec.h \ - xf86Parser.h else noinst_LIBRARIES = libxf86config.a endif @@ -30,9 +27,8 @@ AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ - xf86Optrec.h \ - xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - $(LIBHEADERS) + xf86Optrec.h \ + xf86Parser.h commit 6f1aff5a2b45bc2985081abc240a8fed37170386 Author: Keith Packard <kei...@keithp.com> Date: Mon Jul 6 14:08:31 2009 -0700 Bump to version 1.6.2 Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/configure.ac b/configure.ac index 339172f..71cc30c 100644 --- a/configure.ac +++ b/configure.ac @@ -26,12 +26,12 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.6.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.6.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE -RELEASE_DATE="2009-6-29" +RELEASE_DATE="2009-7-7" dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. commit 499f9f62e408510ed4efb6f2321a3f851f535567 Author: Keith Packard <kei...@keithp.com> Date: Wed Jul 1 14:01:57 2009 -0700 dri2: Preserve compatibility with 1.6 DRI2 API/ABI The old DRI2 buffer allocation API wasn't great, but there's no reason to make the server stop working with those drivers. This patch has the X server adapting to the API provided by the driver, using the new API where available and falling back to the old API as necessary. A warning will be placed in the log file when the old API is in use. (cherry picked from commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca) Signed-off-by: Keith Packard <kei...@keithp.com> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 385c5e8..580383d 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -53,7 +53,7 @@ typedef struct _DRI2Drawable { unsigned int refCount; int width; int height; - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int bufferCount; unsigned int pendingSequence; } DRI2DrawableRec, *DRI2DrawablePtr; @@ -63,6 +63,10 @@ typedef struct _DRI2Screen { const char *deviceName; int fd; unsigned int lastSequence; + + DRI2CreateBuffersProcPtr CreateBuffers; + DRI2DestroyBuffersProcPtr DestroyBuffers; + DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; @@ -133,17 +137,17 @@ DRI2CreateDrawable(DrawablePtr pDraw) } static int -find_attachment(DRI2BufferPtr *buffer_list, int count, unsigned attachment) +find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) { int i; - if (buffer_list == NULL) { + if (pPriv->buffers == NULL) { return -1; } - for (i = 0; i < count; i++) { - if ((buffer_list[i] != NULL) - && (buffer_list[i]->attachment == attachment)) { + for (i = 0; i < pPriv->bufferCount; i++) { + if ((pPriv->buffers[i] != NULL) + && (pPriv->buffers[i]->attachment == attachment)) { return i; } } @@ -151,16 +155,16 @@ find_attachment(DRI2BufferPtr *buffer_list, int count, unsigned attachment) return -1; } -static DRI2BufferPtr +static DRI2Buffer2Ptr allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, DRI2DrawablePtr pPriv, unsigned int attachment, unsigned int format, int dimensions_match) { - DRI2BufferPtr buffer; + DRI2Buffer2Ptr buffer; int old_buf; - old_buf = find_attachment(pPriv->buffers, pPriv->bufferCount, attachment); + old_buf = find_attachment(pPriv, attachment); if ((old_buf < 0) || !dimensions_match @@ -174,14 +178,14 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, return buffer; } -static DRI2BufferPtr * +static DRI2Buffer2Ptr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, int has_format) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); - DRI2BufferPtr *buffers; + DRI2Buffer2Ptr *buffers; int need_real_front = 0; int need_fake_front = 0; int have_fake_front = 0; @@ -193,68 +197,156 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, buffers = xalloc((count + 1) * sizeof(buffers[0])); - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - const unsigned format = (has_format) ? *(attachments++) : 0; + if (ds->CreateBuffer) { + /* Version 2 API with CreateBuffer */ + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + const unsigned format = (has_format) ? *(attachments++) : 0; + + buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, + format, dimensions_match); + + /* If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the case + * where the client requests both the fake and real front-buffer. + */ + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; + } + + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; + + if (pDraw->type == DRAWABLE_WINDOW) { + need_fake_front++; + } + } - buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, - format, dimensions_match); + if (pDraw->type == DRAWABLE_WINDOW) { + if (attachment == DRI2BufferFakeFrontLeft) { + need_fake_front--; + have_fake_front = 1; + } + } + } + if (need_real_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFrontLeft, + front_format, dimensions_match); + } - /* If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the case - * where the client requests both the fake and real front-buffer. - */ - if (attachment == DRI2BufferBackLeft) { - need_real_front++; - front_format = format; + if (need_fake_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFakeFrontLeft, + front_format, dimensions_match); + have_fake_front = 1; } - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - front_format = format; + *out_count = i; - if (pDraw->type == DRAWABLE_WINDOW) { - need_fake_front++; + + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } } + + xfree(pPriv->buffers); + } + } else { + DRI2BufferPtr buffers1; + unsigned int temp_buf[32]; + unsigned int *temp = temp_buf; + int i; + int buffers_match = 1; + + /* Version 1 API with CreateBuffers */ + + if ((count + 1) > 32) { + temp = xalloc((count + 1) * sizeof(temp[0])); } - if (pDraw->type == DRAWABLE_WINDOW) { - if (attachment == DRI2BufferFakeFrontLeft) { + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + + /* Version 1 doesn't deal with the format at all */ + if (has_format) + attachments++; + + /* + * Make sure the client also gets the front buffer when + * it asks for a back buffer + */ + if (attachment == DRI2BufferBackLeft) + need_real_front++; + + /* + * If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the + * case where the client requests both the fake and real + * front-buffer. + */ + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + if (pDraw->type == DRAWABLE_WINDOW) + need_fake_front++; + } + if (pDraw->type == DRAWABLE_WINDOW && + attachment == DRI2BufferFakeFrontLeft) + { need_fake_front--; have_fake_front = 1; } + + temp[i] = attachment; } - } - if (need_real_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFrontLeft, - front_format, dimensions_match); - } + if (need_real_front > 0) + temp[count++] = DRI2BufferFrontLeft; - if (need_fake_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFakeFrontLeft, - front_format, dimensions_match); - have_fake_front = 1; - } + if (need_fake_front > 0) { + temp[count++] = DRI2BufferFakeFrontLeft; + have_fake_front = 1; + } + + if (count != pPriv->bufferCount) + buffers_match = 0; + else { + for (i = 0; i < count; i++) + if (pPriv->buffers[i]->attachment != temp[i]) { + buffers_match = 0; + break; + } + } + if (pPriv->buffers == NULL || !dimensions_match || !buffers_match) + { + buffers1 = (*ds->CreateBuffers)(pDraw, temp, count); + if (pPriv->buffers != NULL) + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); + } + else + buffers1 = (DRI2BufferPtr) pPriv->buffers[0]; - *out_count = i; + for (i = 0; i < count; i++) + buffers[i] = (DRI2Buffer2Ptr) &buffers1[i]; + *out_count = count; - if (pPriv->buffers != NULL) { - for (i = 0; i < pPriv->bufferCount; i++) { - if (pPriv->buffers[i] != NULL) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } - } + if (pPriv->buffers) + xfree (pPriv->buffers); - xfree(pPriv->buffers); + if (temp != temp_buf) { + xfree(temp); + } } - pPriv->buffers = buffers; pPriv->bufferCount = *out_count; pPriv->width = pDraw->width; @@ -284,7 +376,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, return pPriv->buffers; } -DRI2BufferPtr * +DRI2Buffer2Ptr * DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -292,7 +384,7 @@ DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, out_count, FALSE); } -DRI2BufferPtr * +DRI2Buffer2Ptr * DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -318,13 +410,13 @@ DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i]->attachment == dest) - pDestBuffer = pPriv->buffers[i]; + pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; if (pPriv->buffers[i]->attachment == src) - pSrcBuffer = pPriv->buffers[i]; + pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; } if (pSrcBuffer == NULL || pDestBuffer == NULL) return BadValue; - + (*ds->CopyRegion)(pDraw, pRegion, pDestBuffer, pSrcBuffer); return Success; @@ -341,7 +433,7 @@ DRI2DestroyDrawable(DrawablePtr pDraw) pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return; - + pPriv->refCount--; if (pPriv->refCount > 0) return; @@ -349,8 +441,13 @@ DRI2DestroyDrawable(DrawablePtr pDraw) if (pPriv->buffers != NULL) { int i; - for (i = 0; i < pPriv->bufferCount; i++) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + if (ds->DestroyBuffer) { + for (i = 0; i < pPriv->bufferCount; i++) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } + } else { + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); } xfree(pPriv->buffers); @@ -409,18 +506,36 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) if (!ds) return FALSE; - if ((info->version < 2) - || (info->CreateBuffer == NULL) - || (info->DestroyBuffer == NULL)) { - return FALSE; - } - - ds->fd = info->fd; ds->driverName = info->driverName; ds->deviceName = info->deviceName; - ds->CreateBuffer = info->CreateBuffer; - ds->DestroyBuffer = info->DestroyBuffer; + + /* Prefer the new one-at-a-time buffer API */ + if (info->version >= 2 && info->CreateBuffer && info->DestroyBuffer) { + ds->CreateBuffer = info->CreateBuffer; + ds->DestroyBuffer = info->DestroyBuffer; + ds->CreateBuffers = NULL; + ds->DestroyBuffers = NULL; + } else if (info->CreateBuffers && info->DestroyBuffers) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Version 1 API (broken front buffer rendering)\n"); + ds->CreateBuffer = NULL; + ds->DestroyBuffer = NULL; + ds->CreateBuffers = info->CreateBuffers; + ds->DestroyBuffers = info->DestroyBuffers; + } else { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[DRI2] Missing buffer management functions\n"); + xfree(ds); + return FALSE; -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org