aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/xorg-xserver
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2010-03-30 13:36:45 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-03-30 16:51:07 +0200
commitcd0282a8d89a158d895b695fe8688572cab989c5 (patch)
tree4731aa925c1341526d65589fb21c1ff2b936473e /recipes/xorg-xserver
parent0b47d18bd92e930f43356dba04c29e75dd72caa5 (diff)
downloadopenembedded-cd0282a8d89a158d895b695fe8688572cab989c5.tar.gz
xserver-xorg: bump SRCREV
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/xorg-xserver')
-rw-r--r--recipes/xorg-xserver/xserver-xorg/0001-Add-a-PreConfigureWindow-hook.patch80
-rw-r--r--recipes/xorg-xserver/xserver-xorg/0002-dri2-No-need-to-blit-from-front-on-DRI2GetBuffers-if.patch111
-rw-r--r--recipes/xorg-xserver/xserver-xorg/0003-glx-Enforce-a-1-1-correspondence-between-GLX-and-X11.patch161
-rw-r--r--recipes/xorg-xserver/xserver-xorg/0004-glx-dri2-Notify-the-driver-when-its-buffers-become-i.patch82
-rw-r--r--recipes/xorg-xserver/xserver-xorg/0005-dri2-Support-the-DRI2InvalidateBuffers-event.patch319
-rw-r--r--recipes/xorg-xserver/xserver-xorg_git.bb8
6 files changed, 1 insertions, 760 deletions
diff --git a/recipes/xorg-xserver/xserver-xorg/0001-Add-a-PreConfigureWindow-hook.patch b/recipes/xorg-xserver/xserver-xorg/0001-Add-a-PreConfigureWindow-hook.patch
deleted file mode 100644
index c99b3e3299..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/0001-Add-a-PreConfigureWindow-hook.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 653153e878ed568ce085ce6386d5c7f6ec4cb18e Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Fri, 22 Jan 2010 06:29:34 -0800
-Subject: [PATCH 1/5] Add a PreConfigureWindow hook.
-
-Executed from the ConfigureWindow request, right before sending
-ConfigureNotify to the clients.
-
-This commit breaks the ScreenRec ABI.
-
-Signed-off-by: Francisco Jerez <currojerez@riseup.net>
----
- dix/window.c | 4 ++++
- hw/xfree86/common/xf86Module.h | 6 +++---
- include/scrnintstr.h | 10 ++++++++++
- 3 files changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/dix/window.c b/dix/window.c
-index 2676a54..980436a 100644
---- a/dix/window.c
-+++ b/dix/window.c
-@@ -2303,6 +2303,10 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
- return(Success);
-
- ActuallyDoSomething:
-+ if (pWin->drawable.pScreen->PreConfigureWindow)
-+ (*pWin->drawable.pScreen->PreConfigureWindow)(pWin, x, y,
-+ w, h, bw, pSib);
-+
- if (SubStrSend(pWin, pParent))
- {
- memset(&event, 0, sizeof(xEvent));
-diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
-index bbf5786..d61758f 100644
---- a/hw/xfree86/common/xf86Module.h
-+++ b/hw/xfree86/common/xf86Module.h
-@@ -82,9 +82,9 @@ typedef enum {
- * mask is 0xFFFF0000.
- */
- #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
--#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(7, 0)
--#define ABI_XINPUT_VERSION SET_ABI_VERSION(9, 0)
--#define ABI_EXTENSION_VERSION SET_ABI_VERSION(3, 0)
-+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(8, 0)
-+#define ABI_XINPUT_VERSION SET_ABI_VERSION(10, 0)
-+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(4, 0)
- #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
-
- #define MODINFOSTRING1 0xef23fdc5
-diff --git a/include/scrnintstr.h b/include/scrnintstr.h
-index ab50e7a..467b61c 100644
---- a/include/scrnintstr.h
-+++ b/include/scrnintstr.h
-@@ -399,6 +399,15 @@ typedef void (* PostChangeSaveUnderProcPtr)(
- WindowPtr /*pLayerWin*/,
- WindowPtr /*firstChild*/);
-
-+typedef void (* PreConfigureWindowProcPtr)(
-+ WindowPtr /*pWin*/,
-+ int /*x*/,
-+ int /*y*/,
-+ int /*w*/,
-+ int /*h*/,
-+ int /*bw*/,
-+ WindowPtr /*pSib*/);
-+
- typedef void (* MoveWindowProcPtr)(
- WindowPtr /*pWin*/,
- int /*x*/,
-@@ -581,6 +590,7 @@ typedef struct _Screen {
- MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
- ChangeSaveUnderProcPtr ChangeSaveUnder;
- PostChangeSaveUnderProcPtr PostChangeSaveUnder;
-+ PreConfigureWindowProcPtr PreConfigureWindow;
- MoveWindowProcPtr MoveWindow;
- ResizeWindowProcPtr ResizeWindow;
- GetLayerWindowProcPtr GetLayerWindow;
---
-1.7.0
-
diff --git a/recipes/xorg-xserver/xserver-xorg/0002-dri2-No-need-to-blit-from-front-on-DRI2GetBuffers-if.patch b/recipes/xorg-xserver/xserver-xorg/0002-dri2-No-need-to-blit-from-front-on-DRI2GetBuffers-if.patch
deleted file mode 100644
index 25c073b81e..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/0002-dri2-No-need-to-blit-from-front-on-DRI2GetBuffers-if.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 2723b7a678e75e0a070e90ec223309c9b739d24b Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Fri, 22 Jan 2010 06:29:35 -0800
-Subject: [PATCH 2/5] dri2: No need to blit from front on DRI2GetBuffers if they're just being reused.
-
-It can be quite an expensive operation, so we're better off not doing
-it unless it's totally required.
-
-Signed-off-by: Francisco Jerez <currojerez@riseup.net>
----
- hw/xfree86/dri2/dri2.c | 42 +++++++++++++++++++++++-------------------
- 1 files changed, 23 insertions(+), 19 deletions(-)
-
-diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
-index cd69ca0..48618e1 100644
---- a/hw/xfree86/dri2/dri2.c
-+++ b/hw/xfree86/dri2/dri2.c
-@@ -202,27 +202,25 @@ find_attachment(DRI2DrawablePtr pPriv, unsigned attachment)
- return -1;
- }
-
--static DRI2BufferPtr
-+static Bool
- allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds,
- DRI2DrawablePtr pPriv,
- unsigned int attachment, unsigned int format,
-- int dimensions_match)
-+ int dimensions_match, DRI2BufferPtr *buffer)
- {
-- DRI2BufferPtr buffer;
-- int old_buf;
--
-- old_buf = find_attachment(pPriv, attachment);
-+ int old_buf = find_attachment(pPriv, attachment);
-
- if ((old_buf < 0)
- || !dimensions_match
- || (pPriv->buffers[old_buf]->format != format)) {
-- buffer = (*ds->CreateBuffer)(pDraw, attachment, format);
-+ *buffer = (*ds->CreateBuffer)(pDraw, attachment, format);
-+ return TRUE;
-+
- } else {
-- buffer = pPriv->buffers[old_buf];
-+ *buffer = pPriv->buffers[old_buf];
- pPriv->buffers[old_buf] = NULL;
-+ return FALSE;
- }
--
-- return buffer;
- }
-
- static DRI2BufferPtr *
-@@ -238,6 +236,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
- int have_fake_front = 0;
- int front_format = 0;
- int dimensions_match;
-+ int buffers_changed = 0;
- int i;
-
- if (!pPriv) {
-@@ -256,8 +255,10 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
- const unsigned attachment = *(attachments++);
- const unsigned format = (has_format) ? *(attachments++) : 0;
-
-- buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment,
-- format, dimensions_match);
-+ if (allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment,
-+ format, dimensions_match,
-+ &buffers[i]))
-+ buffers_changed = 1;
-
- /* If the drawable is a window and the front-buffer is requested,
- * silently add the fake front-buffer to the list of requested
-@@ -287,15 +288,18 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
- }
-
- if (need_real_front > 0) {
-- buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv,
-- DRI2BufferFrontLeft,
-- front_format, dimensions_match);
-+ if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft,
-+ front_format, dimensions_match,
-+ &buffers[i++]))
-+ buffers_changed = 1;
- }
-
- if (need_fake_front > 0) {
-- buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv,
-- DRI2BufferFakeFrontLeft,
-- front_format, dimensions_match);
-+ if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft,
-+ front_format, dimensions_match,
-+ &buffers[i++]))
-+ buffers_changed = 1;
-+
- have_fake_front = 1;
- }
-
-@@ -324,7 +328,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
- * contents of the real front-buffer. This ensures correct operation of
- * applications that call glXWaitX before calling glDrawBuffer.
- */
-- if (have_fake_front) {
-+ if (have_fake_front && buffers_changed) {
- BoxRec box;
- RegionRec region;
-
---
-1.7.0
-
diff --git a/recipes/xorg-xserver/xserver-xorg/0003-glx-Enforce-a-1-1-correspondence-between-GLX-and-X11.patch b/recipes/xorg-xserver/xserver-xorg/0003-glx-Enforce-a-1-1-correspondence-between-GLX-and-X11.patch
deleted file mode 100644
index 74bff9b9b9..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/0003-glx-Enforce-a-1-1-correspondence-between-GLX-and-X11.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From b629ae3db6a87fa91e5b2fd5deb4ccc6075ad243 Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Fri, 22 Jan 2010 06:29:36 -0800
-Subject: [PATCH 3/5] glx: Enforce a 1:1 correspondence between GLX and X11 windows.
-
-The spec says (regarding glXCreateWindow): "If there is already a
-GLXFBConfig associated with win (as a result of a previous
-glXCreateWindow call), then a BadAlloc error is generated.". It will
-also come useful to implement DRI2InvalidateBuffers for the indirect
-case.
-
-Signed-off-by: Francisco Jerez <currojerez@riseup.net>
----
- glx/glxcmds.c | 51 +++++++++++++++++++++++++++++++++++++++++++++------
- glx/glxserver.h | 1 +
- 2 files changed, 46 insertions(+), 6 deletions(-)
-
-diff --git a/glx/glxcmds.c b/glx/glxcmds.c
-index 77afbf4..0e1c89c 100644
---- a/glx/glxcmds.c
-+++ b/glx/glxcmds.c
-@@ -51,6 +51,15 @@
- #include "indirect_table.h"
- #include "indirect_util.h"
-
-+static int glxWindowPrivateKeyIndex;
-+static DevPrivateKey glxWindowPrivateKey = &glxWindowPrivateKeyIndex;
-+
-+__GLXdrawable *
-+glxGetDrawableFromWindow(WindowPtr pWin)
-+{
-+ return dixLookupPrivate(&pWin->devPrivates, glxWindowPrivateKey);
-+}
-+
- static int
- validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err)
- {
-@@ -473,6 +482,7 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
- int *error)
- {
- DrawablePtr pDraw;
-+ WindowPtr pWin;
- __GLXdrawable *pGlxDraw;
- int rc;
-
-@@ -499,6 +509,12 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
- return NULL;
- }
-
-+ pWin = (WindowPtr)pDraw;
-+
-+ pGlxDraw = glxGetDrawableFromWindow(pWin);
-+ if (pGlxDraw)
-+ return pGlxDraw;
-+
- if (pDraw->pScreen != glxc->pGlxScreen->pScreen) {
- client->errorValue = pDraw->pScreen->myNum;
- *error = BadMatch;
-@@ -519,6 +535,8 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client,
- return NULL;
- }
-
-+ dixSetPrivate(&pWin->devPrivates, glxWindowPrivateKey, pGlxDraw);
-+
- return pGlxDraw;
- }
-
-@@ -1107,9 +1125,10 @@ __glXDrawableRelease(__GLXdrawable *drawable)
- }
- }
-
--static int
-+static int
- DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config,
-- DrawablePtr pDraw, XID glxDrawableId, int type)
-+ DrawablePtr pDraw, XID glxDrawableId, int type,
-+ __GLXdrawable **ret)
- {
- __GLXdrawable *pGlxDraw;
-
-@@ -1128,6 +1147,9 @@ DoCreateGLXDrawable(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *conf
- return BadAlloc;
- }
-
-+ if (ret)
-+ *ret = pGlxDraw;
-+
- return Success;
- }
-
-@@ -1149,7 +1171,7 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen *pGlxScreen, __GLXconfig *config
- }
-
- err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw,
-- glxDrawableId, GLX_DRAWABLE_PIXMAP);
-+ glxDrawableId, GLX_DRAWABLE_PIXMAP, NULL);
-
- if (err == Success)
- ((PixmapPtr) pDraw)->refcnt++;
-@@ -1305,7 +1327,7 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
- __glXleaveServer(GL_FALSE);
-
- return DoCreateGLXDrawable(client, pGlxScreen, config, &pPixmap->drawable,
-- glxDrawableId, GLX_DRAWABLE_PBUFFER);
-+ glxDrawableId, GLX_DRAWABLE_PBUFFER, NULL);
- }
-
- int __glXDisp_CreatePbuffer(__GLXclientState *cl, GLbyte *pc)
-@@ -1409,6 +1431,8 @@ int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc)
- __GLXscreen *pGlxScreen;
- ClientPtr client = cl->client;
- DrawablePtr pDraw;
-+ WindowPtr pWin;
-+ __GLXdrawable *pGlxDraw;
- int err;
-
- if (!validGlxScreen(client, req->screen, &pGlxScreen, &err))
-@@ -1422,11 +1446,26 @@ int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc)
- return BadWindow;
- }
-
-+ pWin = (WindowPtr)pDraw;
-+
-+ /* Make sure there're no already associated GLX drawables. */
-+ if (glxGetDrawableFromWindow(pWin)) {
-+ client->errorValue = req->window;
-+ return BadAlloc;
-+ }
-+
- if (!validGlxFBConfigForWindow(client, config, pDraw, &err))
- return err;
-
-- return DoCreateGLXDrawable(client, pGlxScreen, config,
-- pDraw, req->glxwindow, GLX_DRAWABLE_WINDOW);
-+ err = DoCreateGLXDrawable(client, pGlxScreen, config,
-+ pDraw, req->glxwindow,
-+ GLX_DRAWABLE_WINDOW, &pGlxDraw);
-+ if (err)
-+ return err;
-+
-+ dixSetPrivate(&pWin->devPrivates, glxWindowPrivateKey, pGlxDraw);
-+
-+ return Success;
- }
-
- int __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc)
-diff --git a/glx/glxserver.h b/glx/glxserver.h
-index 1daf977..3c49b5e 100644
---- a/glx/glxserver.h
-+++ b/glx/glxserver.h
-@@ -80,6 +80,7 @@ typedef struct __GLXcontext __GLXcontext;
-
- extern __GLXscreen *glxGetScreen(ScreenPtr pScreen);
- extern __GLXclientState *glxGetClient(ClientPtr pClient);
-+extern __GLXdrawable *glxGetDrawableFromWindow(WindowPtr pWin);
-
- /************************************************************************/
-
---
-1.7.0
-
diff --git a/recipes/xorg-xserver/xserver-xorg/0004-glx-dri2-Notify-the-driver-when-its-buffers-become-i.patch b/recipes/xorg-xserver/xserver-xorg/0004-glx-dri2-Notify-the-driver-when-its-buffers-become-i.patch
deleted file mode 100644
index f60de12236..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/0004-glx-dri2-Notify-the-driver-when-its-buffers-become-i.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From bc57de2551b792f49a92c90f6cf8a4890ede038f Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Fri, 22 Jan 2010 06:29:37 -0800
-Subject: [PATCH 4/5] glx/dri2: Notify the driver when its buffers become invalid.
-
-Signed-off-by: Francisco Jerez <currojerez@riseup.net>
----
- glx/glxdri2.c | 30 ++++++++++++++++++++++++++----
- 1 files changed, 26 insertions(+), 4 deletions(-)
-
-diff --git a/glx/glxdri2.c b/glx/glxdri2.c
-index edd29b0..5c617d9 100644
---- a/glx/glxdri2.c
-+++ b/glx/glxdri2.c
-@@ -67,6 +67,7 @@ struct __GLXDRIscreen {
-
- xf86EnterVTProc *enterVT;
- xf86LeaveVTProc *leaveVT;
-+ PreConfigureWindowProcPtr PreConfigureWindow;
-
- const __DRIcoreExtension *core;
- const __DRIdri2Extension *dri2;
-@@ -217,6 +218,10 @@ __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable *drawable)
- __GLXDRIscreen *screen = priv->screen;
- CARD64 unused;
-
-+ if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused,
-+ __glXdriSwapEvent, drawable->pDraw) != Success)
-+ return FALSE;
-+
- #if __DRI2_FLUSH_VERSION >= 3
- if (screen->flush) {
- (*screen->flush->flush)(priv->driDrawable);
-@@ -227,10 +232,6 @@ __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable *drawable)
- (*screen->flush->flushInvalidate)(priv->driDrawable);
- #endif
-
-- if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused,
-- __glXdriSwapEvent, drawable->pDraw) != Success)
-- return FALSE;
--
- return TRUE;
- }
-
-@@ -614,6 +615,24 @@ glxDRILeaveVT (int index, int flags)
- }
-
- static void
-+glxDRIPreConfigureWindow(WindowPtr pWin, int x, int y, int w, int h, int bw,
-+ WindowPtr pSib)
-+{
-+ ScreenPtr pScreen = pWin->drawable.pScreen;
-+ __GLXDRIscreen *screen = (__GLXDRIscreen *)glxGetScreen(pScreen);
-+ __GLXDRIdrawable *draw = (__GLXDRIdrawable *)glxGetDrawableFromWindow(pWin);
-+
-+ if (screen->PreConfigureWindow)
-+ (*screen->PreConfigureWindow)(pWin, x, y, w, h, bw, pSib);
-+
-+ if (!draw || (draw->height == h && draw->width == w))
-+ return;
-+
-+ if (screen->flush)
-+ screen->flush->invalidate(draw->driDrawable);
-+}
-+
-+static void
- initializeExtensions(__GLXDRIscreen *screen)
- {
- const __DRIextension **extensions;
-@@ -789,6 +808,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
- screen->leaveVT = pScrn->LeaveVT;
- pScrn->LeaveVT = glxDRILeaveVT;
-
-+ screen->PreConfigureWindow = pScreen->PreConfigureWindow;
-+ pScreen->PreConfigureWindow = glxDRIPreConfigureWindow;
-+
- LogMessage(X_INFO,
- "AIGLX: Loaded and initialized %s\n", filename);
-
---
-1.7.0
-
diff --git a/recipes/xorg-xserver/xserver-xorg/0005-dri2-Support-the-DRI2InvalidateBuffers-event.patch b/recipes/xorg-xserver/xserver-xorg/0005-dri2-Support-the-DRI2InvalidateBuffers-event.patch
deleted file mode 100644
index 9bf4f27072..0000000000
--- a/recipes/xorg-xserver/xserver-xorg/0005-dri2-Support-the-DRI2InvalidateBuffers-event.patch
+++ /dev/null
@@ -1,319 +0,0 @@
-From 2b9b1327984cb1f3588e77b1bdb2e7641de2ffb9 Mon Sep 17 00:00:00 2001
-From: Francisco Jerez <currojerez@riseup.net>
-Date: Fri, 22 Jan 2010 06:29:38 -0800
-Subject: [PATCH 5/5] dri2: Support the DRI2InvalidateBuffers event.
-
-Bumps the supported DRI2 protocol version.
-
-Signed-off-by: Francisco Jerez <currojerez@riseup.net>
----
- configure.ac | 2 +-
- hw/xfree86/dri2/dri2.c | 110 +++++++++++++++++++++++++++++++++++++++++++
- hw/xfree86/dri2/dri2.h | 5 ++
- hw/xfree86/dri2/dri2ext.c | 35 ++++++++++++--
- include/protocol-versions.h | 2 +-
- 5 files changed, 148 insertions(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index de252f3..e9ca45a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -759,7 +759,7 @@ RECORDPROTO="recordproto >= 1.13.99.1"
- SCRNSAVERPROTO="scrnsaverproto >= 1.1"
- RESOURCEPROTO="resourceproto"
- DRIPROTO="xf86driproto >= 2.1.0"
--DRI2PROTO="dri2proto >= 2.2"
-+DRI2PROTO="dri2proto >= 2.3"
- XINERAMAPROTO="xineramaproto"
- BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
- XCALIBRATEPROTO="xcalibrateproto"
-diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
-index 48618e1..51040d4 100644
---- a/hw/xfree86/dri2/dri2.c
-+++ b/hw/xfree86/dri2/dri2.c
-@@ -52,6 +52,13 @@ static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex;
- static int dri2PixmapPrivateKeyIndex;
- static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex;
-
-+typedef struct _DRI2ClientRef *DRI2ClientRefPtr;
-+
-+struct _DRI2ClientRef {
-+ DRI2ClientRefPtr next;
-+ XID resource;
-+};
-+
- typedef struct _DRI2Drawable {
- unsigned int refCount;
- int width;
-@@ -65,6 +72,8 @@ typedef struct _DRI2Drawable {
- CARD64 target_sbc; /* -1 means no SBC wait outstanding */
- CARD64 last_swap_target; /* most recently queued swap target */
- int swap_limit; /* for N-buffering */
-+ DRI2ClientRefPtr track_clients; /* Clients to notify on drawable changes. */
-+
- } DRI2DrawableRec, *DRI2DrawablePtr;
-
- typedef struct _DRI2Screen *DRI2ScreenPtr;
-@@ -84,6 +93,8 @@ typedef struct _DRI2Screen {
- DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC;
-
- HandleExposuresProcPtr HandleExposures;
-+
-+ PreConfigureWindowProcPtr PreConfigureWindow;
- } DRI2ScreenRec;
-
- static DRI2ScreenPtr
-@@ -143,6 +154,7 @@ DRI2CreateDrawable(DrawablePtr pDraw)
- pPriv->swap_interval = 1;
- pPriv->last_swap_target = -1;
- pPriv->swap_limit = 1; /* default to double buffering */
-+ pPriv->track_clients = NULL;
-
- if (pDraw->type == DRAWABLE_WINDOW)
- {
-@@ -405,6 +417,78 @@ DRI2BlockClient(ClientPtr client, DrawablePtr pDraw)
- }
- }
-
-+extern RESTYPE dri2DrawableRes;
-+
-+int
-+DRI2TrackClient(DrawablePtr pDraw, int id)
-+{
-+ DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
-+ DRI2ClientRefPtr ref;
-+
-+ if (pPriv == NULL)
-+ return BadDrawable;
-+
-+ /* Check if the client is already in. */
-+ for (ref = pPriv->track_clients; ref; ref = ref->next) {
-+ if (CLIENT_ID(ref->resource) == id)
-+ return Success;
-+ }
-+
-+ /* Allocate a client ref. */
-+ ref = xalloc(sizeof(*ref));
-+ if (ref == NULL)
-+ return BadAlloc;
-+
-+ ref->next = pPriv->track_clients;
-+ pPriv->track_clients = ref;
-+
-+ /* Allocate a resource for it. */
-+ ref->resource = FakeClientID(id);
-+ if (!AddResource(ref->resource, dri2DrawableRes, pDraw))
-+ return BadAlloc;
-+
-+ return Success;
-+}
-+
-+void
-+DRI2UntrackClient(DrawablePtr pDraw, int id)
-+{
-+ DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
-+ DRI2ClientRefPtr ref, *prev;
-+
-+ if (pPriv == NULL)
-+ return;
-+
-+ prev = &pPriv->track_clients;
-+
-+ for (ref = *prev; ref; prev = &ref->next, ref = ref->next) {
-+ if (CLIENT_ID(ref->resource) == id) {
-+ *prev = ref->next;
-+ xfree(ref);
-+ break;
-+ }
-+ }
-+}
-+
-+void
-+DRI2InvalidateDrawable(DrawablePtr pDraw)
-+{
-+ DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
-+ DRI2ClientRefPtr ref;
-+
-+ if (pPriv == NULL)
-+ return;
-+
-+ while ((ref = pPriv->track_clients)) {
-+ ClientPtr client = clients[CLIENT_ID(ref->resource)];
-+
-+ FreeResource(ref->resource, RT_NONE);
-+
-+ if (client && !client->clientGone)
-+ DRI2InvalidateBuffersEvent(pDraw, client);
-+ }
-+}
-+
- int
- DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
- unsigned int dest, unsigned int src)
-@@ -759,6 +843,8 @@ DRI2DestroyDrawable(DrawablePtr pDraw)
- DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
- DRI2DrawablePtr pPriv;
-
-+ DRI2ClientRefPtr ref;
-+
- pPriv = DRI2GetDrawable(pDraw);
- if (pPriv == NULL)
- return;
-@@ -776,6 +862,9 @@ DRI2DestroyDrawable(DrawablePtr pDraw)
- xfree(pPriv->buffers);
- }
-
-+ while ((ref = pPriv->track_clients))
-+ FreeResource(ref->resource, RT_NONE);
-+
- /* If the window is destroyed while we have a swap pending, don't
- * actually free the priv yet. We'll need it in the DRI2SwapComplete()
- * callback and we'll free it there once we're done. */
-@@ -811,6 +900,24 @@ DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic)
- return TRUE;
- }
-
-+static void
-+DRI2PreConfigureWindow(WindowPtr pWin, int x, int y, int w, int h, int bw,
-+ WindowPtr pSib)
-+{
-+ DrawablePtr pDraw = (DrawablePtr)pWin;
-+ ScreenPtr pScreen = pDraw->pScreen;
-+ DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
-+ DRI2DrawablePtr dd = DRI2GetDrawable(pDraw);
-+
-+ if (ds->PreConfigureWindow)
-+ (*ds->PreConfigureWindow)(pWin, x, y, w, h, bw, pSib);
-+
-+ if (!dd || (dd->width == w && dd->height == h))
-+ return;
-+
-+ DRI2InvalidateDrawable(pDraw);
-+}
-+
- Bool
- DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
- {
-@@ -869,6 +976,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
-
- dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds);
-
-+ ds->PreConfigureWindow = pScreen->PreConfigureWindow;
-+ pScreen->PreConfigureWindow = DRI2PreConfigureWindow;
-+
- xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
- for (i = 0; i < sizeof(driverTypeNames) / sizeof(driverTypeNames[0]); i++) {
- if (i < ds->numDrivers && ds->driverNames[i]) {
-diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
-index 1c8626b..59bab70 100644
---- a/hw/xfree86/dri2/dri2.h
-+++ b/hw/xfree86/dri2/dri2.h
-@@ -265,4 +265,9 @@ extern _X_EXPORT void DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw,
- int frame, unsigned int tv_sec,
- unsigned int tv_usec);
-
-+extern _X_EXPORT int DRI2TrackClient(DrawablePtr pDraw, int id);
-+extern _X_EXPORT void DRI2UntrackClient(DrawablePtr pDraw, int id);
-+extern _X_EXPORT void DRI2InvalidateBuffersEvent(DrawablePtr pDraw, ClientPtr client);
-+extern _X_EXPORT void DRI2InvalidateDrawable(DrawablePtr pDraw);
-+
- #endif
-diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
-index 3e6b03e..713c82e 100644
---- a/hw/xfree86/dri2/dri2ext.c
-+++ b/hw/xfree86/dri2/dri2ext.c
-@@ -51,7 +51,7 @@
- #include "xf86Module.h"
-
- static ExtensionEntry *dri2Extension;
--static RESTYPE dri2DrawableRes;
-+RESTYPE dri2DrawableRes;
-
- static Bool
- validDrawable(ClientPtr client, XID drawable, Mask access_mode,
-@@ -266,6 +266,9 @@ ProcDRI2GetBuffers(ClientPtr client)
- buffers = DRI2GetBuffers(pDrawable, &width, &height,
- attachments, stuff->count, &count);
-
-+ status = DRI2TrackClient(pDrawable, client->index);
-+ if (status)
-+ return status;
-
- send_buffers_reply(client, pDrawable, buffers, count, width, height);
-
-@@ -293,6 +296,10 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client)
- buffers = DRI2GetBuffersWithFormat(pDrawable, &width, &height,
- attachments, stuff->count, &count);
-
-+ status = DRI2TrackClient(pDrawable, client->index);
-+ if (status)
-+ return status;
-+
- send_buffers_reply(client, pDrawable, buffers, count, width, height);
-
- return client->noClientException;
-@@ -367,6 +374,18 @@ DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc,
- WriteEventsToClient(client, 1, (xEvent *)&event);
- }
-
-+void
-+DRI2InvalidateBuffersEvent(DrawablePtr pDraw, ClientPtr client)
-+{
-+ xDRI2InvalidateBuffers event;
-+
-+ event.type = DRI2EventBase + DRI2_InvalidateBuffers;
-+ event.sequenceNumber = client->sequence;
-+ event.drawable = pDraw->id;
-+
-+ WriteEventsToClient(client, 1, (xEvent *)&event);
-+}
-+
- static int
- ProcDRI2SwapBuffers(ClientPtr client)
- {
-@@ -391,6 +410,8 @@ ProcDRI2SwapBuffers(ClientPtr client)
- if (status != Success)
- return BadDrawable;
-
-+ DRI2InvalidateDrawable(pDrawable);
-+
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
-@@ -618,11 +639,17 @@ SProcDRI2Dispatch (ClientPtr client)
- }
- }
-
--static int DRI2DrawableGone(pointer p, XID id)
-+static int
-+DRI2DrawableGone(pointer p, XID id)
- {
-- DrawablePtr pDrawable = p;
-+ DrawablePtr pDraw = p;
-
-- DRI2DestroyDrawable(pDrawable);
-+ if (pDraw->id != id) {
-+ /* Secondary reference. */
-+ DRI2UntrackClient(pDraw, CLIENT_ID(id));
-+ } else {
-+ DRI2DestroyDrawable(pDraw);
-+ }
-
- return Success;
- }
-diff --git a/include/protocol-versions.h b/include/protocol-versions.h
-index c74b7fa..c425eef 100644
---- a/include/protocol-versions.h
-+++ b/include/protocol-versions.h
-@@ -53,7 +53,7 @@
-
- /* DRI2 */
- #define SERVER_DRI2_MAJOR_VERSION 1
--#define SERVER_DRI2_MINOR_VERSION 2
-+#define SERVER_DRI2_MINOR_VERSION 3
-
- /* Generic event extension */
- #define SERVER_GE_MAJOR_VERSION 1
---
-1.7.0
-
diff --git a/recipes/xorg-xserver/xserver-xorg_git.bb b/recipes/xorg-xserver/xserver-xorg_git.bb
index 3fdad01abe..0b4cae51fb 100644
--- a/recipes/xorg-xserver/xserver-xorg_git.bb
+++ b/recipes/xorg-xserver/xserver-xorg_git.bb
@@ -9,14 +9,8 @@ PE = "2"
DEFAULT_PREFERENCE = "-1"
-SRCREV = "780c95caf9888fa4548dfe4c1c78a7e7ce99a9ed"
+SRCREV = "57cb1a854a1b6d91d214b3fa250a7df2ed20d433"
SRC_URI = "git://anongit.freedesktop.org/xorg/xserver;protocol=git;branch=master \
-# pending changes http://lists.x.org/archives/xorg-devel/2010-January/005127.html
- file://0001-Add-a-PreConfigureWindow-hook.patch;patch=1 \
- file://0002-dri2-No-need-to-blit-from-front-on-DRI2GetBuffers-if.patch;patch=1 \
- file://0003-glx-Enforce-a-1-1-correspondence-between-GLX-and-X11.patch;patch=1 \
- file://0004-glx-dri2-Notify-the-driver-when-its-buffers-become-i.patch;patch=1 \
- file://0005-dri2-Support-the-DRI2InvalidateBuffers-event.patch;patch=1 \
file://dolt-fix-1.7.0.patch;patch=1 \
file://randr-support-1.7.0.patch;patch=1 \
file://hack-fbdev-ignore-return-mode.patch;patch=1 \