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

xorg-server: Changes to 'debian-unstable'



 ChangeLog                               |  271 ++++++++++++++++++++++++++++++++
 Xi/exevents.c                           |    2 
 configure.ac                            |    4 
 debian/changelog                        |    9 -
 dix/devices.c                           |    4 
 dix/events.c                            |   21 --
 dix/getevents.c                         |    2 
 hw/dmx/glxProxy/compsize.c              |    1 
 hw/dmx/glxProxy/compsize.h              |   51 ++++++
 hw/dmx/glxProxy/g_renderswap.c          |    1 
 hw/dmx/glxProxy/glxcmds.c               |    2 
 hw/dmx/glxProxy/glxcmds.h               |   37 ++++
 hw/dmx/glxProxy/glxcmdsswap.c           |    3 
 hw/vfb/InitOutput.c                     |    2 
 hw/xfree86/common/xf86VidMode.c         |    3 
 hw/xfree86/dri2/dri2.c                  |   17 +-
 hw/xfree86/dri2/dri2ext.c               |    3 
 hw/xfree86/modes/xf86Crtc.c             |   41 ++--
 hw/xfree86/modes/xf86EdidModes.c        |    5 
 hw/xfree86/os-support/linux/lnx_video.c |    8 
 hw/xfree86/vbe/vbe.c                    |    5 
 include/input.h                         |    4 
 include/os.h                            |    3 
 miext/rootless/rootlessScreen.c         |    4 
 os/io.c                                 |    1 
 record/record.c                         |   53 +++---
 26 files changed, 479 insertions(+), 78 deletions(-)

New commits:
commit e9c798069238ee6f445cd5d9c6cd9ae47adad631
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Nov 29 17:06:30 2011 +0100

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 457a370..9f9b857 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg-server (2:1.11.2.901-1) UNRELEASED; urgency=low
+xorg-server (2:1.11.2.901-1) unstable; urgency=low
 
   * New upstream release candidate (1.11.3 RC1):
     - As usual: Fixes for various crashes and correctness issues.
@@ -10,7 +10,7 @@ xorg-server (2:1.11.2.901-1) UNRELEASED; urgency=low
       is perfectly OK.
   * Don't forget to ship xorg.conf.d(5) in xserver-xorg-core.
 
- -- Cyril Brulebois <kibi@debian.org>  Tue, 29 Nov 2011 15:28:29 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Tue, 29 Nov 2011 17:04:09 +0100
 
 xorg-server (2:1.11.1.902-1) unstable; urgency=low
 

commit adf78354a57bb9dc43d4018779a4a0103bdb2e99
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Nov 29 17:04:07 2011 +0100

    Close #649420.

diff --git a/debian/changelog b/debian/changelog
index 2b879c8..457a370 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ xorg-server (2:1.11.2.901-1) UNRELEASED; urgency=low
     - As usual: Fixes for various crashes and correctness issues.
     - In particular: Fix for crash when starting a game (in wine) twice
       (Closes: #637448).
+    - Also: Fix crashes with server regeneration (Closes: #649420).
   * Add some lintian overrides:
     - xserver-xorg-core: breaks-without-version against virtual packages
       is perfectly OK.

commit e0bc0d1b62c9f0fcd6f665ea7a87a29b653029ee
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Nov 29 15:31:29 2011 +0100

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index cc054af..bf744e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,274 @@
+commit 4689c84a07f87d35492feeae2bc59642c31b6eb3
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon Nov 28 00:07:29 2011 -0800
+
+    configure.ac: 1.11.2.901 (1.11.3 RC1)
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit e2661ddbc5d1b2edb1ab514a761f8c0b66e69736
+Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+Date:   Sun Nov 6 12:20:51 2011 -0500
+
+    Fix vesa's VBE PanelID interpretation
+    
+    xserver's VESA driver's VBE (Vesa BIOS Extensions) code
+    includes a PanelID probe, which can get a monitor's native
+    resolution. From this, using CVT formulas, it derives
+    horizontal sync rate and a vertical refresh rate ranges.
+    
+    It however, only derives the upper bounds of the ranges, and
+    the lower bounds cannot de derived. By default, they are set
+    to hardcoded constants which represent the lowest supported
+    resolution: 640x480. The constants in vbe.c however, were
+    not actually derived from forulas, but carried over from
+    other code from the bad old days, and are not relevant
+    to flat panel displays. This caused, for example, EEEPC701's
+    panel, with a native resolution of 800x480, to end up with
+    a upper bound of the horizontal sync rate that was lower
+    than the hardcoded lower bound, which of course broke things.
+    
+    These numbers have been rederived using both my own CVT tool
+    based on xf86CVTMode(), and using the provided 'cvt' tool
+    that comes with xserver.
+    
+    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
+    Reviewed-by: Adam Jackson <ajax@redhat.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763)
+
+commit 2e3406fc6737539210e29ac0b2821848e6d1f069
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon Nov 7 22:14:30 2011 +0000
+
+    dmx: Build fix for -Werror=implicit-function-declaration
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    (cherry picked from commit f405dfffe7d5db81d398615a80acbeba7e014ada)
+
+commit b440fc9c1bb10f8c227120e6d9e58101108d71bb
+Author: dtakahashi42 <dtakahashi42@gmail.com>
+Date:   Fri Nov 18 11:30:22 2011 -0800
+
+    rootless: Fix a server crash when choosing a color with the gimp color wheel
+    
+    https://trac.macports.org/ticket/30927
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 328074890eeb111950e984c6f618311983600b20)
+
+commit 40c1287f36517f0afd62306e306f6a68120d9a59
+Author: Ross Burton <ross@linux.intel.com>
+Date:   Wed Sep 28 11:46:02 2011 +0100
+
+    edid: Add quirk for Acer Aspire One 110
+    
+    At least one revision of the AAO reports a 190x110mm maximum size but a
+    451x113mm mode.
+    
+    X.Org Bug 41141 <https://bugs.freedesktop.org/show_bug.cgi?id=41141>
+    
+    Signed-off-by: Ross Burton <ross@linux.intel.com>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 58864146fbdf1820d04825838691e84784ef91bc)
+
+commit 7972e2dade58158bb98f5b7dc5f873b9fb3446de
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu Aug 25 16:04:04 2011 +0100
+
+    dri2: Register the DRI2DrawableType after server regeneration
+    
+    The Resource database is reset upon regeneration and so the dri2 module
+    needs to re-register its RESTYPE for the drawable or else it will
+    clobber the next unsuspecting user of the database. Fortunately, DRI2 is
+    loaded late in the initialisation sequence and was last up until
+    xf86-video-intel started using the Resource database to track
+    outstanding swaps...
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
+    (cherry picked from commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d)
+
+commit 73beaf9033d9a44e7a7c654f296624c7265eeb6d
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Jan 24 11:17:03 2011 +0000
+
+    DRI2: Avoid a NULL pointer dereference
+    
+    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=41211
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68)
+
+commit 6105fcaa3592cb6d0d5f22d9b850986d0bc4d241
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Jan 24 11:17:03 2011 +0000
+
+    VidMode: prevent crash with no modes
+    
+    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=17431
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit eeb21a133b982f71de739baf62e53c8a68f5d495)
+
+commit d113b2911573f3685dc644c6fdd1979aa880b99f
+Author: Rami Ylimäki <rami.ylimaki@vincit.fi>
+Date:   Tue Oct 4 12:25:26 2011 +0300
+
+    record: Prevent out of bounds access when recording a reply.
+    
+    Any pad bytes in replies are written to the client from a zeroed
+    array. However, record extension tries to incorrectly access the pad
+    bytes from the end of reply data.
+    
+    Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
+    Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
+    (cherry picked from commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f)
+
+commit 4dc5b6ea9f4932070c37b7c5393d468d00803712
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Tue Nov 1 14:59:15 2011 -0700
+
+    xfree86: Fix powerpc build with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
+    
+    memType is a uint64_t on powerpc. Using memType only really makes
+    sense for *physical* addresses, which can be 64-bit for 32-bit
+    systems running on 64-bit hardware.
+    
+    However, unmapVidMem() only deals with *virtual* addresses, which
+    are guaranteed to fit into an uintptr_t.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    (cherry picked from commit eb3377ffb8a7baa26c9831e56ed782d48b28fa71)
+
+commit a1925f08790083a5c00f9f4ba766cbb8749240f3
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Apr 15 13:32:10 2011 +1000
+
+    include: export GetProximityEvents and QueueProximityEvents
+    
+    This is mainly needed for consistency with GetPointerEvents and friend.
+    No-one seems to actually need this function from outside the usual DDXs.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit fc16917ad6f0d2722bfb5c5eeca955dd3bc4125a)
+
+commit a6a21f84bbdd4e3c6218f7b4c04a2d947a784f9f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Nov 3 08:58:58 2011 +1000
+
+    dix: Don't let a driver without a ProximityClassRec post events
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 11840595a1be9f2df7390bcc708cc176e60d3ef2)
+
+commit 2f2d871ccdfb256831ae487c5916054a3d29d126
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Oct 27 11:03:39 2011 +1000
+
+    Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices
+    
+    They don't have a KeyClassRec, but we must still allow passive grabs on
+    them.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Tested-by: Bastien Nocera <hadess@hadess.net>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit 22715e465b415b3351b83b8279a4f44157f63199)
+
+commit 34bb83b9df20ff63dbb147ed661f39efb8bae8e4
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 24 12:00:32 2011 +1000
+
+    dix: block signals when closing all devices
+    
+    When closing down all devices, we manually unset master for all attached
+    devices, but the device's sprite info still points to the master's sprite
+    info. This leaves us a window where the master is freed already but the
+    device isn't yet. A signal during that window causes dereference of the
+    already freed spriteInfo in mieqEnqueue's EnqueueScreen macro.
+    
+    Simply block signals when removing all devices. It's not like we're really
+    worrying about high-responsive input at this stage.
+    
+    https://bugzilla.redhat.com/show_bug.cgi?id=737031
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    (cherry picked from commit d7c44a7c9760449bef263413ad3b20f19b1dc95a)
+
+commit 97f2ae60fc0cc755abd8b88df826fcb1a20464fe
+Author: Christopher Yeleighton <giecrilj@stegny.2a.pl>
+Date:   Mon Oct 24 18:47:06 2011 -0700
+
+    Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2
+    
+    https://bugs.freedesktop.org/show_bug.cgi?id=38420
+    
+    Exit with fatal error message, not segfault.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 7d50211ab57a35910d79fc3f67ae89aff91fa995)
+
+commit 89626304ea1ad316c5b7145a40f09377148cff21
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Thu Oct 20 14:43:01 2011 +0100
+
+    xf86Crtc: handle no outputs with no modes harder.
+    
+    If you started an X server with no connected outputs, we pick a default
+    1024x768 mode, however if you then ran an xvidmode using app against that
+    server it would segfault the server due to not finding any valid modes.
+    
+    This was due to the no output mode set code, only adding the modes to the
+    scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would
+    get called and remove all the modes and we'd end up with 0.
+    
+    This change fixes xf86SetScrnInfoModes to always report a scrn mode of at
+    least 1024x768, and pushes the initial configuration to just call it instead
+    of setting up the mode itself.
+    
+    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926
+    
+    I've seen other bugs like this on other distros so it might also actually fix them.
+    
+    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 17416e88dcfcc584fe5f87580d5d2b719b3521c3)
+
+commit c68a84e73d1ebb2f75cdc4c3d8576a15b31ab3f7
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri Nov 4 10:24:08 2011 -0700
+
+    configure.ac: Bump to 1.11.2
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 2d6760f591a4138b2f4a32220e6a5aa855c123ca
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Thu Nov 3 15:01:35 2011 -0700
+
+    Revert "dix: don't XWarpPointer through the last slave anymore (#38313)"
+    
+    This reverts commit bbe6a69da398dba93679c23c3c50f9916cb562ca.
+    
+    This commit caused a regression.
+    
+    See: http://xquartz.macosforge.org/trac/ticket/517#comment:10
+
 commit 0bffe6b38cdf6b21d9ec9b0abf0092d4d4eaef86
 Author: Jeremy Huddleston <jeremyhu@apple.com>
 Date:   Fri Oct 28 18:32:28 2011 -0700
diff --git a/debian/changelog b/debian/changelog
index 3f4465b..2b879c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
-xorg-server (2:1.11.1.902-2) UNRELEASED; urgency=low
+xorg-server (2:1.11.2.901-1) UNRELEASED; urgency=low
 
+  * New upstream release candidate (1.11.3 RC1):
+    - As usual: Fixes for various crashes and correctness issues.
+    - In particular: Fix for crash when starting a game (in wine) twice
+      (Closes: #637448).
   * Add some lintian overrides:
     - xserver-xorg-core: breaks-without-version against virtual packages
       is perfectly OK.
   * Don't forget to ship xorg.conf.d(5) in xserver-xorg-core.
 
- -- Cyril Brulebois <kibi@debian.org>  Wed, 02 Nov 2011 11:40:46 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Tue, 29 Nov 2011 15:28:29 +0100
 
 xorg-server (2:1.11.1.902-1) unstable; urgency=low
 

commit 4689c84a07f87d35492feeae2bc59642c31b6eb3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Nov 28 00:07:29 2011 -0800

    configure.ac: 1.11.2.901 (1.11.3 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index f0a14c4..9237686 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.11.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-11-04"
+AC_INIT([xorg-server], 1.11.2.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-11-28"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit e2661ddbc5d1b2edb1ab514a761f8c0b66e69736
Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Date:   Sun Nov 6 12:20:51 2011 -0500

    Fix vesa's VBE PanelID interpretation
    
    xserver's VESA driver's VBE (Vesa BIOS Extensions) code
    includes a PanelID probe, which can get a monitor's native
    resolution. From this, using CVT formulas, it derives
    horizontal sync rate and a vertical refresh rate ranges.
    
    It however, only derives the upper bounds of the ranges, and
    the lower bounds cannot de derived. By default, they are set
    to hardcoded constants which represent the lowest supported
    resolution: 640x480. The constants in vbe.c however, were
    not actually derived from forulas, but carried over from
    other code from the bad old days, and are not relevant
    to flat panel displays. This caused, for example, EEEPC701's
    panel, with a native resolution of 800x480, to end up with
    a upper bound of the horizontal sync rate that was lower
    than the hardcoded lower bound, which of course broke things.
    
    These numbers have been rederived using both my own CVT tool
    based on xf86CVTMode(), and using the provided 'cvt' tool
    that comes with xserver.
    
    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763)

diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 04132d9..06a6284 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1036,13 +1036,16 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
     mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
 
     pScrn->monitor->nHsync = 1;
-    pScrn->monitor->hsync[0].lo = 31.5;
+    pScrn->monitor->hsync[0].lo = 29.37;
     pScrn->monitor->hsync[0].hi = (float)mode->Clock / (float)mode->HTotal;
     pScrn->monitor->nVrefresh = 1;
     pScrn->monitor->vrefresh[0].lo = 56.0;
     pScrn->monitor->vrefresh[0].hi =
 	(float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal;
 
+    if (pScrn->monitor->vrefresh[0].hi < 59.47)
+	pScrn->monitor->vrefresh[0].hi = 59.47;
+
     free(mode);
 }
 

commit 2e3406fc6737539210e29ac0b2821848e6d1f069
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Nov 7 22:14:30 2011 +0000

    dmx: Build fix for -Werror=implicit-function-declaration
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit f405dfffe7d5db81d398615a80acbeba7e014ada)

diff --git a/hw/dmx/glxProxy/compsize.c b/hw/dmx/glxProxy/compsize.c
index 9a40d65..5a5d5d0 100644
--- a/hw/dmx/glxProxy/compsize.c
+++ b/hw/dmx/glxProxy/compsize.c
@@ -29,6 +29,7 @@
  */
 
 #include <GL/gl.h>
+#include "compsize.h"
 
 GLint __glFogiv_size(GLenum pname)
 {
diff --git a/hw/dmx/glxProxy/compsize.h b/hw/dmx/glxProxy/compsize.h
new file mode 100644
index 0000000..856c6f5
--- /dev/null
+++ b/hw/dmx/glxProxy/compsize.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2011 Apple Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef __compsize_h__
+#define __compsize_h__
+
+extern GLint __glColorTableParameterfv_size(GLenum pname);
+extern GLint __glColorTableParameteriv_size(GLenum pname);
+extern GLint __glConvolutionParameterfv_size(GLenum pname);
+extern GLint __glConvolutionParameteriv_size(GLenum pname);
+extern GLint __glFogfv_size(GLenum pname);
+extern GLint __glFogiv_size(GLenum pname);
+extern GLint __glLightModelfv_size(GLenum pname);
+extern GLint __glLightModeliv_size(GLenum pname);
+extern GLint __glLightfv_size(GLenum pname);
+extern GLint __glLightiv_size(GLenum pname);
+extern GLint __glMaterialfv_size(GLenum pname);
+extern GLint __glMaterialiv_size(GLenum pname);
+extern GLint __glTexEnvfv_size(GLenum e);
+extern GLint __glTexEnviv_size(GLenum e);
+extern GLint __glTexGendv_size(GLenum e);
+extern GLint __glTexGenfv_size(GLenum e);
+extern GLint __glTexGeniv_size(GLenum e);
+extern GLint __glTexParameterfv_size(GLenum e);
+extern GLint __glTexParameteriv_size(GLenum e);
+
+#endif /* !__compsize_h__ */
diff --git a/hw/dmx/glxProxy/g_renderswap.c b/hw/dmx/glxProxy/g_renderswap.c
index e675696..e434a71 100644
--- a/hw/dmx/glxProxy/g_renderswap.c
+++ b/hw/dmx/glxProxy/g_renderswap.c
@@ -32,6 +32,7 @@
 #include "glxext.h"
 #include "g_disptab.h"
 #include "unpack.h"
+#include "compsize.h"
 
 void __glXDispSwap_CallList(GLbyte *pc)
 {
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index f79264e..3f21f65 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -52,6 +52,8 @@
 #include "glxvisuals.h"
 #include "glxswap.h"
 
+#include "glxcmds.h"
+
 #ifdef PANORAMIX
 #include "panoramiXsrv.h"
 #endif
diff --git a/hw/dmx/glxProxy/glxcmds.h b/hw/dmx/glxProxy/glxcmds.h
new file mode 100644
index 0000000..ae866be
--- /dev/null
+++ b/hw/dmx/glxProxy/glxcmds.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2011 Apple Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef __GLX_cmds_h__
+#define __GLX_cmds_h__
+
+extern int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
+extern int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
+extern int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc);
+extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
+extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
+
+#endif /* !__GLX_cmds_h__ */
diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c
index 2294059..f28a79d 100644
--- a/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/hw/dmx/glxProxy/glxcmdsswap.c
@@ -35,11 +35,14 @@
 #include <pixmapstr.h>
 #include <windowstr.h>
 #include "unpack.h"
+#include "glxcmds.h"
 #include "glxext.h"
 #include "glxvendor.h"
 
 extern int glxIsExtensionSupported( char *ext );
 
+int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
+
 /************************************************************************/
 
 /*

commit b440fc9c1bb10f8c227120e6d9e58101108d71bb
Author: dtakahashi42 <dtakahashi42@gmail.com>
Date:   Fri Nov 18 11:30:22 2011 -0800

    rootless: Fix a server crash when choosing a color with the gimp color wheel
    
    https://trac.macports.org/ticket/30927
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 328074890eeb111950e984c6f618311983600b20)

diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 0801e72..c855706 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -247,8 +247,8 @@ RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
     WindowPtr srcWin, dstWin, maskWin = NULL;
 
     if (pMask) {                        // pMask can be NULL
-        maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ?
-                  (WindowPtr)pMask->pDrawable :  NULL;
+        maskWin = (pMask->pDrawable && pMask->pDrawable->type == DRAWABLE_WINDOW) ?
+                  (WindowPtr)pMask->pDrawable : NULL;
     }
     srcWin  = (pSrc->pDrawable && pSrc->pDrawable->type  == DRAWABLE_WINDOW) ?
               (WindowPtr)pSrc->pDrawable  :  NULL;

commit 40c1287f36517f0afd62306e306f6a68120d9a59
Author: Ross Burton <ross@linux.intel.com>
Date:   Wed Sep 28 11:46:02 2011 +0100

    edid: Add quirk for Acer Aspire One 110
    
    At least one revision of the AAO reports a 190x110mm maximum size but a
    451x113mm mode.
    
    X.Org Bug 41141 <https://bugs.freedesktop.org/show_bug.cgi?id=41141>
    
    Signed-off-by: Ross Burton <ross@linux.intel.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 58864146fbdf1820d04825838691e84784ef91bc)

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 9ff2f0d..86065f8 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -165,6 +165,11 @@ static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
 	DDC->vendor.prod_id == 6400)
 	return TRUE;
 
+    /* Bug #41141: Acer Aspire One */
+    if (memcmp (DDC->vendor.name, "LGD", 4) == 0 &&
+	DDC->vendor.prod_id == 0x7f01)
+	return TRUE;
+
     return FALSE;
 }
 

commit 7972e2dade58158bb98f5b7dc5f873b9fb3446de
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 25 16:04:04 2011 +0100

    dri2: Register the DRI2DrawableType after server regeneration
    
    The Resource database is reset upon regeneration and so the dri2 module
    needs to re-register its RESTYPE for the drawable or else it will
    clobber the next unsuspecting user of the database. Fortunately, DRI2 is
    loaded late in the initialisation sequence and was last up until
    xf86-video-intel started using the Resource database to track
    outstanding swaps...
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
    (cherry picked from commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index d71e4f4..f7f7000 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -1194,14 +1194,24 @@ DRI2CloseScreen(ScreenPtr pScreen)
 }
 
 extern ExtensionModule dri2ExtensionModule;
+extern Bool DRI2ModuleSetup(void);
+
+/* Called by InitExtensions() */
+Bool
+DRI2ModuleSetup(void)
+{
+    dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
+    if (!dri2DrawableRes)
+	return FALSE;
+
+    return TRUE;
+}
 
 static pointer
 DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
     static Bool setupDone = FALSE;
 
-    dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
-
     if (!setupDone)
     {
 	setupDone = TRUE;
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 552b26b..a2198e2 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -50,6 +50,7 @@
 #include "xf86Module.h"
 
 static ExtensionEntry	*dri2Extension;
+extern Bool DRI2ModuleSetup(void);
 
 static Bool
 validDrawable(ClientPtr client, XID drawable, Mask access_mode,
@@ -636,6 +637,8 @@ DRI2ExtensionInit(void)
 				 StandardMinorOpcode);
 
     DRI2EventBase = dri2Extension->eventBase;
+
+    DRI2ModuleSetup();
 }
 
 extern Bool noDRI2Extension;

commit 73beaf9033d9a44e7a7c654f296624c7265eeb6d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 24 11:17:03 2011 +0000

    DRI2: Avoid a NULL pointer dereference
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=41211
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index af3bcae..d71e4f4 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -780,7 +780,8 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
     /* If we're currently waiting for a swap on this drawable, reset
      * the request and suspend the client.  We only support one
      * blocked client per drawable. */
-    if ((pPriv->swapsPending) &&
+    if (pPriv &&
+	pPriv->swapsPending &&
 	pPriv->blockedClient == NULL) {
 	ResetCurrentRequest(client);
 	client->sequence--;

commit 6105fcaa3592cb6d0d5f22d9b850986d0bc4d241
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 24 11:17:03 2011 +0000

    VidMode: prevent crash with no modes
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=17431
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit eeb21a133b982f71de739baf62e53c8a68f5d495)

diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 4dd454d..2ae5484 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -221,6 +221,9 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
 	return FALSE;
 
     pScrn = xf86Screens[scrnIndex];
+    if (pScrn->modes == NULL)
+	    return FALSE;
+
     pVidMode = VMPTR(pScrn->pScreen);
     pVidMode->First = pScrn->modes;
     pVidMode->Next =  pVidMode->First->next;

commit d113b2911573f3685dc644c6fdd1979aa880b99f
Author: Rami Ylimäki <rami.ylimaki@vincit.fi>
Date:   Tue Oct 4 12:25:26 2011 +0300

    record: Prevent out of bounds access when recording a reply.
    
    Any pad bytes in replies are written to the client from a zeroed
    array. However, record extension tries to incorrectly access the pad
    bytes from the end of reply data.
    
    Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
    Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
    (cherry picked from commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f)

diff --git a/include/os.h b/include/os.h
index a553f57..c9a8b3e 100644
--- a/include/os.h
+++ b/include/os.h
@@ -451,9 +451,10 @@ extern _X_EXPORT CallbackListPtr ReplyCallback;
 typedef struct {
     ClientPtr client;
     const void *replyData;
-    unsigned long dataLenBytes;
+    unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */
     unsigned long bytesRemaining;
     Bool startOfReply;
+    unsigned long padBytes;     /* pad bytes from zeroed array */
 } ReplyInfoRec;
 
 /* stuff for FlushCallback */
diff --git a/os/io.c b/os/io.c
index 4210238..c59e18c 100644
--- a/os/io.c
+++ b/os/io.c
@@ -810,6 +810,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
 	replyinfo.client = who;
 	replyinfo.replyData = buf;
 	replyinfo.dataLenBytes = count + padBytes;
+	replyinfo.padBytes = padBytes;
 	if (who->replyBytesRemaining)
 	{ /* still sending data of an earlier reply */
 	    who->replyBytesRemaining -= count + padBytes;
diff --git a/record/record.c b/record/record.c
index 69fca72..93383ce 100644
--- a/record/record.c
+++ b/record/record.c
@@ -269,8 +269,9 @@ RecordFlushReplyBuffer(
  *	  device events and EndOfData, pClient is NULL.
  *	category is the category of the protocol element, as defined
  *	  by the RECORD spec.
- *	data is a pointer to the protocol data, and datalen is its length
- *	  in bytes.
+ *	data is a pointer to the protocol data, and datalen - padlen
+ *	  is its length in bytes.
+ *	padlen is the number of pad bytes from a zeroed array.
  *	futurelen is the number of bytes that will be sent in subsequent
  *	  calls to this function to complete this protocol element.  
  *	  In those subsequent calls, futurelen will be -1 to indicate
@@ -290,7 +291,7 @@ RecordFlushReplyBuffer(
  */
 static void
 RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
-		       int category, pointer data, int datalen, int futurelen)
+		       int category, pointer data, int datalen, int padlen, int futurelen)
 {
     CARD32 elemHeaderData[2];
     int numElemHeaders = 0;
@@ -399,15 +400,20 @@ RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
 	}
 	if (datalen)
 	{
+	    static char padBuffer[3]; /* as in FlushClient */
 	    memcpy(pContext->replyBuffer + pContext->numBufBytes,
-		   data, datalen);
-	    pContext->numBufBytes += datalen;
+		   data, datalen - padlen);
+	    pContext->numBufBytes += datalen - padlen;
+	    memcpy(pContext->replyBuffer + pContext->numBufBytes,
+		   padBuffer, padlen);
+	    pContext->numBufBytes += padlen;
 	}
     }
     else
+    {
 	RecordFlushReplyBuffer(pContext, (pointer)elemHeaderData,
-			       numElemHeaders, (pointer)data, datalen);
-
+			       numElemHeaders, (pointer)data, datalen - padlen);
+    }
 } /* RecordAProtocolElement */
 
 
@@ -485,19 +491,19 @@ RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq *stuff)
     /* record the request header */
     bytesLeft = client->req_len << 2;
     RecordAProtocolElement(pContext, client, XRecordFromClient,
-			   (pointer)stuff, SIZEOF(xReq), bytesLeft);
+			   (pointer)stuff, SIZEOF(xReq), 0, bytesLeft);
 
     /* reinsert the extended length field that was squished out */
     bigLength = client->req_len + bytes_to_int32(sizeof(bigLength));
     if (client->swapped)
 	swapl(&bigLength, n);
     RecordAProtocolElement(pContext, client, XRecordFromClient,
-		(pointer)&bigLength, sizeof(bigLength), /* continuation */ -1);
+               (pointer)&bigLength, sizeof(bigLength), 0, /* continuation */ -1);
     bytesLeft -= sizeof(bigLength);
 
     /* record the rest of the request after the length */
     RecordAProtocolElement(pContext, client, XRecordFromClient,
-		(pointer)(stuff + 1), bytesLeft, /* continuation */ -1);
+               (pointer)(stuff + 1), bytesLeft, 0, /* continuation */ -1);
 } /* RecordABigRequest */
 
 
@@ -544,7 +550,7 @@ RecordARequest(ClientPtr client)
 		    RecordABigRequest(pContext, client, stuff);
 		else
 		    RecordAProtocolElement(pContext, client, XRecordFromClient,
-				(pointer)stuff, client->req_len << 2, 0);
+				(pointer)stuff, client->req_len << 2, 0, 0);
 	    }
 	    else /* extension, check minor opcode */
 	    {
@@ -568,7 +574,7 @@ RecordARequest(ClientPtr client)
 			else
 			    RecordAProtocolElement(pContext, client, 
 					XRecordFromClient, (pointer)stuff,
-					client->req_len << 2, 0);
+					client->req_len << 2, 0, 0);
 			break;
 		    }			    
 		} /* end for each minor op info */
@@ -621,7 +627,8 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
 	    if (pContext->continuedReply)
 	    {
 		RecordAProtocolElement(pContext, client, XRecordFromServer,
-		   (pointer)pri->replyData, pri->dataLenBytes, /* continuation */ -1);
+		   (pointer)pri->replyData, pri->dataLenBytes,
+			    pri->padBytes, /* continuation */ -1);
 		if (!pri->bytesRemaining)
 		    pContext->continuedReply = 0;
 	    }
@@ -631,7 +638,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
 		if (majorop <= 127)
 		{ /* core reply */
 		    RecordAProtocolElement(pContext, client, XRecordFromServer,
-		       (pointer)pri->replyData, pri->dataLenBytes, pri->bytesRemaining);
+		       (pointer)pri->replyData, pri->dataLenBytes, 0, pri->bytesRemaining);
 		    if (pri->bytesRemaining)
 			pContext->continuedReply = 1;
 		}
@@ -653,7 +660,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
 			{
 			    RecordAProtocolElement(pContext, client, 
 				XRecordFromServer, (pointer)pri->replyData,
-				pri->dataLenBytes, pri->bytesRemaining);
+				pri->dataLenBytes, 0, pri->bytesRemaining);
 			    if (pri->bytesRemaining)
 				pContext->continuedReply = 1;
 			    break;
@@ -725,7 +732,7 @@ RecordADeliveredEventOrError(CallbackListPtr *pcbl, pointer nulldata, pointer ca
 			
 		    }
 		    RecordAProtocolElement(pContext, pClient,
-			XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0);
+			XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0, 0);
 		}
 	    } /* end for each event */
 	} /* end this client is on this context */
@@ -776,7 +783,7 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
 	    }
 
 	    RecordAProtocolElement(pContext, NULL,
-		    XRecordFromServer,  pEvToRecord, SIZEOF(xEvent), 0);
+		    XRecordFromServer,  pEvToRecord, SIZEOF(xEvent), 0, 0);
 	    /* make sure device events get flushed in the absence
 	     * of other client activity
 	     */
@@ -2420,7 +2427,7 @@ ProcRecordEnableContext(ClientPtr client)
     assert(numEnabledContexts > 0);
 
     /* send StartOfData */
-    RecordAProtocolElement(pContext, NULL, XRecordStartOfData, NULL, 0, 0);
+    RecordAProtocolElement(pContext, NULL, XRecordStartOfData, NULL, 0, 0, 0);
     RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0);


Reply to: