xorg-server: Changes to 'ubuntu'
debian/changelog | 15 -
debian/patches/187_edid_quirk_hp_nc8430.patch | 14 -
debian/patches/189_xserver_1.5.0_bg_none_root.patch | 140 ----------
debian/patches/197_xvfb-randr.patch | 26 -
debian/patches/202_xf86CoordinatesToWindows.patch | 101 -------
debian/patches/204_fix-neg-sync-transition.patch | 84 ------
debian/patches/207_dga_master_device.patch | 27 -
debian/patches/211_glx_fix_bindtextimageext_length_check.patch | 56 ----
debian/patches/212_fix_request_length_check_for_createglxpbuffersgix.patch | 26 -
debian/patches/214_glx_dri_searchdirs.patch | 47 ++-
debian/patches/215_glx_drawable_refcounting.diff | 120 ++++++++
debian/patches/series | 3
12 files changed, 163 insertions(+), 496 deletions(-)
New commits:
commit b00a1277fffc81a2bb61ca407d58e756069e60e1
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Feb 21 17:43:55 2011 +1100
Pull patch from xorg-devel@ to fix use-after-free of GLXdrawables
diff --git a/debian/changelog b/debian/changelog
index 1429876..a89c72d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -73,6 +73,10 @@ xorg-server (2:1.9.99.902-2ubuntu1) UNRELEASED; urgency=low
- Fix nouveau check to downgrade missing DRI error messages to info.
We don't support nouveau's 3D, so let's not complain too strenuously
when it's not installed.
+ * debian/patches/215_glx_drawable_refcounting.diff:
+ - Refcount GLXDrawables to avoid use-after-free crashes. Patch from
+ xorg-devel mailing list. Prevents segfault on logout and server
+ regenerate, and possibly other times. (LP: #711422)
-- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 21 Feb 2011 16:39:06 +1100
diff --git a/debian/patches/215_glx_drawable_refcounting.diff b/debian/patches/215_glx_drawable_refcounting.diff
new file mode 100644
index 0000000..6befd72
--- /dev/null
+++ b/debian/patches/215_glx_drawable_refcounting.diff
@@ -0,0 +1,120 @@
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Subject: [PATCH] glx: Refcnt the GLXDrawable to avoid use after free with
+ multiple FreeResource
+
+Although there may be more than one resource handles pointing to the
+Drawable, we only want to destroy it once and only reference the
+resource which may have just been deleted on the first instance.
+
+v2: Apply fixes and combine with another bug fix from Michel Dänzer,
+ https://bugs.freedesktop.org/show_bug.cgi?id=28181
+
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Cc: Kristian Høgsberg <krh@bitplanet.net>
+Cc: Michel Dänzer <daenzer@vmware.com>
+---
+ glx/glxcmds.c | 23 +++++++++++++++--------
+ glx/glxdrawable.h | 3 +++
+ glx/glxext.c | 15 ++++++++++-----
+ 3 files changed, 28 insertions(+), 13 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index de9c3f0..b3ea784 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -529,6 +529,7 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
+ *error = BadAlloc;
+ return NULL;
+ }
++ pGlxDraw->refcnt++;
+
+ return pGlxDraw;
+ }
+@@ -1099,8 +1100,10 @@ __glXDrawableInit(__GLXdrawable *drawable,
+ drawable->pDraw = pDraw;
+ drawable->type = type;
+ drawable->drawId = drawId;
++ drawable->otherId = 0;
+ drawable->config = config;
+ drawable->eventMask = 0;
++ drawable->refcnt = 0;
+
+ return GL_TRUE;
+ }
+@@ -1130,14 +1133,18 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen,
+ pGlxDraw->destroy (pGlxDraw);
+ return BadAlloc;
+ }
++ pGlxDraw->refcnt++;
+
+- /* 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 &&
+- !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
+- pGlxDraw->destroy (pGlxDraw);
+- return BadAlloc;
++ if (drawableId != glxDrawableId) {
++ /* 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 (!AddResource(drawableId, __glXDrawableRes, pGlxDraw)) {
++ pGlxDraw->destroy (pGlxDraw);
++ return BadAlloc;
++ }
++ pGlxDraw->refcnt++;
++ pGlxDraw->otherId = drawableId;
+ }
+
+ return Success;
+diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h
+index 2a365c5..80c3234 100644
+--- a/glx/glxdrawable.h
++++ b/glx/glxdrawable.h
+@@ -51,8 +51,11 @@ struct __GLXdrawable {
+ void (*waitX)(__GLXdrawable *);
+ void (*waitGL)(__GLXdrawable *);
+
++ int refcnt; /* number of resources handles referencing this */
++
+ DrawablePtr pDraw;
+ XID drawId;
++ XID otherId; /* for glx1.3 we need to track the original Drawable as well */
+
+ /*
+ ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
+diff --git a/glx/glxext.c b/glx/glxext.c
+index 4bd5d6b..77db8b0 100644
+--- a/glx/glxext.c
++++ b/glx/glxext.c
+@@ -128,13 +128,18 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
+ * 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->otherId) {
++ XID other = glxPriv->otherId;
++ glxPriv->otherId = 0;
++ if (xid == other)
++ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
++ else
++ FreeResourceByType(other, __glXDrawableRes, TRUE);
+ }
+
++ if (--glxPriv->refcnt)
++ return True;
++
+ for (c = glxAllContexts; c; c = next) {
+ next = c->next;
+ if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+--
+1.7.2.3
+
+_______________________________________________
+xorg-devel@lists.x.org: X.Org development
+Archives: http://lists.x.org/archives/xorg-devel
+Info: http://lists.x.org/mailman/listinfo/xorg-devel
diff --git a/debian/patches/series b/debian/patches/series
index 25d23d9..88a97be 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -36,3 +36,4 @@
210_pixman_null_ptr_check.patch
213_xichangehierarchy-check-oom.patch
214_glx_dri_searchdirs.patch
+215_glx_drawable_refcounting.diff
commit 380656e1c1c23c25f83997aad58fd578cf3bc98b
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Feb 21 16:57:01 2011 +1100
Fix nouveau missing DRI error silencing
diff --git a/debian/changelog b/debian/changelog
index 794a141..1429876 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -69,8 +69,12 @@ xorg-server (2:1.9.99.902-2ubuntu1) UNRELEASED; urgency=low
* 211_glx_fix_bindtextimageext_length_check.patch:
* 212_fix_request_length_check_for_createglxpbuffersgix.patch:
- Drop; these cherry-picks are included in 1.10RC2
-
- -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 21 Feb 2011 15:40:19 +1100
+ * debian/patches/214_glx_dri_searchdirs.patch:
+ - Fix nouveau check to downgrade missing DRI error messages to info.
+ We don't support nouveau's 3D, so let's not complain too strenuously
+ when it's not installed.
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 21 Feb 2011 16:39:06 +1100
xorg-server (2:1.9.99.902-2) experimental; urgency=low
diff --git a/debian/patches/214_glx_dri_searchdirs.patch b/debian/patches/214_glx_dri_searchdirs.patch
index 4baaa0a..d778aea 100644
--- a/debian/patches/214_glx_dri_searchdirs.patch
+++ b/debian/patches/214_glx_dri_searchdirs.patch
@@ -1,7 +1,7 @@
Index: xorg-server/glx/glxdri.c
===================================================================
---- xorg-server.orig/glx/glxdri.c 2011-02-18 12:53:47.493408035 +1100
-+++ xorg-server/glx/glxdri.c 2011-02-18 12:53:47.963408733 +1100
+--- xorg-server.orig/glx/glxdri.c 2011-02-21 16:27:15.608549466 +1100
++++ xorg-server/glx/glxdri.c 2011-02-21 16:37:17.849432756 +1100
@@ -858,8 +858,6 @@
@@ -67,7 +67,7 @@ Index: xorg-server/glx/glxdri.c
- driverName);
- goto handle_error;
- }
-+ from = strcmp(driverName, "nouveau_vieux") ? X_ERROR : X_INFO;
++ from = strncmp(driverName, "nouveau", sizeof "nouveau") ? X_ERROR : X_INFO;
+ screen->driver = glxProbeDriver(driverName, &cookie,
+ (void **)&screen->core,
+ __DRI_CORE, __DRI_CORE_VERSION,
@@ -126,8 +126,8 @@ Index: xorg-server/glx/glxdri.c
Index: xorg-server/glx/glxdri2.c
===================================================================
---- xorg-server.orig/glx/glxdri2.c 2011-02-18 12:53:47.493408035 +1100
-+++ xorg-server/glx/glxdri2.c 2011-02-18 12:53:47.963408733 +1100
+--- xorg-server.orig/glx/glxdri2.c 2011-02-21 16:27:15.618549476 +1100
++++ xorg-server/glx/glxdri2.c 2011-02-21 16:32:47.869036782 +1100
@@ -599,8 +599,6 @@
NULL
};
@@ -137,7 +137,7 @@ Index: xorg-server/glx/glxdri2.c
static Bool
glxDRIEnterVT (int index, int flags)
{
-@@ -701,13 +699,11 @@
+@@ -701,14 +699,11 @@
__glXDRIscreenProbe(ScreenPtr pScreen)
{
const char *driverName, *deviceName;
@@ -149,10 +149,11 @@ Index: xorg-server/glx/glxdri2.c
- const __DRIextension **extensions;
const __DRIconfig **driConfigs;
- int i;
- int from = X_ERROR;
+- int from = X_ERROR;
screen = calloc(1, sizeof *screen);
-@@ -730,54 +726,24 @@
+ if (screen == NULL)
+@@ -730,54 +725,24 @@
__glXInitExtensionEnableBits(screen->glx_enable_bits);
@@ -223,7 +224,7 @@ Index: xorg-server/glx/glxdri2.c
initializeExtensions(screen);
-@@ -819,7 +785,7 @@
+@@ -819,7 +784,7 @@
pScrn->LeaveVT = glxDRILeaveVT;
LogMessage(X_INFO,
@@ -232,10 +233,20 @@ Index: xorg-server/glx/glxdri2.c
return &screen->base;
+@@ -829,7 +794,8 @@
+
+ free(screen);
+
+- LogMessage(from, "AIGLX: reverting to software rendering\n");
++ LogMessage(strncmp(driverName, "nouveau", sizeof "nouveau") ? X_ERROR : X_INFO,
++ "AIGLX: reverting to software rendering\n");
+
+ return NULL;
+ }
Index: xorg-server/glx/glxdricommon.c
===================================================================
---- xorg-server.orig/glx/glxdricommon.c 2011-02-18 12:53:23.303372560 +1100
-+++ xorg-server/glx/glxdricommon.c 2011-02-18 16:52:47.373554735 +1100
+--- xorg-server.orig/glx/glxdricommon.c 2011-02-21 16:14:58.587468479 +1100
++++ xorg-server/glx/glxdricommon.c 2011-02-21 16:27:16.768551168 +1100
@@ -29,6 +29,7 @@
#include <stdint.h>
@@ -335,8 +346,8 @@ Index: xorg-server/glx/glxdricommon.c
+}
Index: xorg-server/glx/glxdricommon.h
===================================================================
---- xorg-server.orig/glx/glxdricommon.h 2011-02-18 12:53:23.383372676 +1100
-+++ xorg-server/glx/glxdricommon.h 2011-02-18 12:53:47.963408733 +1100
+--- xorg-server.orig/glx/glxdricommon.h 2011-02-21 16:14:58.617468523 +1100
++++ xorg-server/glx/glxdricommon.h 2011-02-21 16:27:16.778551178 +1100
@@ -38,4 +38,9 @@
extern const __DRIsystemTimeExtension systemTimeExtension;
@@ -349,8 +360,8 @@ Index: xorg-server/glx/glxdricommon.h
#endif
Index: xorg-server/glx/glxdriswrast.c
===================================================================
---- xorg-server.orig/glx/glxdriswrast.c 2011-02-18 12:53:23.313372568 +1100
-+++ xorg-server/glx/glxdriswrast.c 2011-02-18 12:53:47.963408733 +1100
+--- xorg-server.orig/glx/glxdriswrast.c 2011-02-21 16:15:25.147507439 +1100
++++ xorg-server/glx/glxdriswrast.c 2011-02-21 16:27:16.778551178 +1100
@@ -427,17 +427,13 @@
}
}
@@ -427,9 +438,9 @@ Index: xorg-server/glx/glxdriswrast.c
Index: xorg-server/configure.ac
===================================================================
---- xorg-server.orig/configure.ac 2011-02-18 12:53:47.823408519 +1100
-+++ xorg-server/configure.ac 2011-02-18 12:53:47.963408733 +1100
-@@ -1254,7 +1254,12 @@
+--- xorg-server.orig/configure.ac 2011-02-21 16:27:16.498550772 +1100
++++ xorg-server/configure.ac 2011-02-21 16:27:16.778551178 +1100
+@@ -1259,7 +1259,12 @@
AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path])
dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`
commit 0320031c6455d9d5d081a3aead5d11e28c79580c
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Feb 21 16:09:28 2011 +1100
Clean out some no-longer-applied patches
diff --git a/debian/patches/187_edid_quirk_hp_nc8430.patch b/debian/patches/187_edid_quirk_hp_nc8430.patch
deleted file mode 100644
index 6ee87f1..0000000
--- a/debian/patches/187_edid_quirk_hp_nc8430.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/hw/xfree86/modes/xf86EdidModes.c
-+++ b/hw/xfree86/modes/xf86EdidModes.c
-@@ -150,6 +150,11 @@ static Bool quirk_detailed_v_in_cm (int
- DDC->vendor.prod_id == 1157)
- return TRUE;
-
-+ /* LP #380009: HP Compaq NC8430 LP154W01-TLA8 */
-+ if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
-+ DDC->vendor.prod_id == 5750)
-+ return TRUE;
-+
- return FALSE;
- }
-
diff --git a/debian/patches/189_xserver_1.5.0_bg_none_root.patch b/debian/patches/189_xserver_1.5.0_bg_none_root.patch
deleted file mode 100644
index 2a2c28b..0000000
--- a/debian/patches/189_xserver_1.5.0_bg_none_root.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From b4e4b980663692a3af5787eeaf2d48eb6c0188ed Mon Sep 17 00:00:00 2001
-From: Fedora X Ninjas <airlied@redhat.com>
-Date: Tue, 4 Aug 2009 14:45:58 +1000
-Subject: [PATCH] Add nr for background=none root
-
----
- dix/globals.c | 1 +
- dix/window.c | 12 +++++++-----
- hw/xfree86/common/xf86Init.c | 11 +++++++++++
- hw/xfree86/common/xf86str.h | 5 ++++-
- include/opaque.h | 1 +
- os/utils.c | 3 +++
- 6 files changed, 27 insertions(+), 6 deletions(-)
-
---- a/dix/globals.c
-+++ b/dix/globals.c
-@@ -124,6 +124,7 @@ FontPtr defaultFont; /* not declared i
- CursorPtr rootCursor;
- Bool party_like_its_1989 = FALSE;
- Bool whiteRoot = FALSE;
-+Bool bgNoneRoot = FALSE;
-
- int cursorScreenDevPriv[MAXSCREENS];
-
---- a/dix/window.c
-+++ b/dix/window.c
-@@ -466,22 +466,24 @@ InitRootWindow(WindowPtr pWin)
- pWin->optional->cursor = rootCursor;
- rootCursor->refcnt++;
-
-+ pWin->backingStore = defaultBackingStore;
-+ pWin->forcedBS = (defaultBackingStore != NotUseful);
-
- if (party_like_its_1989) {
- MakeRootTile(pWin);
- backFlag |= CWBackPixmap;
-+ pScreen->ChangeWindowAttributes(pWin, backFlag);
-+ } else if (bgNoneRoot) {
-+ /* nothing, handled in xf86CreateRootWindow */
- } else {
- if (whiteRoot)
- pWin->background.pixel = pScreen->whitePixel;
- else
- pWin->background.pixel = pScreen->blackPixel;
- backFlag |= CWBackPixel;
-- }
-
-- pWin->backingStore = defaultBackingStore;
-- pWin->forcedBS = (defaultBackingStore != NotUseful);
-- /* We SHOULD check for an error value here XXX */
-- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
-+ pScreen->ChangeWindowAttributes(pWin, backFlag);
-+ }
-
- MapWindow(pWin, serverClient);
- }
---- a/hw/xfree86/common/xf86Init.c
-+++ b/hw/xfree86/common/xf86Init.c
-@@ -77,6 +77,7 @@
- #ifdef RENDER
- #include "picturestr.h"
- #endif
-+#include "xace.h"
-
- #include "xf86VGAarbiter.h"
- #include "globals.h"
-@@ -256,6 +257,7 @@ xf86CreateRootWindow(WindowPtr pWin)
- int ret = TRUE;
- int err = Success;
- ScreenPtr pScreen = pWin->drawable.pScreen;
-+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- RootWinPropPtr pProp;
- CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
- dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
-@@ -307,6 +309,15 @@ xf86CreateRootWindow(WindowPtr pWin)
- }
- }
-
-+ if (bgNoneRoot && pScrn->canDoBGNoneRoot) {
-+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
-+ pWin->background.pixel = pScreen->whitePixel;
-+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
-+ } else {
-+ pWin->background.pixel = pScreen->blackPixel;
-+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
-+ }
-+
- DebugF("xf86CreateRootWindow() returns %d\n", ret);
- return (ret);
- }
---- a/hw/xfree86/common/xf86str.h
-+++ b/hw/xfree86/common/xf86str.h
-@@ -503,7 +503,7 @@ typedef struct _confdrirec {
- } confDRIRec, *confDRIPtr;
-
- /* These values should be adjusted when new fields are added to ScrnInfoRec */
--#define NUM_RESERVED_INTS 16
-+#define NUM_RESERVED_INTS 15
- #define NUM_RESERVED_POINTERS 14
- #define NUM_RESERVED_FUNCS 11
-
-@@ -775,6 +775,9 @@ typedef struct _ScrnInfoRec {
- ClockRangePtr clockRanges;
- int adjustFlags;
-
-+ /* -nr support */
-+ int canDoBGNoneRoot;
-+
- /*
- * These can be used when the minor ABI version is incremented.
- * The NUM_* parameters must be reduced appropriately to keep the
---- a/include/opaque.h
-+++ b/include/opaque.h
-@@ -71,6 +71,7 @@ extern _X_EXPORT Bool defeatAccessContro
- extern _X_EXPORT long maxBigRequestSize;
- extern _X_EXPORT Bool party_like_its_1989;
- extern _X_EXPORT Bool whiteRoot;
-+extern _X_EXPORT Bool bgNoneRoot;
-
- extern _X_EXPORT Bool CoreDump;
-
---- a/os/utils.c
-+++ b/os/utils.c
-@@ -511,6 +511,7 @@ void UseMsg(void)
- #endif
- ErrorF("-nolisten string don't listen on protocol\n");
- ErrorF("-noreset don't reset after last client exists\n");
-+ ErrorF("-nr create root window with no background\n");
- ErrorF("-reset reset after last client exists\n");
- ErrorF("-p # screen-saver pattern duration (minutes)\n");
- ErrorF("-pn accept failure to listen on all ports\n");
-@@ -852,6 +853,8 @@ ProcessCommandLine(int argc, char *argv[
- defaultBackingStore = WhenMapped;
- else if ( strcmp( argv[i], "-wr") == 0)
- whiteRoot = TRUE;
-+ else if ( strcmp( argv[i], "-nr") == 0)
-+ bgNoneRoot = TRUE;
- else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
- if(++i < argc) {
- long reqSizeArg = atol(argv[i]);
diff --git a/debian/patches/197_xvfb-randr.patch b/debian/patches/197_xvfb-randr.patch
deleted file mode 100644
index 5564099..0000000
--- a/debian/patches/197_xvfb-randr.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-=== modified file 'hw/vfb/InitOutput.c'
-Index: xorg-server/hw/vfb/InitOutput.c
-===================================================================
---- xorg-server.orig/hw/vfb/InitOutput.c 2011-01-10 16:10:26.000000000 -0600
-+++ xorg-server/hw/vfb/InitOutput.c 2011-01-10 17:02:37.000000000 -0600
-@@ -66,6 +66,7 @@
- #endif /* HAS_SHM */
- #include "dix.h"
- #include "miline.h"
-+#include "randrstr.h"
-
- #define VFB_DEFAULT_WIDTH 1280
- #define VFB_DEFAULT_HEIGHT 1024
-@@ -881,6 +882,12 @@
-
- if (!ret) return FALSE;
-
-+ if (!miRandRInit(pScreen)) {
-+ xf86DrvMsg(pScreen->index, X_WARNING,
-+ "Could not initialise RANDR\n");
-+ return FALSE;
-+ }
-+
- pScreen->InstallColormap = vfbInstallColormap;
- pScreen->UninstallColormap = vfbUninstallColormap;
- pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
diff --git a/debian/patches/202_xf86CoordinatesToWindows.patch b/debian/patches/202_xf86CoordinatesToWindows.patch
deleted file mode 100644
index 4d8156a..0000000
--- a/debian/patches/202_xf86CoordinatesToWindows.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 88538741de597a2595d89d7518f123c3b16c6d4f Mon Sep 17 00:00:00 2001
-From: Chase Douglas <chase.douglas@canonical.com>
-Date: Tue, 25 Jan 2011 22:44:41 -0500
-Subject: [PATCH] Add xf86CoordinatesToWIndow
-
----
- dix/events.c | 44 ++++++++++++++++++++++++++++++++++++++++
- hw/xfree86/common/xf86Xinput.c | 6 +++++
- hw/xfree86/common/xf86Xinput.h | 2 +
- include/events.h | 3 ++
- 4 files changed, 55 insertions(+), 0 deletions(-)
-
---- a/dix/events.c
-+++ b/dix/events.c
-@@ -5811,3 +5811,47 @@ IsInterferingGrab(ClientPtr client, Devi
- return FALSE;
- }
-
-+WindowPtr
-+CoordinatesToWindow(int x, int y, int screen)
-+{
-+ WindowPtr pWin;
-+ WindowPtr ret = NullWindow;
-+ BoxRec box;
-+
-+ pWin = screenInfo.screens[screen]->root;
-+ while (pWin)
-+ {
-+ if ((pWin->mapped) &&
-+ (x >= pWin->drawable.x - wBorderWidth (pWin)) &&
-+ (x < pWin->drawable.x + (int)pWin->drawable.width +
-+ wBorderWidth(pWin)) &&
-+ (y >= pWin->drawable.y - wBorderWidth (pWin)) &&
-+ (y < pWin->drawable.y + (int)pWin->drawable.height +
-+ wBorderWidth (pWin))
-+ /* When a window is shaped, a further check
-+ * is made to see if the point is inside
-+ * borderSize
-+ */
-+ && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
-+ && (!wInputShape(pWin) ||
-+ RegionContainsPoint(wInputShape(pWin),
-+ x - pWin->drawable.x,
-+ y - pWin->drawable.y, &box))
-+#ifdef ROOTLESS
-+ /* In rootless mode windows may be offscreen, even when
-+ * they're in X's stack. (E.g. if the native window system
-+ * implements some form of virtual desktop system).
-+ */
-+ && !pWin->rootlessUnhittable
-+#endif
-+ )
-+ {
-+ ret = pWin;
-+ pWin = pWin->firstChild;
-+ }
-+ else
-+ pWin = pWin->nextSib;
-+ }
-+ return ret;
-+}
-+
---- a/hw/xfree86/common/xf86Xinput.c
-+++ b/hw/xfree86/common/xf86Xinput.c
-@@ -1396,4 +1396,10 @@ xf86EnableDevice(DeviceIntPtr dev)
- EnableDevice(dev, TRUE);
- }
-
-+WindowPtr
-+xf86CoordinatesToWindow(int x, int y, int screen)
-+{
-+ return CoordinatesToWindow(x, y, screen);
-+}
-+
- /* end of xf86Xinput.c */
---- a/hw/xfree86/common/xf86Xinput.h
-+++ b/hw/xfree86/common/xf86Xinput.h
-@@ -179,4 +179,6 @@ extern _X_EXPORT void xf86VIDrvMsgVerb(I
- /* xf86Option.c */
- extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);
-
-+extern _X_EXPORT WindowPtr xf86CoordinatesToWindow(int x, int y, int screen);
-+
- #endif /* _xf86Xinput_h */
---- a/include/events.h
-+++ b/include/events.h
-@@ -24,6 +24,7 @@
-
- #ifndef EVENTS_H
- #define EVENTS_H
-+
- typedef struct _DeviceEvent DeviceEvent;
- typedef struct _DeviceChangedEvent DeviceChangedEvent;
- #if XFreeXDGA
-@@ -35,4 +36,6 @@ typedef struct _XQuartzEvent XQuartzEven
- #endif
- typedef union _InternalEvent InternalEvent;
-
-+extern WindowPtr CoordinatesToWindow(int x, int y, int screen);
-+
- #endif
diff --git a/debian/patches/204_fix-neg-sync-transition.patch b/debian/patches/204_fix-neg-sync-transition.patch
deleted file mode 100644
index f10fb32..0000000
--- a/debian/patches/204_fix-neg-sync-transition.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-commit da218289275e67e49d801d58dd818d237de8a9bc
-Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
-Date: Tue Aug 24 13:30:25 2010 +1000
-
- Xext: Fix edge case with {Positive,Negative}Transition triggers.
-
- The {Positive,Negative}Transition triggers only fire when the counter
- goes from strictly {below,above} the threshold. If
- SyncComputeBracketValues gets called exactly at this threshold we may update
- the bracket values so that the counter is not updated past the threshold.
-
- Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
-
-diff --git a/Xext/sync.c b/Xext/sync.c
-index a51262a..c00e692 100644
---- a/Xext/sync.c
-+++ b/Xext/sync.c
-@@ -959,6 +959,17 @@ SyncComputeBracketValues(SyncCounter *pCounter)
- {
- psci->bracket_less = pTrigger->test_value;
- pnewltval = &psci->bracket_less;
-+ } else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-+ XSyncValueLessThan(pTrigger->test_value,
-+ psci->bracket_greater))
-+ {
-+ /*
-+ * The value is exactly equal to our threshold. We want one
-+ * more event in the positive direction to ensure we pick up
-+ * when the value *exceeds* this threshold.
-+ */
-+ psci->bracket_greater = pTrigger->test_value;
-+ pnewgtval = &psci->bracket_greater;
- }
- }
- else if (pTrigger->test_type == XSyncPositiveTransition &&
-@@ -969,6 +980,17 @@ SyncComputeBracketValues(SyncCounter *pCounter)
- {
- psci->bracket_greater = pTrigger->test_value;
- pnewgtval = &psci->bracket_greater;
-+ } else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) &&
-+ XSyncValueGreaterThan(pTrigger->test_value,
-+ psci->bracket_less))
-+ {
-+ /*
-+ * The value is exactly equal to our threshold. We want one
-+ * more event in the negative direction to ensure we pick up
-+ * when the value is less than this threshold.
-+ */
-+ psci->bracket_less = pTrigger->test_value;
-+ pnewltval = &psci->bracket_less;
- }
- }
- } /* end for each trigger */
-commit d9e9c0c3cf0456f78b6eed3290e6a418e38963fb
-Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
-Date: Tue Aug 24 13:35:05 2010 +1000
-
- IDLETIME: Fix edge-case in IdleTimeBlockHandler
-
- Ensure that if we're called exactly on the threshold of a
- NegativeTransition trigger that we reshedule to pick up
- an idle time over the threshold.
-
- Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
-
-diff --git a/Xext/sync.c b/Xext/sync.c
-index c00e692..314b63e 100644
---- a/Xext/sync.c
-+++ b/Xext/sync.c
-@@ -2322,6 +2322,14 @@ IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask)
- break;
- }
- }
-+ /*
-+ * We've been called exactly on the idle time, but we have a
-+ * NegativeTransition trigger which requires a transition from an
-+ * idle time greater than this. Schedule a wakeup for the next
-+ * millisecond so we won't miss a transition.
-+ */
-+ if (XSyncValueEqual (idle, *pIdleTimeValueLess))
-+ AdjustWaitForDelay(wt, 1);
- }
- else if (pIdleTimeValueGreater)
- {
diff --git a/debian/patches/207_dga_master_device.patch b/debian/patches/207_dga_master_device.patch
deleted file mode 100644
index 185c7cf..0000000
--- a/debian/patches/207_dga_master_device.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/mi/mieq.c b/mi/mieq.c
-index fa60b40..af1bc84 100644
---- a/mi/mieq.c
-+++ b/mi/mieq.c
-@@ -320,6 +320,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
- {
- DeviceIntPtr mdev;
- int len = original->any.length;
-+ int type = original->any.type;
-
- CHECKEVENT(original);
-
-@@ -327,7 +328,12 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
- if (!sdev || !sdev->u.master)
- return NULL;
-
-- switch(original->any.type)
-+#if XFreeXDGA
-+ if (type == ET_DGAEvent)
-+ type = original->dga_event.subtype;
-+#endif
-+
-+ switch(type)
- {
- case ET_KeyPress:
- case ET_KeyRelease:
-
commit 6d0095e0ac8382c931980aeab670eba9107a81d4
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Feb 21 16:06:17 2011 +1100
Drop cherry-picked patches now in the tarball
diff --git a/debian/changelog b/debian/changelog
index 0b8d3e6..794a141 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -66,7 +66,10 @@ xorg-server (2:1.9.99.902-2ubuntu1) UNRELEASED; urgency=low
+ debian/patches/214_glx_dri_searchdirs.patch:
Search in same paths as mesa for DRI drivers for AIGLX so we can handle
UMS fallback for radeon gracefully.
-
+ * 211_glx_fix_bindtextimageext_length_check.patch:
+ * 212_fix_request_length_check_for_createglxpbuffersgix.patch:
+ - Drop; these cherry-picks are included in 1.10RC2
+
-- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 21 Feb 2011 15:40:19 +1100
xorg-server (2:1.9.99.902-2) experimental; urgency=low
diff --git a/debian/patches/211_glx_fix_bindtextimageext_length_check.patch b/debian/patches/211_glx_fix_bindtextimageext_length_check.patch
deleted file mode 100644
index 114c0f7..0000000
--- a/debian/patches/211_glx_fix_bindtextimageext_length_check.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-diff --git a/glx/glxcmds.c b/glx/glxcmds.c
-index 0b375c3..5d633df 100644
---- a/glx/glxcmds.c
-+++ b/glx/glxcmds.c
-@@ -1697,13 +1697,21 @@ int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
- GLXDrawable drawId;
- int buffer;
- int error;
-+ CARD32 num_attribs;
-
-- REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8);
-+ if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len)
-+ return BadLength;
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
-
- drawId = *((CARD32 *) (pc));
- buffer = *((INT32 *) (pc + 4));
-+ num_attribs = *((CARD32 *) (pc + 8));
-+ if (num_attribs > (UINT32_MAX >> 3)) {
-+ client->errorValue = num_attribs;
-+ return BadValue;
-+ }
-+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 12 + (num_attribs << 3));
-
- if (buffer != GLX_FRONT_LEFT_EXT)
- return __glXError(GLXBadPixmap);
-diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
-index 9d96c9d..d58de62 100644
---- a/glx/glxcmdsswap.c
-+++ b/glx/glxcmdsswap.c
-@@ -648,19 +648,23 @@ int __glXDispSwap_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
- GLXDrawable *drawId;
- int *buffer;
-+ CARD32 *num_attribs;
- __GLX_DECLARE_SWAP_VARIABLES;
-
-- REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8);
-+ if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len)
-+ return BadLength;
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
-
- drawId = ((GLXDrawable *) (pc));
- buffer = ((int *) (pc + 4));
-+ num_attribs = ((CARD32 *) (pc + 8));
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
- __GLX_SWAP_INT(drawId);
- __GLX_SWAP_INT(buffer);
-+ __GLX_SWAP_INT(num_attribs);
-
- return __glXDisp_BindTexImageEXT(cl, (GLbyte *)pc);
- }
diff --git a/debian/patches/212_fix_request_length_check_for_createglxpbuffersgix.patch b/debian/patches/212_fix_request_length_check_for_createglxpbuffersgix.patch
deleted file mode 100644
index a8833d9..0000000
--- a/debian/patches/212_fix_request_length_check_for_createglxpbuffersgix.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/glx/glxcmds.c b/glx/glxcmds.c
-index 3ef567d..0b375c3 100644
---- a/glx/glxcmds.c
-+++ b/glx/glxcmds.c
-@@ -1436,7 +1436,7 @@ int __glXDisp_CreateGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
- ClientPtr client = cl->client;
- xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc;
-
-- REQUEST_SIZE_MATCH(xGLXCreateGLXPbufferSGIXReq);
-+ REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq);
-
- return DoCreatePbuffer(cl->client, req->screen, req->fbconfig,
- req->width, req->height, req->pbuffer);
-diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
-index 3bb4cad..9d96c9d 100644
---- a/glx/glxcmdsswap.c
-+++ b/glx/glxcmdsswap.c
-@@ -421,7 +421,7 @@ int __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState *cl, GLbyte *pc)
- xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
-- REQUEST_SIZE_MATCH(xGLXCreateGLXPbufferSGIXReq);
-+ REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq);
-
- __GLX_SWAP_INT(&req->screen);
- __GLX_SWAP_INT(&req->fbconfig);
diff --git a/debian/patches/series b/debian/patches/series
index 9234827..25d23d9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,7 +34,5 @@
208_switch_on_release.diff
209_add_legacy_bgnone_option.patch
210_pixman_null_ptr_check.patch
-211_glx_fix_bindtextimageext_length_check.patch
-212_fix_request_length_check_for_createglxpbuffersgix.patch
213_xichangehierarchy-check-oom.patch
214_glx_dri_searchdirs.patch
Reply to: