diff --git a/.gitignore b/.gitignore index 675ca39..47aa924 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ xorg-server-1.9.1.tar.bz2 /xorg-server-20101201.tar.xz /xorg-server-1.10.0.tar.bz2 /xorg-server-1.10.1.tar.bz2 +/xorg-server-1.10.2.tar.bz2 diff --git a/sources b/sources index 3ff914d..d3d6a55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -75f117c74f2ecaf9dd167f6a66ac98de xorg-server-1.10.1.tar.bz2 +c9ba50bd44ea70da51f13100336a5484 xorg-server-1.10.2.tar.bz2 diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 1b2b227..4d066e1 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -29,8 +29,8 @@ Summary: X.Org X11 X server Name: xorg-x11-server -Version: 1.10.1 -Release: 15%{?gitdate:.%{gitdate}}%{dist} +Version: 1.10.2 +Release: 1%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -84,13 +84,8 @@ Patch6053: xserver-1.8-disable-vboxvideo.patch # misc Patch7006: xserver-1.10-pointer-barriers.patch # from ajax/xserver-next -Patch7008: xserver-1.10-glx-pixmap-crash.patch Patch7009: xserver-1.10-bg-none-revert.patch -# 697450 - valuator axis values unaligned -# Will be in 1.10.2 -Patch7010: xserver-1.10.1-Xi-fix-valuator-alignment-in-DeepCopyDeviceClasses-3.patch - # not like the upstream patch due to refactoring Patch7011: xserver-1.10-swrastg.patch @@ -568,6 +563,12 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Mon May 30 2011 Peter Hutterer 1.10.2-1 +- xserver 1.10.2 +- xserver-1.10-glx-pixmap-crash.patch: drop, b5093063b +- xserver-1.10.1-Xi-fix-valuator-alignment-in-DeepCopyDeviceClasses-3.patch: + drop, d6328c6bfe4 + * Sun May 29 2011 Dave Airlie 1.10.1-15 - fix xsetroot -bg crash, from xorg-devel (#705631) diff --git a/xserver-1.10-glx-pixmap-crash.patch b/xserver-1.10-glx-pixmap-crash.patch deleted file mode 100644 index ae635af..0000000 --- a/xserver-1.10-glx-pixmap-crash.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 2fefa1aff56f6d24dcc0206c60da3d9487832504 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Wed, 30 Mar 2011 16:03:53 -0400 -Subject: [PATCH] glx: Fix lifetime tracking for pixmaps -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap -IDs can be destroyed in either order with no error. Only windows need -to be tracked under both XIDs. - -Fixes piglit/glx-pixmap-life. - -Reviewed-by: Michel Dänzer -Signed-off-by: Adam Jackson ---- - glx/glxcmds.c | 11 +++++++---- - glx/glxext.c | 22 +++++++++++++--------- - 2 files changed, 20 insertions(+), 13 deletions(-) - -diff --git a/glx/glxcmds.c b/glx/glxcmds.c -index 9b4bc9e..9d60bdb 100644 ---- a/glx/glxcmds.c -+++ b/glx/glxcmds.c -@@ -1177,10 +1177,11 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, - return BadAlloc; - } - -- /* Add the glx drawable under the XID of the underlying X drawable -- * too. That way we'll get a callback in DrawableGone and can -- * clean up properly when the drawable is destroyed. */ -- if (drawableId != glxDrawableId && -+ /* -+ * Windows aren't refcounted, so track both the X and the GLX window -+ * so we get called regardless of destruction order. -+ */ -+ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW && - !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) { - pGlxDraw->destroy (pGlxDraw); - return BadAlloc; -@@ -1211,6 +1212,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config - err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId, - glxDrawableId, GLX_DRAWABLE_PIXMAP); - -+ ((PixmapPtr)pDraw)->refcnt++; -+ - return err; - } - -diff --git a/glx/glxext.c b/glx/glxext.c -index 4bd5d6b..cec3ee5 100644 ---- a/glx/glxext.c -+++ b/glx/glxext.c -@@ -124,15 +124,15 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) - { - __GLXcontext *c, *next; - -- /* If this drawable was created using glx 1.3 drawable -- * constructors, we added it as a glx drawable resource under both -- * its glx drawable ID and it X drawable ID. Remove the other -- * resource now so we don't a callback for freed memory. */ -- if (glxPriv->drawId != glxPriv->pDraw->id) { -- if (xid == glxPriv->drawId) -- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); -- else -- FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); -+ if (glxPriv->type == GLX_DRAWABLE_WINDOW) { -+ /* If this was created by glXCreateWindow, free the matching resource */ -+ if (glxPriv->drawId != glxPriv->pDraw->id) { -+ if (xid == glxPriv->drawId) -+ FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); -+ else -+ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); -+ } -+ /* otherwise this window was implicitly created by MakeCurrent */ - } - - for (c = glxAllContexts; c; c = next) { -@@ -168,6 +168,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) - __glXFreeContext(c); - } - -+ /* drop our reference to any backing pixmap */ -+ if (glxPriv->type == GLX_DRAWABLE_PIXMAP) -+ glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw); -+ - glxPriv->destroy(glxPriv); - - return True; --- -1.7.4.1 - diff --git a/xserver-1.10.1-Xi-fix-valuator-alignment-in-DeepCopyDeviceClasses-3.patch b/xserver-1.10.1-Xi-fix-valuator-alignment-in-DeepCopyDeviceClasses-3.patch deleted file mode 100644 index 6c506b7..0000000 --- a/xserver-1.10.1-Xi-fix-valuator-alignment-in-DeepCopyDeviceClasses-3.patch +++ /dev/null @@ -1,215 +0,0 @@ -From 419a27b5219a739f2fbd50cc96a1b54c469e4a88 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 12 Apr 2011 10:17:07 +1000 -Subject: [PATCH] Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119) - -commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 only fixed the -initialization, not the copy. After a slave device change, the valuator -were out of alignment again. - -X.Org Bug 36119 - -Signed-off-by: Peter Hutterer -Reviewed-by: Jeremy Huddleston ---- - Xi/exevents.c | 11 ++++------- - dix/devices.c | 47 +++++++++++++++++++++++++++++++++++++---------- - include/input.h | 5 +++++ - include/inputstr.h | 2 +- - test/input.c | 24 +++++++++++++++++++++++- - 5 files changed, 70 insertions(+), 19 deletions(-) - -diff --git a/Xi/exevents.c b/Xi/exevents.c -index 18803c9..76d5c37 100644 ---- a/Xi/exevents.c -+++ b/Xi/exevents.c -@@ -535,6 +535,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) - if (from->valuator) - { - ValuatorClassPtr v; -+ - if (!to->valuator) - { - classes = to->unused_classes; -@@ -543,18 +544,14 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) - classes->valuator = NULL; - } - -- to->valuator = realloc(to->valuator, sizeof(ValuatorClassRec) + -- from->valuator->numAxes * sizeof(AxisInfo) + -- from->valuator->numAxes * sizeof(double)); -- v = to->valuator; -+ v = AllocValuatorClass(to->valuator, from->valuator->numAxes); -+ - if (!v) - FatalError("[Xi] no memory for class shift.\n"); - -- v->numAxes = from->valuator->numAxes; -- v->axes = (AxisInfoPtr)&v[1]; -+ to->valuator = v; - memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); - -- v->axisVal = (double*)(v->axes + from->valuator->numAxes); - v->sourceid = from->id; - } else if (to->valuator && !from->valuator) - { -diff --git a/dix/devices.c b/dix/devices.c -index 534931c..58bda0d 100644 ---- a/dix/devices.c -+++ b/dix/devices.c -@@ -1221,13 +1221,46 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels, - return TRUE; - } - -+/** -+ * Allocate a valuator class and set up the pointers for the axis values -+ * appropriately. -+ * -+ * @param src If non-NULL, the memory is reallocated from src. If NULL, the -+ * memory is calloc'd. -+ * @parma numAxes Number of axes to allocate. -+ * @return The allocated valuator struct. -+ */ -+ValuatorClassPtr -+AllocValuatorClass(ValuatorClassPtr src, int numAxes) -+{ -+ ValuatorClassPtr v; -+ /* force alignment with double */ -+ union align_u { ValuatorClassRec valc; double d; } *align; -+ int size; -+ -+ size = sizeof(union align_u) + numAxes * (sizeof(double) + sizeof(AxisInfo)); -+ align = (union align_u *) realloc(src, size); -+ -+ if (!align) -+ return NULL; -+ -+ if (!src) -+ memset(align, 0, size); -+ -+ v = &align->valc; -+ v->numAxes = numAxes; -+ v->axisVal = (double*)(align + 1); -+ v->axes = (AxisInfoPtr)(v->axisVal + numAxes); -+ -+ return v; -+} -+ - Bool - InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, - int numMotionEvents, int mode) - { - int i; - ValuatorClassPtr valc; -- union align_u { ValuatorClassRec valc; double d; } *align; - - if (!dev) - return FALSE; -@@ -1240,13 +1273,10 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, - numAxes = MAX_VALUATORS; - } - -- align = (union align_u *) calloc(1, sizeof(union align_u) + -- numAxes * sizeof(double) + -- numAxes * sizeof(AxisInfo)); -- if (!align) -- return FALSE; -+ valc = AllocValuatorClass(NULL, numAxes); -+ if (!valc) -+ return FALSE; - -- valc = &align->valc; - valc->sourceid = dev->id; - valc->motion = NULL; - valc->first_motion = 0; -@@ -1254,9 +1284,6 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, - - valc->numMotionEvents = numMotionEvents; - valc->motionHintWindow = NullWindow; -- valc->numAxes = numAxes; -- valc->axisVal = (double *)(align + 1); -- valc->axes = (AxisInfoPtr)(valc->axisVal + numAxes); - - if (mode & OutOfProximity) - InitProximityClassDeviceStruct(dev); -diff --git a/include/input.h b/include/input.h -index 2bb85ff..4aad304 100644 ---- a/include/input.h -+++ b/include/input.h -@@ -102,6 +102,7 @@ typedef unsigned long Leds; - typedef struct _OtherClients *OtherClientsPtr; - typedef struct _InputClients *InputClientsPtr; - typedef struct _DeviceIntRec *DeviceIntPtr; -+typedef struct _ValuatorClassRec *ValuatorClassPtr; - typedef struct _ClassesRec *ClassesPtr; - typedef struct _SpriteRec *SpritePtr; - typedef union _GrabMask GrabMask; -@@ -300,6 +301,10 @@ extern _X_EXPORT Bool InitButtonClassDeviceStruct( - Atom* /* labels */, - CARD8* /*map*/); - -+extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass( -+ ValuatorClassPtr src, -+ int numAxes); -+ - extern _X_EXPORT Bool InitValuatorClassDeviceStruct( - DeviceIntPtr /*device*/, - int /*numAxes*/, -diff --git a/include/inputstr.h b/include/inputstr.h -index f63df80..bd7c78d 100644 ---- a/include/inputstr.h -+++ b/include/inputstr.h -@@ -283,7 +283,7 @@ typedef struct _ValuatorClassRec { - unsigned short numAxes; - double *axisVal; /* always absolute, but device-coord system */ - ValuatorAccelerationRec accelScheme; --} ValuatorClassRec, *ValuatorClassPtr; -+} ValuatorClassRec; - - typedef struct _ButtonClassRec { - int sourceid; -diff --git a/test/input.c b/test/input.c -index c13b4f2..89cce3f 100644 ---- a/test/input.c -+++ b/test/input.c -@@ -1209,6 +1209,28 @@ static void include_bit_test_macros(void) - } - } - -+/** -+ * Ensure that val->axisVal and val->axes are aligned on doubles. -+ */ -+static void dix_valuator_alloc(void) -+{ -+ ValuatorClassPtr v = NULL; -+ int num_axes = 0; -+ -+ while (num_axes < 5) -+ { -+ v = AllocValuatorClass(v, num_axes); -+ -+ g_assert(v); -+ g_assert(v->numAxes == num_axes); -+ g_assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0); -+ g_assert(((void*)v->axes - (void*)v) % sizeof(double) == 0); -+ num_axes ++; -+ } -+ -+ free(v); -+} -+ - int main(int argc, char** argv) - { - g_test_init(&argc, &argv,NULL); -@@ -1226,7 +1248,7 @@ int main(int argc, char** argv) - g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros); - g_test_add_func("/include/bit_test_macros", include_bit_test_macros); - g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers); -- -+ g_test_add_func("/dix/input/valuator-alloc", dix_valuator_alloc); - - return g_test_run(); - } --- -1.7.4.4 -