[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'ubuntu'



 Xi/exevents.c                  |    4 
 composite/compalloc.c          |    1 
 configure.ac                   |    4 
 dbe/midbe.c                    |   20 ++-
 debian/changelog               |   75 ++++++++++++
 debian/patches/15-nouveau.diff |    6 -
 debian/rules                   |    4 
 dix/devices.c                  |    6 -
 dix/resource.c                 |   10 +
 exa/exa_classic.c              |    3 
 glx/glxcmds.c                  |   23 ++-
 glx/glxdri.c                   |    8 -
 glx/glxdri2.c                  |   21 +--
 glx/glxdriswrast.c             |    8 -
 glx/glxscreens.h               |    6 -
 hw/xfree86/dri2/dri2.c         |  239 +++++++++++++++++++++++++----------------
 hw/xfree86/dri2/dri2.h         |    6 -
 hw/xfree86/dri2/dri2ext.c      |   40 ------
 hw/xnest/Cursor.c              |    3 
 include/list.h                 |    6 +
 mi/midispcur.c                 |   13 +-
 xkb/xkbUtils.c                 |    4 
 22 files changed, 314 insertions(+), 196 deletions(-)

New commits:
commit 7e1d8b813b90a4586f677e4775e91a98f89428bd
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Wed Jun 23 11:46:33 2010 +1000

    Fix version in changelog

diff --git a/debian/changelog b/debian/changelog
index f7d4a93..7828fe2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.8.1.902-1~ubuntu1) maverick; urgency=low
+xorg-server (2:1.8.1.902-0ubuntu1) maverick; urgency=low
 
   * Merge from (unreleased) Debian experimental.  Remaining changes:  
     - rules, control:

commit aef821540eac67a1c09ff64603ecd2883aaa072c
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Wed Jun 23 11:37:03 2010 +1000

    Update changelog for merge

diff --git a/debian/changelog b/debian/changelog
index e41c26f..f7d4a93 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,61 @@
 xorg-server (2:1.8.1.902-1~ubuntu1) maverick; urgency=low
 
   * Merge from (unreleased) Debian experimental.  Remaining changes:  
-
- --
+    - rules, control:
+      + Disable SELinux, libaudit-dev is not in main yet (LP 406226).
+        Drop libaudit-dev from build-deps.
+    - rules: Enable xcsecurity (LP 247537).
+    - local/xvfb-run*: Add correct docs about error codes (LP 328205)
+    - rules: Add --with-extra-module-dir to support GL alternatives.
+    - control: Xvfb depends on xauth, x11-xkb-utils. (LP 500102)
+    - rules, local/64-xorg-xkb.rules: Don't use keyboard-configuration
+      until it's available.
+    - control: Update some versioned Breaks for Ubuntu versions.
+    - debian/patches:
+      + 100_rethrow_signals.patch:
+        When aborting, re-raise signals for apport
+      + 109_fix-swcursor-crash.patch:
+        Avoid dereferencing null pointer while reloading cursors during
+        resume. (LP 371405)
+      + 111_armel-drv-fallbacks.patch:
+        Add support for armel driver fallbacks.
+      + 121_only_switch_vt_when_active.diff:
+        Add a check to prevent the X server from changing the VT when killing
+        GDM from the console.
+      + 122_xext_fix_card32_overflow_in_xauth.patch:
+        Fix server crash when “xauth generate” is called with large timeout.
+      + 157_check_null_modes.patch, 162_null_crtc_in_rotation.patch,
+        166_nullptr_xinerama_keyrepeat.patch, 167_nullptr_xisbread.patch
+        169_mipointer_nullptr_checks.patch,
+        172_cwgetbackingpicture_nullptr_check.patch:
+        Fix various segfaults in xserver by checking pointers for NULL
+        values before dereferencing them.
+      + 165_man_xorg_conf_no_device_ident.patch
+        Correct man page
+      + 168_glibc_trace_to_stderr.patch:
+        Report abort traces to stderr instead of terminal
+      + 184_virtual_devices_autodetect.patch:
+        Use vesa for qemu device, which is not supported by cirrus
+      + 187_edid_quirk_hp_nc8430.patch:
+        Quirk for another LPL monitor (LP 380009)
+      + 188_default_primary_to_first_busid.patch:
+        Pick the first device and carry on (LP 459512)
+      + 189_xserver_1.5.0_bg_none_root.patch:
+        Create a root window with no background.
+      + 190_cache-xkbcomp_output_for_fast_start_up.patch:
+        Cache keyboard settings.
+      + 191-Xorg-add-an-extra-module-path.patch:
+        Add support for the alternatives module path.
+      + 196_xvfb-fbscreeninit-handling.patch, 197_xvfb-randr.patch:
+        Adds xrandr support to xvfb. (LP 516123)
+      + 198_nohwaccess.patch:
+        Adds a -nohwaccess argument to make X not access the hardware
+        ports directly.
+      + 200_randr-null.patch:
+        Clarify a pointer initialization.
+  * Update changelog entries for previously unreleased Debian 1.8.1.901-1
+  
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Wed, 23 Jun 2010 11:19:49 +1000
 
 xorg-server (2:1.8.1.902-1) UNRELEASED; urgency=low
 

commit 6b4fcb844d3d76e6982fcb347bedb15596239083
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Tue Jun 22 11:47:07 2010 +1000

    Merge in new 1.8.2 RC for the selfish purpose of fixing glXSwapBuffers hang with dual-head

diff --git a/debian/changelog b/debian/changelog
index 62666cd..e8c6058 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,15 +1,18 @@
-xorg-server (2:1.8.1.901-2) UNRELEASED; urgency=low
+xorg-server (2:1.8.1.902-1) UNRELEASED; urgency=low
 
   [ Julien Cristau ]
   * Install the upstream changelog in xserver-common, instead of duplicating
     its 1MB in all other packages.
 
   [ Christopher James Halse Rogers ]
+  * New upstream RC
+    - A number of DRI2 fixes.
+    - Fix for hanging OpenGL clients with multiple heads.
   * 17-fix-DRI2-segfault-when-clientGone.diff:
     - Pick up fix from https://bugs.freedesktop.org/show_bug.cgi?id=27497 to
       fix server crash in DRI2SwapEvent handling (LP: #595182).
 
- -- Christopher James Halse Rogers <raof@ubuntu.com>  Fri, 18 Jun 2010 13:32:45 +1000
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Tue, 22 Jun 2010 11:45:01 +1000
 
 xorg-server (2:1.8.1.901-1) experimental; urgency=low
 

commit 2ae159bad4178bd0d0b4664b895e085835396ffc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jun 21 11:41:22 2010 +1000

    xserver 1.8.1.902
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 73a7b62..01d3d17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.8.1.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-05-11"
+AC_INIT([xorg-server], 1.8.1.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-06-21"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit cc9f6806ac0d45e122c24c0e99c1db70a6d5ca12
Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Date:   Sun Jun 13 18:05:26 2010 +0200

    DRI2/xserver: Don't hang in glXSwapBuffers if drawable moves between crtc's (bug 28383)
    
    Detect if a drawable has been moved from an original crtc to a new crtc
    with a lower current vblank count than the original crtc inbetween
    glXSwapBuffers() calls. Reinitialize drawable's last_swap_target
    before scheduling next swap if such a move has taken place.
    
    last_swap_target defines the baseline for scheduling the next swap.
    If a movement between crtc's is not taken into account, the swap may
    schedule for a vblank count on the new crtc far in the future, resulting
    in a apparent "hang" of the drawable for a long time.
    
    Fixes Bugzilla bug #28383.
    
    Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 75beadd766fed7b12a76e59e57c244e297c2d2cb)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 7d670ff..62734d1 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -614,6 +614,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
     DRI2DrawablePtr pPriv;
     DRI2BufferPtr   pDestBuffer = NULL, pSrcBuffer = NULL;
     int             ret, i;
+    CARD64          ust, current_msc;
 
     pPriv = DRI2GetDrawable(pDraw);
     if (pPriv == NULL) {
@@ -658,12 +659,26 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
      * need to schedule a swap for the last swap target + the swap interval.
      */
     if (target_msc == 0 && divisor == 0 && remainder == 0) {
+	/* If the current vblank count of the drawable's crtc is lower
+	 * than the count stored in last_swap_target from a previous swap
+	 * then reinitialize last_swap_target to the current crtc's msc,
+	 * otherwise the swap will hang. This will happen if the drawable
+	 * is moved to a crtc with a lower refresh rate, or a crtc that just
+	 * got enabled.
+	 */
+	if (!(*ds->GetMSC)(pDraw, &ust, &current_msc))
+	    pPriv->last_swap_target = 0;
+
+	if (current_msc < pPriv->last_swap_target)
+	    pPriv->last_swap_target = current_msc;
+
 	/*
 	 * Swap target for this swap is last swap target + swap interval since
 	 * we have to account for the current swap count, interval, and the
 	 * number of pending swaps.
 	 */
 	*swap_target = pPriv->last_swap_target + pPriv->swap_interval;
+
     } else {
 	/* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
 	*swap_target = target_msc;

commit 18f1195e801e3598e4eafdb712cf3ce65e61b759
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Fri Jun 18 14:38:09 2010 +1000

    Add fix for server crash in DRI2 (FDO bug: #27497)

diff --git a/debian/changelog b/debian/changelog
index acd7a14..62666cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
 xorg-server (2:1.8.1.901-2) UNRELEASED; urgency=low
 
+  [ Julien Cristau ]
   * Install the upstream changelog in xserver-common, instead of duplicating
     its 1MB in all other packages.
 
- -- Julien Cristau <jcristau@debian.org>  Tue, 08 Jun 2010 00:19:42 +0200
+  [ Christopher James Halse Rogers ]
+  * 17-fix-DRI2-segfault-when-clientGone.diff:
+    - Pick up fix from https://bugs.freedesktop.org/show_bug.cgi?id=27497 to
+      fix server crash in DRI2SwapEvent handling (LP: #595182).
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com>  Fri, 18 Jun 2010 13:32:45 +1000
 
 xorg-server (2:1.8.1.901-1) experimental; urgency=low
 
diff --git a/debian/patches/17-fix-DRI2-segfault-when-clientGone.diff b/debian/patches/17-fix-DRI2-segfault-when-clientGone.diff
new file mode 100644
index 0000000..08ee08b
--- /dev/null
+++ b/debian/patches/17-fix-DRI2-segfault-when-clientGone.diff
@@ -0,0 +1,33 @@
+From c1c59e7d5f0c6f0eea88657f892175166679da4f Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Sat, 15 May 2010 19:24:30 +0100
+Subject: [PATCH] dri2: Only send the swap event if the client hasn't gone fishing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+  Bug 27497 - xorg crashes after update to 1.8.0
+  https://bugs.freedesktop.org/show_bug.cgi?id=27497
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Kristian Høgsberg <krh@bitplanet.net>
+---
+ hw/xfree86/dri2/dri2ext.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+Index: xorg-server/hw/xfree86/dri2/dri2ext.c
+===================================================================
+--- xorg-server.orig/hw/xfree86/dri2/dri2ext.c	2010-06-18 12:59:17.534477001 +1000
++++ xorg-server/hw/xfree86/dri2/dri2ext.c	2010-06-18 13:06:30.914477000 +1000
+@@ -355,6 +355,9 @@
+     xDRI2BufferSwapComplete event;
+     DrawablePtr pDrawable = data;
+ 
++    if (client->clientGone)
++	return;
++
+     event.type = DRI2EventBase + DRI2_BufferSwapComplete;
+     event.sequenceNumber = client->sequence;
+     event.event_type = type;
diff --git a/debian/patches/series b/debian/patches/series
index adf3c9c..f850a70 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 #13_debian_add_xkbpath_env_variable.diff
 15-nouveau.diff
 16-xaa-fbcomposite-fix-negative-size.diff
+17-fix-DRI2-segfault-when-clientGone.diff

commit 557301d5c7631e84ad769e6f40a3172a3fdd2369
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jun 15 13:22:20 2010 +1000

    dix: the default axis mode is Relative, not "0".
    
    Yay for readability.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/devices.c b/dix/devices.c
index 91dd4fd..2226ff2 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1484,7 +1484,7 @@ InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, Atom* btn_
 
     return(InitButtonClassDeviceStruct(dev, numButtons, btn_labels, map) &&
 	   InitValuatorClassDeviceStruct(dev, numAxes, axes_labels,
-					 numMotionEvents, 0) &&
+					 numMotionEvents, Relative) &&
 	   InitPtrFeedbackClassDeviceStruct(dev, controlProc));
 }
 

commit e50f84d69811baea04ef559d846e4588c4bc4c8e
Author: Éric Piel <E.A.B.Piel@tudelft.nl>
Date:   Fri Jun 11 09:16:32 2010 -0700

    exa: fix ExaCheckCopyNtoN for exa_classic when source = dest
    
    In case you want to copy a region with source = dest, you have the same pixmap
    as source and dest.
    
    At the end of exaPixmapIsOffscreen_classic() the devPrivate.ptr is reset to
    NULL (look at the sources).
    
    Now this is what happens in ExaCheckCopyNtoN:
    
    exaPrepareAccess( pDst );
       Calls IsOffscreen()
          sets devPrivate.ptr to NULL
       sets up devPrivate.ptr to real pointer
       Everything OK
    exaPrepareAccess( pSrc );
       Calls IsOffscreen()
          sets devPrivate.ptr to NULL
       BAILS OUT CAUSE OF NESTED OPERATION SINCE DST EQUALS SRC
    
    We end up with devPrivate.ptr as NULL, and that is clearly wrong.
    
    In particular this fixes a segfault when using the psb driver (bug 28077)
    
    Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
    Reviewed-by: Michel Dänzer <michel@daenzer.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 7e8f1001217326cc451974bacf25275420c4bb4e)

diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index c31e2d4..9bc369e 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -256,9 +256,10 @@ exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
     Bool ret;
 
     if (pExaScr->info->PixmapIsOffscreen) {
+	void* old_ptr = pPixmap->devPrivate.ptr;
 	pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
 	ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
-	pPixmap->devPrivate.ptr = NULL;
+	pPixmap->devPrivate.ptr = old_ptr;
     } else
 	ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr);
 

commit 75c1ba8b4fd0cbf5a6eb41fefc4ec728790589df
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jun 10 12:21:36 2010 +1000

    Xi: don't copy the modifier key count when copying device classes (#25480)
    
    The modifier key count is maintained by the XKB layer and
    increased/decreased for all modifiers that set state.
    
    Test case, MD/SD modifier key count in comment:
    1. keyboard 1: press and hold Shift_L    # SD:1     MD:1
    2. keyboard 2: press and release Shift_L # SD:1,0   MD:1,0
    <class copy happens>                     # SD:1     MD:1
    3. keyboard 1: release Shift_L           # SD:0     MD:1
    4. keyboard 1: press and release Shift_L # SD:1,0   MD:2,1
    
    The modifier is now logically down on the MD but not on keyboard 1 or
    keyboard 2.
    
    XKB is layered in before the DIX, it increases/decreases the modifier key
    count accordingly. In the above example, during (2), the MD gets the key
    release and thus clears the modifier bit. (3) doesn't forward the release to
    the MD because it is already cleared. The copy of modifierKeysDown when the
    lastSlave changes however increases the counter for the held key. On (4),
    the press and release are both forwarded to the MD, causing a offset by 1
    and thus do not clear the logical modifier state.
    
    X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Acked-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index e680f6f..566b0ef 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -196,16 +196,12 @@ void
 CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
 {
     KeyClassPtr mk = master->key;
-    KeyClassPtr dk = device->key;
-    int i;
 
     if (device == master)
         return;
 
     mk->sourceid = device->id;
 
-    for (i = 0; i < 8; i++)
-        mk->modifierKeyCount[i] = dk->modifierKeyCount[i];
 
     if (!XkbCopyDeviceKeymap(master, device))
         FatalError("Couldn't pivot keymap from device to core!\n");

commit 421f5dfdd8b566dc07b4606f0edec487b3ead3d9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jun 11 11:08:31 2010 +1000

    DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML()
    
    DRI2WaitSBC() didn't block if requested targetSBC wasn't yet reached.
    
    Instead it returned a xreply with uninitialized junk return values, then
    blocked the connection until targetSBC was reached.
    
    Therefore the client didn't block, but continued with bogus return
    values from glXWaitForSbcOML.
    
    This patch fixes the problem by implementing DRI2WaitSBC similar
    to the clean and proven DRI2WaitMSC implementation.
    
    Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit b3548612c7943011f79a910f9a59bb975984d8a6)
    
    Conflicts:
    
    	hw/xfree86/dri2/dri2ext.c

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 2bdb733..7d670ff 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -768,8 +768,7 @@ DRI2WaitMSC(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
 }
 
 int
-DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc,
-	    CARD64 *ust, CARD64 *msc, CARD64 *sbc)
+DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc)
 {
     DRI2DrawablePtr pPriv;
 
@@ -783,14 +782,13 @@ DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc,
     if (target_sbc == 0)
         target_sbc = pPriv->swap_count + pPriv->swapsPending;
 
-    /* If current swap count already >= target_sbc,
+    /* If current swap count already >= target_sbc, reply and
      * return immediately with (ust, msc, sbc) triplet of
      * most recent completed swap.
      */
     if (pPriv->swap_count >= target_sbc) {
-        *sbc = pPriv->swap_count;
-        *msc = pPriv->last_swap_msc;
-        *ust = pPriv->last_swap_ust;
+        ProcDRI2WaitMSCReply(client, pPriv->last_swap_ust,
+                             pPriv->last_swap_msc, pPriv->swap_count);
         return Success;
     }
 
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index ce8a5df..de94c0b 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -251,8 +251,7 @@ extern _X_EXPORT int DRI2WaitMSC(ClientPtr client, DrawablePtr pDrawable,
 extern _X_EXPORT int ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust,
 					  CARD64 msc, CARD64 sbc);
 extern _X_EXPORT int DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw,
-				 CARD64 target_sbc, CARD64 *ust, CARD64 *msc,
-				 CARD64 *sbc);
+				 CARD64 target_sbc);
 extern _X_EXPORT Bool DRI2ThrottleClient(ClientPtr client, DrawablePtr pDraw);
 
 extern _X_EXPORT Bool DRI2CanFlip(DrawablePtr pDraw);
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 094d54d..627dfc0 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -516,9 +516,8 @@ static int
 ProcDRI2WaitSBC(ClientPtr client)
 {
     REQUEST(xDRI2WaitSBCReq);
-    xDRI2MSCReply rep;
     DrawablePtr pDrawable;
-    CARD64 target, ust, msc, sbc;
+    CARD64 target;
     int status;
 
     REQUEST_SIZE_MATCH(xDRI2WaitSBCReq);
@@ -528,18 +527,9 @@ ProcDRI2WaitSBC(ClientPtr client)
 	return status;
 
     target = vals_to_card64(stuff->target_sbc_lo, stuff->target_sbc_hi);
-    status = DRI2WaitSBC(client, pDrawable, target, &ust, &msc, &sbc);
-    if (status != Success)
-	return status;
+    status = DRI2WaitSBC(client, pDrawable, target);
 
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    load_msc_reply(&rep, ust, msc, sbc);
-
-    WriteToClient(client, sizeof(xDRI2MSCReply), &rep);
-
-    return client->noClientException;
+    return status;
 }
 
 static int

commit f85552aa452d5f575fee9f6031a33ca79bdc3cc8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jun 11 10:12:52 2010 +1000

    xkb: fix invalid memory writes in _XkbCopyGeom.
    
    Classic strlen/strcpy mistake of
       foo = malloc(strlen(bar));
       strcpy(foo, bar);
    
    Testcase: valgrind Xephyr :1
    
    ==8591== Invalid write of size 1
    ==8591==    at 0x4A0638F: strcpy (mc_replace_strmem.c:311)
    ==8591==    by 0x605593: _XkbCopyGeom (xkbUtils.c:1994)
    ==8591==    by 0x605973: XkbCopyKeymap (xkbUtils.c:2118)
    ==8591==    by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560)
    ==8591==    by 0x4472E2: CoreKeyboardProc (devices.c:577)
    ==8591==    by 0x447162: ActivateDevice (devices.c:530)
    ==8591==    by 0x4475D6: InitCoreDevices (devices.c:672)
    ==8591==    by 0x4449EE: main (main.c:254)
    ==8591==  Address 0x6f96505 is 0 bytes after a block of size 53 alloc'd
    ==8591==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
    ==8591==    by 0x6054B7: _XkbCopyGeom (xkbUtils.c:1980)
    ==8591==    by 0x605973: XkbCopyKeymap (xkbUtils.c:2118)
    ==8591==    by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560)
    ==8591==    by 0x4472E2: CoreKeyboardProc (devices.c:577)
    ==8591==    by 0x447162: ActivateDevice (devices.c:530)
    ==8591==    by 0x4475D6: InitCoreDevices (devices.c:672)
    ==8591==    by 0x4449EE: main (main.c:254)
    
    Reported-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by-and-apologised-for: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 7f19a7a6e90a4fd7b7ec0256974f62e575218541)
    
    Conflicts:
    
    	xkb/xkbUtils.c

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 6d0901a..b1e0e55 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1977,7 +1977,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
         /* font */
         if (src->geom->label_font) {
             if (!dst->geom->label_font) {
-                tmp = xalloc(strlen(src->geom->label_font));
+                tmp = xalloc(strlen(src->geom->label_font) + 1);
                 if (!tmp)
                     return FALSE;
                 dst->geom->label_font = tmp;
@@ -1985,7 +1985,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
             else if (strlen(src->geom->label_font) !=
                 strlen(dst->geom->label_font)) {
                 tmp = xrealloc(dst->geom->label_font,
-                               strlen(src->geom->label_font));
+                               strlen(src->geom->label_font) + 1);
                 if (!tmp)
                     return FALSE;
                 dst->geom->label_font = tmp;

commit 83460a94985faafcf7cd09456e833f381f0e13bc
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Fri May 28 09:35:54 2010 -0700

    Fix pixmap validation in miDbePositionWindow.
    
    miDbePositionWindow allocates two pixmaps: a front buffer, and a back buffer.
    If the buffers are supposed to be initialized, it validates a GC against the
    front buffer, then uses it to fill and/or copy both the front buffer *and* the
    back buffer, without revalidating.  If the acceleration architecture needs
    different GC funcs for the two pixmaps -- for example if allocation of the front
    buffer exhausted video memory -- then this can cause crashes because the GC is
    not validated for the back buffer pixmap.
    
    Fix this by performing the rendering for the front buffer first, then
    revalidating against the back buffer before performing the back buffer
    rendering.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 1304b8b27cb12c803c4f51f04cb6f9d508b82c69)

diff --git a/dbe/midbe.c b/dbe/midbe.c
index 4426c9d..bdea358 100644
--- a/dbe/midbe.c
+++ b/dbe/midbe.c
@@ -695,25 +695,33 @@ miDbePositionWindow(WindowPtr pWin, int x, int y)
 
 
         pDbeWindowPrivPriv = MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv);
-        ValidateGC((DrawablePtr)pFrontBuffer, pGC);
 
 	/* I suppose this could avoid quite a bit of work if
 	 * it computed the minimal area required.
 	 */
+	ValidateGC(&pFrontBuffer->drawable, pGC);
 	if (clear)
         {
 	    (*pGC->ops->PolyFillRect)((DrawablePtr)pFrontBuffer, pGC, 1,
 				      &clearRect);
-	    (*pGC->ops->PolyFillRect)((DrawablePtr)pBackBuffer , pGC, 1,
-				      &clearRect);
-        }
-
-        /* Copy the contents of the old DBE pixmaps to the new pixmaps. */
+	}
+	/* Copy the contents of the old front pixmap to the new one. */
 	if (pWin->bitGravity != ForgetGravity)
 	{
 	    (*pGC->ops->CopyArea)((DrawablePtr)pDbeWindowPrivPriv->pFrontBuffer,
                                   (DrawablePtr)pFrontBuffer, pGC, sourcex,
                                   sourcey, savewidth, saveheight, destx, desty);
+        }
+
+	ValidateGC(&pBackBuffer->drawable, pGC);
+	if (clear)
+	{
+	    (*pGC->ops->PolyFillRect)((DrawablePtr)pBackBuffer , pGC, 1,
+				      &clearRect);
+	}
+	/* Copy the contents of the old back pixmap to the new one. */
+	if (pWin->bitGravity != ForgetGravity)
+	{
 	    (*pGC->ops->CopyArea)((DrawablePtr)pDbeWindowPrivPriv->pBackBuffer,
                                   (DrawablePtr)pBackBuffer, pGC, sourcex,
                                   sourcey, savewidth, saveheight, destx, desty);

commit 14dc68c2655ea033d102ebfc2cb6a368fc0c330f
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Jun 3 12:16:40 2010 +1000

    composite: initialise pOldPixmap to NullPixmap at alloc time.
    
    We just never initialised the malloced value.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 91a6359caf24d94343ff76f43ea7b7fc3223203d)

diff --git a/composite/compalloc.c b/composite/compalloc.c
index 73adc72..8a6beb9 100644
--- a/composite/compalloc.c
+++ b/composite/compalloc.c
@@ -143,6 +143,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
 	cw->oldy = COMP_ORIGIN_INVALID;
 	cw->damageRegistered = FALSE;
 	cw->damaged = FALSE;
+	cw->pOldPixmap = NullPixmap;
 	dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, cw);
     }
     ccw->next = cw->clients;

commit 1f6de991d0b44bf1412dc58067fae551f6aac5d1
Author: Nicolas George <nicolas.george@normalesup.org>
Date:   Wed Jun 2 13:40:51 2010 +0200

    Change keyboard controls on slave keyboards (#27926)
    
    Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other
    similar loops.
    
    Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b)

diff --git a/dix/devices.c b/dix/devices.c
index b55df16..91dd4fd 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1956,7 +1956,7 @@ ProcChangeKeyboardControl (ClientPtr client)
     keyboard = PickKeyboard(client);
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) &&
+        if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) &&
             pDev->kbdfeed && pDev->kbdfeed->CtrlProc) {
             ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
 	    if (ret != Success)
@@ -1965,7 +1965,7 @@ ProcChangeKeyboardControl (ClientPtr client)
     }
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) &&
+        if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) &&
             pDev->kbdfeed && pDev->kbdfeed->CtrlProc) {
             ret = DoChangeKeyboardControl(client, pDev, vlist, vmask);
             if (ret != Success)

commit b1e338df929bc7ef68524e66d5ff8d85af84b0e6
Author: Jamey Sharp <jamey@minilop.net>
Date:   Mon May 24 09:15:32 2010 -0700

    midispcur: Construct Picture objects lazily in case Render is disabled.
    
    Reverts part of the effects of 518f3b189b6c8aa28b62837d14309fd06163ccbb,
    "mi: don't thrash resources when displaying the software cursor across
    screens". The per-screen cache is preserved, and the GCs are still
    allocated eagerly, but now it doesn't construct pRootPicture until
    somebody attempts to draw an ARGB cursor.
    
    I noticed crashes in Xnest, which doesn't support the RENDER extension,
    but I suspect other DDXes that support disabling that extension would
    have had issues as well.
    
    Signed-off-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
    (cherry picked from commit bf78e11839f8278020b604672ff7c3d194232be9)

diff --git a/mi/midispcur.c b/mi/midispcur.c
index 54a6787..1d24919 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -179,6 +179,7 @@ miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
 }
 
 #ifdef ARGB_CURSOR
+#define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win))
 
 static VisualPtr
 miDCGetWindowVisual (WindowPtr pWin)
@@ -451,6 +452,8 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
 #ifdef ARGB_CURSOR
     if (pPriv->pPicture)
     {
+	if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin))
+	    return FALSE;
 	CompositePicture (PictOpOver,
 			  pPriv->pPicture,
 			  NULL,
@@ -733,9 +736,8 @@ miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
 #ifdef ARGB_CURSOR
     if (pPriv->pPicture)
     {
-	if (!pBuffer->pTempPicture)
-            miDCMakePicture(&pBuffer->pTempPicture, &pTemp->drawable, pWin);
-
+	if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin))
+	    return FALSE;
 	CompositePicture (PictOpOver,
 			  pPriv->pPicture,
 			  NULL,
@@ -819,10 +821,7 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
             goto failure;
 
 #ifdef ARGB_CURSOR
-        miDCMakePicture(&pBuffer->pRootPicture, &pWin->drawable, pWin);
-        if (!pBuffer->pRootPicture)
-            goto failure;
-
+        pBuffer->pRootPicture = NULL;
         pBuffer->pTempPicture = NULL;
 #endif
 

commit 3ad3592820a8beeb724575fb7ae7f3e2f3560030
Author: Jamey Sharp <jamey@minilop.net>
Date:   Mon May 24 09:14:27 2010 -0700

    xnest: Don't ignore errors from DeviceCursorInitialize.
    
    Signed-off-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
    (cherry picked from commit bf9b64eefbadbf299d3b841c1890bfcaef5aab1b)

diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 12f47e7..d9f5dd6 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -167,8 +167,7 @@ xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
     pScreenPriv = (xnestCursorFuncPtr)
             dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey);
 
-    pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
-    return TRUE;
+    return pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
 }
 
 void

commit 83e02f0929c2005e3f7f57c53e552aeb51c0a4b8
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Jun 8 00:22:26 2010 +0200

    Install the upstream changelog in xserver-common, instead of duplicating its 1MB in all other packages.

diff --git a/debian/changelog b/debian/changelog
index d0b80d7..acd7a14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.8.1.901-2) UNRELEASED; urgency=low
+
+  * Install the upstream changelog in xserver-common, instead of duplicating
+    its 1MB in all other packages.
+
+ -- Julien Cristau <jcristau@debian.org>  Tue, 08 Jun 2010 00:19:42 +0200
+
 xorg-server (2:1.8.1.901-1) experimental; urgency=low
 
   [ Julien Cristau ]
diff --git a/debian/rules b/debian/rules
index c3084a2..da0f293 100755
--- a/debian/rules
+++ b/debian/rules
@@ -278,7 +278,7 @@ binary-arch: build install
 	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-initial
 	
 	dh_installdocs -s
-	dh_installchangelogs -s ChangeLog
+	dh_installchangelogs -s
 	dh_install $(DH_INSTALL_OPTIONS) -s --sourcedir=debian/tmp --list-missing
 	$(INSTALL) -d $(CURDIR)/debian/xserver-xorg-dev/usr/share/xserver-xorg
 	# XXX might want to only extract the major ABI versions?
@@ -318,7 +318,7 @@ binary-indep: build install
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-initial
 	dh_install -i --sourcedir=debian/tmp
 	dh_installdocs -i
-	dh_installchangelogs -i
+	dh_installchangelogs -i ChangeLog
 
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-deb
 

commit 7f248edd7b45fe97fd4f57d297aafe28107b2240
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Jun 7 23:22:52 2010 +0200

    Upload to experimental

diff --git a/debian/changelog b/debian/changelog
index 3cac7df..d0b80d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.8.1.901-1) UNRELEASED; urgency=low
+xorg-server (2:1.8.1.901-1) experimental; urgency=low
 
   [ Julien Cristau ]
   * New upstream release
@@ -8,7 +8,7 @@ xorg-server (2:1.8.1.901-1) UNRELEASED; urgency=low
   * 16-xaa-fbcomposite-fix-negative-size.diff:
     - mi hunk merged upstream.  Update to keep just the fbpict.c hunk.
 
- -- Christopher James Halse Rogers <raof@ubuntu.com>  Fri, 04 Jun 2010 14:16:14 +1000
+ -- Julien Cristau <jcristau@debian.org>  Mon, 07 Jun 2010 23:22:48 +0200
 
 xorg-server (2:1.8.1-1) experimental; urgency=low
 

commit 91e9fd832d45f72b02e70a824e373fd52546d73c
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Jun 7 23:21:32 2010 +0200

    Fix changelog typo

diff --git a/debian/changelog b/debian/changelog
index 40f9a3f..3cac7df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ xorg-server (2:1.8.1.901-1) UNRELEASED; urgency=low
 
   [ Julien Cristau ]
   * New upstream release
-  * Merge changes from 2:1.7.7-1.
+  * Merge changes from 2:1.7.7-2.
 
   [ Christopher James Halse Rogers ]
   * 16-xaa-fbcomposite-fix-negative-size.diff:

commit 01dab61b8cda9e26e38903601022c45b463d530d
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Jun 7 23:20:55 2010 +0200

    Rediff 15-nouveau.diff

diff --git a/debian/patches/15-nouveau.diff b/debian/patches/15-nouveau.diff
index 7bd766a..453f0dc 100644
--- a/debian/patches/15-nouveau.diff
+++ b/debian/patches/15-nouveau.diff
@@ -46,7 +46,7 @@ Index: xorg-server/glx/glxdri2.c
 ===================================================================
 --- xorg-server.orig/glx/glxdri2.c
 +++ xorg-server/glx/glxdri2.c
-@@ -683,6 +683,7 @@
+@@ -678,6 +678,7 @@
      const __DRIextension **extensions;
      const __DRIconfig **driConfigs;
      int i;
@@ -54,7 +54,7 @@ Index: xorg-server/glx/glxdri2.c
  
      screen = xcalloc(1, sizeof *screen);
      if (screen == NULL)
-@@ -709,7 +710,9 @@
+@@ -704,7 +705,9 @@
  
      screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
      if (screen->driver == NULL) {
@@ -65,7 +65,7 @@ Index: xorg-server/glx/glxdri2.c
  		   filename, dlerror());
          goto handle_error;
      }
-@@ -800,7 +803,7 @@
+@@ -795,7 +798,7 @@
  
      xfree(screen);
  

commit 598603021f6c4fa64161366177e93de67511bc2e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jun 2 11:13:17 2010 +1000

    dri2: Take an XID for tracking the DRI2 drawable
    
    Some pixmaps (window pixmaps and scratch pixmaps) don't have the
    drawable->id set and thus DRI2 gets confused when using that field
    for looking up the DRI2 drawable.  Go back to using privates for getting
    at the DRI2 drawable from a DrawablePtr.  We need to keep the resource
    tracking in place so we can remove the DRI2 drawable when the X resource
    it was created for goes away.  Additionally, we also now track the DRI2
    drawable using a client XID so we can reclaim the DRI2 drawable even if
    the client goes before the drawable and doesn't destroy the DRI2 drawable.
    
    Tested-by: Owen W. Taylor <otaylor@fishsoup.net>
    Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
    (cherry picked from commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc)
    
    Conflicts:
    
    	hw/xfree86/dri2/dri2.c

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 087d52e..ec3bbe6 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -512,8 +512,9 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
     if (!validGlxFBConfigForWindow(client, glxc->config, pDraw, error))
 	return NULL;
 
-    pGlxDraw = glxc->pGlxScreen->createDrawable(glxc->pGlxScreen,
-						pDraw, GLX_DRAWABLE_WINDOW,
+    pGlxDraw = glxc->pGlxScreen->createDrawable(client, glxc->pGlxScreen,
+						pDraw, drawId,
+						GLX_DRAWABLE_WINDOW,


Reply to: