xserver: Branch 'master' - 18 commits

Keith Packard keithp at kemper.freedesktop.org
Tue Nov 30 13:34:21 PST 2010


 Xext/panoramiX.c                        |   16 +
 Xext/panoramiXsrv.h                     |    1 
 composite/compext.c                     |  362 +++++++++++++++++++++++++++++++-
 composite/compint.h                     |    3 
 composite/compoverlay.c                 |   17 +
 composite/compwindow.c                  |   22 +
 configure.ac                            |    4 
 glx/Makefile.am                         |    1 
 glx/g_disptab.h                         |   52 ----
 glx/glxcmds.c                           |  233 --------------------
 glx/glxcmdsswap.c                       |    1 
 glx/glxdri.c                            |    1 
 glx/glxdri2.c                           |    1 
 glx/glxdriswrast.c                      |    1 
 glx/glxext.c                            |   19 -
 glx/glxscreens.c                        |   27 --
 glx/glxscreens.h                        |   18 -
 glx/indirect_table.c                    |    1 
 glx/xfont.c                             |    1 
 hw/dmx/dmxpict.c                        |    2 
 hw/dmx/dmxscrinit.c                     |    2 
 hw/kdrive/src/kdrive.c                  |    6 
 hw/vfb/InitOutput.c                     |    7 
 hw/xfree86/Makefile.am                  |    4 
 hw/xfree86/common/xf86.h                |    3 
 hw/xfree86/common/xf86Globals.c         |    1 
 hw/xfree86/common/xf86Init.c            |    3 
 hw/xfree86/doc/sgml/DESIGN.xml          |    8 
 hw/xfree86/loader/sdksyms.sh            |    8 
 hw/xfree86/os-support/Makefile.am       |    2 
 hw/xfree86/os-support/linux/lnx_init.c  |  108 +--------
 hw/xfree86/os-support/shared/VTsw_usl.c |   15 -
 hw/xfree86/os-support/sysv/Makefile.am  |    1 
 hw/xfree86/os-support/sysv/sysv_init.c  |  252 ----------------------
 hw/xfree86/os-support/sysv/sysv_video.c |  315 ---------------------------
 hw/xfree86/vbe/vbe.c                    |    5 
 hw/xfree86/xaa/xaa.h                    |    2 
 hw/xfree86/xf8_16bpp/Makefile.am        |   11 
 hw/xfree86/xf8_16bpp/cfb8_16.h          |   37 ---
 hw/xfree86/xf8_16bpp/xf8_16module.c     |   78 ------
 hw/xnest/Screen.c                       |    2 
 hw/xquartz/GL/indirect.c                |    2 
 hw/xquartz/darwin.c                     |   22 -
 hw/xwin/glx/indirect.c                  |    2 
 hw/xwin/winscrinit.c                    |    7 
 include/Makefile.am                     |    2 
 include/bstore.h                        |   22 -
 include/bstorestr.h                     |   55 ----
 include/scrnintstr.h                    |   67 -----
 include/windowstr.h                     |    2 
 mi/Makefile.am                          |    2 
 mi/mi.h                                 |    4 
 mi/mibstore.c                           |    6 
 mi/mibstore.h                           |    4 
 mi/mibstorest.h                         |   91 --------
 mi/miscrinit.c                          |   20 -
 mi/mivalidate.h                         |    3 
 miext/rootless/rootlessValTree.c        |   12 -
 render/glyphstr.h                       |    3 
 render/picture.c                        |    6 
 render/picturestr.h                     |   15 -
 xfixes/region.c                         |   78 ++++++
 xfixes/xfixes.c                         |   30 ++
 xfixes/xfixesint.h                      |   13 +
 64 files changed, 570 insertions(+), 1551 deletions(-)

New commits:
commit 02449ee24b484c9fea501df5274d95a9f87cab23
Merge: afd6eb6... b85f906...
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Nov 30 13:30:59 2010 -0800

    Merge remote branch 'ajax/for-keithp'

commit b85f9063c2370d7710523bccb8bf030a0710425b
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Nov 22 16:42:04 2010 -0500

    xfree86: Remove the xf8_16bpp overlay module
    
    Only one (marginal) driver was using it, and it's been fixed to just
    implement it directly.
    
    v2: Also fix sdksyms.sh (spotted by Jesse Adkins)
    v3: Also fix DESIGN.xml (spotted bu Julien Cristau)
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/configure.ac b/configure.ac
index 09a7211..2363e38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2237,7 +2237,6 @@ hw/xfree86/vbe/Makefile
 hw/xfree86/vgahw/Makefile
 hw/xfree86/x86emu/Makefile
 hw/xfree86/xaa/Makefile
-hw/xfree86/xf8_16bpp/Makefile
 hw/xfree86/utils/Makefile
 hw/xfree86/utils/cvt/Makefile
 hw/xfree86/utils/gtf/Makefile
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 116113b..575481e 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -32,12 +32,12 @@ DOC_SUBDIR = doc
 
 SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \
 	  ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \
-	  xf8_16bpp loader dixmods exa modes \
+	  loader dixmods exa modes \
 	  $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
 
 DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
                parser ramdac shadowfb vbe vgahw xaa \
-               xf8_16bpp loader dixmods dri dri2 exa modes \
+               loader dixmods dri dri2 exa modes \
 	       utils doc
 
 bin_PROGRAMS = Xorg
diff --git a/hw/xfree86/doc/sgml/DESIGN.xml b/hw/xfree86/doc/sgml/DESIGN.xml
index 6c90a40..08f8bc8 100644
--- a/hw/xfree86/doc/sgml/DESIGN.xml
+++ b/hw/xfree86/doc/sgml/DESIGN.xml
@@ -1629,14 +1629,6 @@ Here is what <function>InitOutput()</function> does:
 	  </blockquote></para></blockquote>
 
       <para>
-    Currently, aperture remapping, as described here, should not be
-    attempted if the driver uses the <literal remap="tt">xf8_16bpp</literal> or
-    <literal remap="tt">xf8_32bpp</literal> framebuffer layers.  A pending
-    restructuring of VT switching will address this restriction in
-    the near future.
-      </para>
-
-      <para>
     Other layers may wrap the <function>ChipEnterVT()</function> and
     <function>ChipLeaveVT()</function> functions if they need to take some
     action when these events are received.
diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 1ca6789..4b3ed86 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -208,12 +208,6 @@ cat > sdksyms.c << EOF
  */
 
 
-/* hw/xfree86/xf8_16bpp/Makefile.am -- module */
-/*
-#include "cfb8_16.h"
- */
-
-
 /* mi/Makefile.am */
 #include "micmap.h"
 #include "miline.h"
diff --git a/hw/xfree86/xf8_16bpp/Makefile.am b/hw/xfree86/xf8_16bpp/Makefile.am
deleted file mode 100644
index 3c5b8c9..0000000
--- a/hw/xfree86/xf8_16bpp/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-module_LTLIBRARIES = libxf8_16bpp.la
-
-sdk_HEADERS = cfb8_16.h
-
-INCLUDES = $(XORG_INCS) -I$(top_srcdir)/fb
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
-
-libxf8_16bpp_la_LDFLAGS = -avoid-version
-
-libxf8_16bpp_la_SOURCES = xf8_16module.c
diff --git a/hw/xfree86/xf8_16bpp/cfb8_16.h b/hw/xfree86/xf8_16bpp/cfb8_16.h
deleted file mode 100644
index b6ab955..0000000
--- a/hw/xfree86/xf8_16bpp/cfb8_16.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2006 Adam Jackson.
- *
- * 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
- * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS 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 _CFB8_16_H
-#define _CFB8_16_H
-
-#include "regionstr.h"
-#include "windowstr.h"
-
-/* this has to stay misnamed for ABI reasons */
-
-extern _X_EXPORT Bool
-cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8,
-                  int xsize, int ysize, int dpix, int dpiy,
-                  int width16, int width8);
-
-#endif /* _CFB8_16_H */
diff --git a/hw/xfree86/xf8_16bpp/xf8_16module.c b/hw/xfree86/xf8_16bpp/xf8_16module.c
deleted file mode 100644
index 6a4529a..0000000
--- a/hw/xfree86/xf8_16bpp/xf8_16module.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2006 Adam Jackson.
- *
- * 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
- * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS 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.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xmd.h>
-#include "misc.h"
-#include "servermd.h"
-#include "scrnintstr.h"
-#include "resource.h"
-#include "fb.h"
-#include "fboverlay.h"
-#include "cfb8_16.h"
-
-Bool
-cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8,
-                  int xsize, int ysize, int dpix, int dpiy,
-                  int width16, int width8)
-{
-    return
-        (fbOverlaySetupScreen(pScreen, pbits16, pbits8, xsize, ysize,
-                              dpix, dpiy, width16, width8, 16, 8) &&
-         fbOverlayFinishScreenInit(pScreen, pbits16, pbits8, xsize, ysize,
-                                   dpix, dpiy, width16, width8, 16, 8, 16, 8));
-}
-
-#include "xf86Module.h"
-
-static MODULESETUPPROTO(xf8_16bppSetup);
-
-static XF86ModuleVersionInfo VersRec = {
-        "xf8_16bpp",
-        MODULEVENDORSTRING,
-        MODINFOSTRING1,
-        MODINFOSTRING2,
-        XORG_VERSION_CURRENT,
-        2, 0, 0,
-        ABI_CLASS_ANSIC,                /* Only need the ansic layer */
-        ABI_ANSIC_VERSION,
-        NULL,
-        {0,0,0,0}       /* signature, to be patched into the file by a tool */
-};
-
-_X_EXPORT XF86ModuleData xf8_16bppModuleData = {
-    &VersRec,
-    xf8_16bppSetup,
-    NULL
-};
-
-static pointer
-xf8_16bppSetup(pointer module, pointer opts, int *errmaj, int *errmin)
-{
-    return (pointer)LoadSubModule(module, "fb", NULL, NULL, NULL, NULL,
-			          errmaj, errmin);
-}
commit a861fe6a1cf56df76928d21707551602289963c1
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Nov 30 13:50:42 2010 -0500

    vbe: Refuse to believe tiny (or negative) panel sizes from PanelID
    
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 7a64a4a..bcda5ec 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1028,6 +1028,11 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data)
     if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh)
 	return;
 
+    if (data->hsize < 320 || data->vsize < 240) {
+	xf86DrvMsg(scrnIndex, X_INFO, "...which I refuse to believe\n");
+	return;
+    }
+
     mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0);
 
     pScrn->monitor->nHsync = 1;
commit 84a14fab8f930ef1855444ae4e9e3e14ee008328
Author: David Reveman <davidr at novell.com>
Date:   Wed Jan 6 14:55:48 2010 -0500

    composite: add panoramix support
    
    Taken from:
    50d2d8c8969c165582d215c6e85c4be9eac02b6a
    dbffd0d44a33dcc84898c7a891d7ba212f65cbb8
    9b5b102163b4eaa1b70647354fcab4f6e461c94c
    75f9b98af31abf537ac6616c99f3797deb7ba017
    07fba8b1f77a6bca44ea6568b346a18ce9d1e61d
    
    With minor style fixes, ported to dixLookupResourceByType, and ported
    away from client->noClientException and xalloc/xfree.
    
    v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by
    James Jones.
    v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by
    Dave Airlie.
    v4: Fix a style issue with resource lookup noted by Jamey Sharp.
    
    Reviewed-by: Dave Airlie <airlied at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 5a395fc..e6334bd 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -56,6 +56,9 @@ Equipment Corporation.
 #ifdef XFIXES
 #include "xfixesint.h"
 #endif
+#ifdef COMPOSITE
+#include "compint.h"
+#endif
 #include "modinit.h"
 #include "protocol-versions.h"
 
@@ -587,6 +590,10 @@ void PanoramiXExtensionInit(int argc, char *argv[])
 #ifdef XFIXES
     PanoramiXFixesInit ();
 #endif
+#ifdef COMPOSITE
+    PanoramiXCompositeInit ();
+#endif
+
 }
 
 extern Bool CreateConnectionBlock(void);
diff --git a/composite/compext.c b/composite/compext.c
index 30d9dc2..7fddbba 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -535,13 +535,6 @@ CompositeExtensionInit (void)
 	if (GetPictureScreenIfSet(pScreen) == NULL)
 	    return;
     }
-#ifdef PANORAMIX
-    /* Xinerama's rewriting of window drawing before Composite gets to it
-     * breaks Composite.
-     */
-    if (!noPanoramiXExtension)
-	return;
-#endif
 
     CompositeClientWindowType = CreateNewResourceType
 	(FreeCompositeClientWindow, "CompositeClientWindow");
@@ -582,3 +575,358 @@ CompositeExtensionInit (void)
     /* Initialization succeeded */
     noCompositeExtension = FALSE;
 }
+
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+
+int (*PanoramiXSaveCompositeVector[CompositeNumberRequests]) (ClientPtr);
+
+static int
+PanoramiXCompositeRedirectWindow (ClientPtr client)
+{
+    PanoramiXRes *win;
+    int rc = 0, j;
+    REQUEST(xCompositeRedirectWindowReq);
+
+    REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    FOR_NSCREENS_FORWARD(j) {
+	stuff->window = win->info[j].id;
+	rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
+	if (rc != Success) break;
+    }
+
+    return rc;
+}
+
+static int
+PanoramiXCompositeRedirectSubwindows (ClientPtr client)
+{
+    PanoramiXRes *win;
+    int rc = 0, j;
+    REQUEST(xCompositeRedirectSubwindowsReq);
+
+    REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    FOR_NSCREENS_FORWARD(j) {
+	stuff->window = win->info[j].id;
+	rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
+	if (rc != Success) break;
+    }
+
+    return rc;
+}
+
+static int
+PanoramiXCompositeUnredirectWindow (ClientPtr client)
+{
+    PanoramiXRes *win;
+    int rc = 0, j;
+    REQUEST(xCompositeUnredirectWindowReq);
+
+    REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    FOR_NSCREENS_FORWARD(j) {
+	stuff->window = win->info[j].id;
+	rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
+	if (rc != Success) break;
+    }
+
+    return rc;
+}
+
+static int
+PanoramiXCompositeUnredirectSubwindows (ClientPtr client)
+{
+    PanoramiXRes *win;
+    int rc = 0, j;
+    REQUEST(xCompositeUnredirectSubwindowsReq);
+
+    REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    FOR_NSCREENS_FORWARD(j) {
+	stuff->window = win->info[j].id;
+	rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client);
+	if (rc != Success) break;
+    }
+
+    return rc;
+}
+
+static int
+PanoramiXCompositeNameWindowPixmap (ClientPtr client)
+{
+    WindowPtr	    pWin;
+    CompWindowPtr   cw;
+    PixmapPtr	    pPixmap;
+    int rc;
+    PanoramiXRes *win, *newPix;
+    int i;
+    REQUEST(xCompositeNameWindowPixmapReq);
+
+    REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    LEGAL_NEW_RESOURCE (stuff->pixmap, client);
+
+    if(!(newPix = malloc(sizeof(PanoramiXRes))))
+	return BadAlloc;
+
+    newPix->type = XRT_PIXMAP;
+    newPix->u.pix.shared = FALSE;
+    newPix->info[0].id = stuff->pixmap;
+
+    for (i = 1; i < PanoramiXNumScreens; i++)
+	newPix->info[i].id = FakeClientID (client->index);
+
+    FOR_NSCREENS(i) {
+	rc = dixLookupResourceByType ((void **) &pWin, win->info[i].id,
+				      RT_WINDOW, client, DixGetAttrAccess);
+	if (rc != Success)
+	{
+	    client->errorValue = stuff->window;
+	    free (newPix);
+	    return rc;
+	}
+
+	if (!pWin->viewable)
+	{
+	    free (newPix);
+	    return BadMatch;
+	}
+
+	cw = GetCompWindow (pWin);
+	if (!cw)
+	{
+	    free (newPix);
+	    return BadMatch;
+	}
+
+	pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
+	if (!pPixmap)
+	{
+	    free (newPix);
+	    return BadMatch;
+	}
+
+	if (!AddResource (newPix->info[i].id, RT_PIXMAP,
+			  (pointer) pPixmap))
+	    return BadAlloc;
+
+	++pPixmap->refcnt;
+    }
+
+    if (!AddResource (stuff->pixmap, XRT_PIXMAP, (pointer) newPix))
+	return BadAlloc;
+
+    return Success;
+}
+
+
+static int
+PanoramiXCompositeGetOverlayWindow (ClientPtr client)
+{
+    REQUEST(xCompositeGetOverlayWindowReq);
+    xCompositeGetOverlayWindowReply rep;
+    WindowPtr pWin;
+    ScreenPtr pScreen;
+    CompScreenPtr cs;
+    CompOverlayClientPtr pOc;
+    int rc;
+    PanoramiXRes *win, *overlayWin = NULL;
+    int i;
+
+    REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    cs = GetCompScreen(screenInfo.screens[0]);
+    if (!cs->pOverlayWin)
+    {
+	if(!(overlayWin = malloc(sizeof(PanoramiXRes))))
+	    return BadAlloc;
+
+	overlayWin->type = XRT_WINDOW;
+	overlayWin->u.win.root = FALSE;
+    }
+
+    FOR_NSCREENS_BACKWARD(i) {
+	rc = dixLookupResourceByType((pointer *)&pWin, win->info[i].id,
+				     RT_WINDOW, client, DixGetAttrAccess);
+	if (rc != Success)
+	{
+	    client->errorValue = stuff->window;
+	    return rc;
+	}
+	pScreen = pWin->drawable.pScreen;
+
+	/*
+	 * Create an OverlayClient structure to mark this client's
+	 * interest in the overlay window
+	 */
+	pOc = compCreateOverlayClient(pScreen, client);
+	if (pOc == NULL)
+	    return BadAlloc;
+
+	/*
+	 * Make sure the overlay window exists
+	 */
+	cs = GetCompScreen(pScreen);
+	if (cs->pOverlayWin == NULL)
+	    if (!compCreateOverlayWindow(pScreen))
+	    {
+		FreeResource (pOc->resource, RT_NONE);
+		return BadAlloc;
+	    }
+
+	rc = XaceHook(XACE_RESOURCE_ACCESS, client,
+		      cs->pOverlayWin->drawable.id,
+		      RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL,
+		      DixGetAttrAccess);
+	if (rc != Success)
+	{
+	    FreeResource (pOc->resource, RT_NONE);
+	    return rc;
+	}
+    }
+
+    if (overlayWin)
+    {
+	FOR_NSCREENS(i) {
+	    cs = GetCompScreen(screenInfo.screens[i]);
+	    overlayWin->info[i].id = cs->pOverlayWin->drawable.id;
+	}
+
+	AddResource(overlayWin->info[0].id, XRT_WINDOW, overlayWin);
+    }
+
+    cs = GetCompScreen(screenInfo.screens[0]);
+
+    rep.type = X_Reply;
+    rep.sequenceNumber = client->sequence;
+    rep.length = 0;
+    rep.overlayWin = cs->pOverlayWin->drawable.id;
+
+    if (client->swapped)
+    {
+	int n;
+	swaps(&rep.sequenceNumber, n);
+	swapl(&rep.length, n);
+	swapl(&rep.overlayWin, n);
+    }
+    (void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
+
+    return Success;
+}
+
+static int
+PanoramiXCompositeReleaseOverlayWindow (ClientPtr client)
+{
+    REQUEST(xCompositeReleaseOverlayWindowReq);
+    WindowPtr pWin;
+    ScreenPtr pScreen;
+    CompOverlayClientPtr pOc;
+    PanoramiXRes *win;
+    int i, rc;
+
+    REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
+
+    if ((rc = dixLookupResourceByType((void **)&win, stuff->window, XRT_WINDOW,
+				      client, DixUnknownAccess))) {
+	client->errorValue = stuff->window;
+	return rc;
+    }
+
+    FOR_NSCREENS_BACKWARD(i) {
+	if ((rc = dixLookupResourceByType((void **)&pWin, win->info[i].id,
+					  XRT_WINDOW, client,
+					  DixUnknownAccess))) {
+	    client->errorValue = stuff->window;
+	    return rc;
+	}
+	pScreen = pWin->drawable.pScreen;
+
+	/*
+	 * Has client queried a reference to the overlay window
+	 * on this screen? If not, generate an error.
+	 */
+	pOc = compFindOverlayClient (pWin->drawable.pScreen, client);
+	if (pOc == NULL)
+	    return BadMatch;
+
+	/* The delete function will free the client structure */
+	FreeResource (pOc->resource, RT_NONE);
+    }
+
+    return Success;
+}
+
+void
+PanoramiXCompositeInit (void)
+{
+    int i;
+
+    for (i = 0; i < CompositeNumberRequests; i++)
+	PanoramiXSaveCompositeVector[i] = ProcCompositeVector[i];
+    /*
+     * Stuff in Xinerama aware request processing hooks
+     */
+    ProcCompositeVector[X_CompositeRedirectWindow] =
+	PanoramiXCompositeRedirectWindow;
+    ProcCompositeVector[X_CompositeRedirectSubwindows] =
+	PanoramiXCompositeRedirectSubwindows;
+    ProcCompositeVector[X_CompositeUnredirectWindow] =
+	PanoramiXCompositeUnredirectWindow;
+    ProcCompositeVector[X_CompositeUnredirectSubwindows] =
+	PanoramiXCompositeUnredirectSubwindows;
+    ProcCompositeVector[X_CompositeNameWindowPixmap] =
+	PanoramiXCompositeNameWindowPixmap;
+    ProcCompositeVector[X_CompositeGetOverlayWindow] =
+	PanoramiXCompositeGetOverlayWindow;
+    ProcCompositeVector[X_CompositeReleaseOverlayWindow] =
+	PanoramiXCompositeReleaseOverlayWindow;
+}
+
+void
+PanoramiXCompositeReset (void)
+{
+    int i;
+
+    for (i = 0; i < CompositeNumberRequests; i++)
+	ProcCompositeVector[i] = PanoramiXSaveCompositeVector[i];
+}
+
+#endif
diff --git a/composite/compint.h b/composite/compint.h
index 80083b0..ae41c44 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -326,4 +326,7 @@ int
 compConfigNotify(WindowPtr pWin, int x, int y, int w, int h,
 		 int bw, WindowPtr pSib);
 
+void PanoramiXCompositeInit (void);
+void PanoramiXCompositeReset (void);
+
 #endif /* _COMPINT_H_ */
diff --git a/composite/compoverlay.c b/composite/compoverlay.c
index 67b566c..3bace79 100644
--- a/composite/compoverlay.c
+++ b/composite/compoverlay.c
@@ -48,6 +48,10 @@
 #include "compint.h"
 #include "xace.h"
 
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
 /* 
  * Delete the given overlay client list element from its screen list.
  */
@@ -128,10 +132,19 @@ compCreateOverlayWindow (ScreenPtr pScreen)
     WindowPtr	    pWin;
     XID		    attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */
     int		    result;
+    int		    w = pScreen->width;
+    int		    h = pScreen->height;
+
+#ifdef PANORAMIX
+    if (!noPanoramiXExtension)
+    {
+	w = PanoramiXPixWidth;
+	h = PanoramiXPixHeight;
+    }
+#endif
 
     pWin = cs->pOverlayWin = 
-	CreateWindow (cs->overlayWid, pRoot,
-		      0, 0, pScreen->width, pScreen->height, 0, 
+	CreateWindow (cs->overlayWid, pRoot, 0, 0, w, h, 0,
 		      InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0],
 		      pRoot->drawable.depth, 
 		      serverClient, pScreen->rootVisual, &result);
diff --git a/composite/compwindow.c b/composite/compwindow.c
index d17ff77..62283ee 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -47,6 +47,10 @@
 
 #include "compint.h"
 
+#ifdef PANORAMIX
+#include "panoramiXsrv.h"
+#endif
+
 #ifdef COMPOSITE_DEBUG
 static int
 compCheckWindow (WindowPtr pWin, pointer data)
@@ -172,16 +176,26 @@ updateOverlayWindow(ScreenPtr pScreen)
 	CompScreenPtr cs;
 	WindowPtr pWin; /* overlay window */
 	XID vlist[2];
+	int w = pScreen->width;
+	int h = pScreen->height;
+
+#ifdef PANORAMIX
+	if (!noPanoramiXExtension)
+	{
+	    w = PanoramiXPixWidth;
+	    h = PanoramiXPixHeight;
+	}
+#endif
 
 	cs = GetCompScreen(pScreen);
 	if ((pWin = cs->pOverlayWin) != NULL) {
-		if ((pWin->drawable.width == pScreen->width) &&
-			(pWin->drawable.height == pScreen->height))
+		if ((pWin->drawable.width == w) &&
+			(pWin->drawable.height == h))
 			return Success;
 
 		/* Let's resize the overlay window. */
-		vlist[0] = pScreen->width;
-		vlist[1] = pScreen->height;
+		vlist[0] = w;
+		vlist[1] = h;
 		return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
 	}
 
diff --git a/configure.ac b/configure.ac
index 83bd96f..09a7211 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1980,7 +1980,7 @@ if test "x$DMX" = xyes; then
 	fi
 	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
 	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
-	XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $MAIN_LIB $DIX_LIB $OS_LIB $FIXES_LIB"
+	XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $COMPOSITE_LIB $DAMAGE_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB"
 	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
 	AC_SUBST([XDMX_CFLAGS])
 	AC_SUBST([XDMX_LIBS])
commit 6dea617e0f71a6fc7937e3a1e10474fa87488284
Author: David Reveman <davidr at novell.com>
Date:   Tue Jan 5 15:35:10 2010 -0500

    fixes: Add panoramix support
    
    Taken from:
    583f4dde81d8d5e9101b0289946e1914ea1ee124
    
    With minor style fixes and ported to dixLookupResourceByType.
    
    Reviewed-by: Dave Airlie <airlied at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index b73c53f..5a395fc 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -53,6 +53,9 @@ Equipment Corporation.
 #include "servermd.h"
 #include "resource.h"
 #include "picturestr.h"
+#ifdef XFIXES
+#include "xfixesint.h"
+#endif
 #include "modinit.h"
 #include "protocol-versions.h"
 
@@ -581,6 +584,9 @@ void PanoramiXExtensionInit(int argc, char *argv[])
     ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor;
 
     PanoramiXRenderInit ();
+#ifdef XFIXES
+    PanoramiXFixesInit ();
+#endif
 }
 
 extern Bool CreateConnectionBlock(void);
@@ -882,6 +888,9 @@ static void PanoramiXResetProc(ExtensionEntry* extEntry)
     int		i;
 
     PanoramiXRenderReset ();
+#ifdef XFIXES
+    PanoramiXFixesReset ();
+#endif
     screenInfo.numScreens = PanoramiXNumScreens;
     for (i = 256; i--; )
 	ProcVector[i] = SavedProcVector[i];
diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h
index 5b1a3a9..b0a5a6e 100644
--- a/Xext/panoramiXsrv.h
+++ b/Xext/panoramiXsrv.h
@@ -26,6 +26,7 @@ extern _X_EXPORT unsigned long XRT_WINDOW;
 extern _X_EXPORT unsigned long XRT_PIXMAP;
 extern _X_EXPORT unsigned long XRT_GC;
 extern _X_EXPORT unsigned long XRT_COLORMAP;
+extern _X_EXPORT unsigned long XRT_PICTURE;
 
 /*
  * Drivers are allowed to wrap this function.  Each wrapper can decide that the
diff --git a/xfixes/region.c b/xfixes/region.c
index 42d5d7c..81ead4d 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -842,3 +842,81 @@ SProcXFixesExpandRegion (ClientPtr client)
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
 }
 
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+
+int
+PanoramiXFixesSetGCClipRegion (ClientPtr client)
+{
+    REQUEST(xXFixesSetGCClipRegionReq);
+    int		    result = Success, j;
+    PanoramiXRes    *gc;
+    REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
+
+    if ((result = dixLookupResourceByType((void **)&gc, stuff->gc, XRT_GC,
+					  client, DixWriteAccess))) {
+	client->errorValue = stuff->gc;
+	return result;
+    }
+
+    FOR_NSCREENS_BACKWARD(j) {
+        stuff->gc = gc->info[j].id;
+        result = (*PanoramiXSaveXFixesVector[X_XFixesSetGCClipRegion]) (client);
+        if(result != Success) break;
+    }
+
+    return result;
+}
+
+int
+PanoramiXFixesSetWindowShapeRegion (ClientPtr client)
+{
+    int		    result = Success, j;
+    PanoramiXRes    *win;
+    REQUEST(xXFixesSetWindowShapeRegionReq);
+
+    REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
+
+    if ((result = dixLookupResourceByType((void **)&win, stuff->dest,
+					  XRT_WINDOW, client,
+					  DixWriteAccess))) {
+	client->errorValue = stuff->dest;
+	return result;
+    }
+
+    FOR_NSCREENS_FORWARD(j) {
+	stuff->dest = win->info[j].id;
+	result = (*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client);
+        if(result != Success) break;
+    }
+
+    return result;
+}
+
+int
+PanoramiXFixesSetPictureClipRegion (ClientPtr client)
+{
+    REQUEST(xXFixesSetPictureClipRegionReq);
+    int		    result = Success, j;
+    PanoramiXRes    *pict;
+
+    REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
+
+    if ((result = dixLookupResourceByType((void **)&pict, stuff->picture,
+					  XRT_PICTURE, client,
+					  DixWriteAccess))) {
+	client->errorValue = stuff->picture;
+	return result;
+    }
+
+    FOR_NSCREENS_BACKWARD(j) {
+        stuff->picture = pict->info[j].id;
+	result = (*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
+        if(result != Success) break;
+    }
+
+    return result;
+}
+
+#endif
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 215909d..5dbfbec 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -262,3 +262,33 @@ XFixesExtensionInit(void)
 	SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion);
     }
 }
+
+#ifdef PANORAMIX
+
+int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
+
+void
+PanoramiXFixesInit (void)
+{
+    int i;
+
+    for (i = 0; i < XFixesNumberRequests; i++)
+	PanoramiXSaveXFixesVector[i] = ProcXFixesVector[i];
+    /*
+     * Stuff in Xinerama aware request processing hooks
+     */
+    ProcXFixesVector[X_XFixesSetGCClipRegion] = PanoramiXFixesSetGCClipRegion;
+    ProcXFixesVector[X_XFixesSetWindowShapeRegion] = PanoramiXFixesSetWindowShapeRegion;
+    ProcXFixesVector[X_XFixesSetPictureClipRegion] = PanoramiXFixesSetPictureClipRegion;
+}
+
+void
+PanoramiXFixesReset (void)
+{
+    int i;
+
+    for (i = 0; i < XFixesNumberRequests; i++)
+	ProcXFixesVector[i] = PanoramiXSaveXFixesVector[i];
+}
+
+#endif
diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
index f3d5361..9e50993 100644
--- a/xfixes/xfixesint.h
+++ b/xfixes/xfixesint.h
@@ -255,6 +255,15 @@ ProcXFixesExpandRegion (ClientPtr client);
 int
 SProcXFixesExpandRegion (ClientPtr client);
 
+int
+PanoramiXFixesSetGCClipRegion (ClientPtr client);
+
+int
+PanoramiXFixesSetWindowShapeRegion (ClientPtr client);
+
+int
+PanoramiXFixesSetPictureClipRegion (ClientPtr client);
+
 /* Cursor Visibility (Version 4) */
 
 int 
@@ -269,4 +278,8 @@ ProcXFixesShowCursor (ClientPtr client);
 int 
 SProcXFixesShowCursor (ClientPtr client);
 
+extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
+void PanoramiXFixesInit (void);
+void PanoramiXFixesReset (void);
+
 #endif /* _XFIXESINT_H_ */
commit 1b3c57f075049250c6d059412af3d6954468a5b7
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 20 12:25:23 2010 -0400

    xfree86: Remove unused xf86PixmapKeyRec
    
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 9f0dda9..b29ec51 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -62,9 +62,6 @@ extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec;
 extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec;
 #define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec)
 
-extern _X_EXPORT DevPrivateKeyRec xf86PixmapKeyRec;
-#define xf86PixmapKey (&xf86PixmapKeyRec)
-
 extern _X_EXPORT ScrnInfoPtr *xf86Screens;	/* List of pointers to ScrnInfoRecs */
 extern _X_EXPORT const unsigned char byte_reversed[256];
 extern _X_EXPORT Bool fbSlotClaimed;
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 2c10005..6177f05 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -49,7 +49,6 @@
 
 DevPrivateKeyRec xf86CreateRootWindowKeyRec;
 DevPrivateKeyRec xf86ScreenKeyRec;
-DevPrivateKeyRec xf86PixmapKeyRec;
 
 ScrnInfoPtr *xf86Screens = NULL;	/* List of ScrnInfos */
 const unsigned char byte_reversed[256] =
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 06a167b..ef90fa5 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -732,8 +732,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 	  FatalError("Cannot register DDX private keys");
 
   if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0) ||
-      !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0) ||
-      !dixRegisterPrivateKey(&xf86PixmapKeyRec, PRIVATE_PIXMAP, 0))
+      !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0))
       FatalError("Cannot register DDX private keys");
 
   for (i = 0; i < xf86NumScreens; i++) {
commit 63b9d67d7f4f1fa108370c619e1d0d06baedbd4c
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Aug 19 18:40:24 2010 -0400

    mi: Remove unused miAllocateGCPrivateIndex
    
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/mi/mi.h b/mi/mi.h
index 57837c4..c186940 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -456,10 +456,6 @@ extern _X_EXPORT Bool miScreenInit(
     VisualPtr /*visuals*/
 );
 
-extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex(
-    void
-);
-
 /* mivaltree.c */
 
 extern _X_EXPORT int miShapedWindowIn(
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index d349206..fb01c68 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -283,17 +283,6 @@ miScreenInit(
     return miScreenDevPrivateInit(pScreen, width, pbits);
 }
 
-static DevPrivateKeyRec privateKeyRec;
-#define privateKey (&privateKeyRec)
-
-DevPrivateKey
-miAllocateGCPrivateIndex(void)
-{
-    if (!dixRegisterPrivateKey(&privateKeyRec, PRIVATE_GC, 0))
-	return NULL;
-    return privateKey;
-}
-
 DevPrivateKeyRec miZeroLineScreenKeyRec;
 
 void
commit 87f5b843a08fd92b4b31c04e3e6d947b8bc0d160
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Nov 19 16:25:51 2010 -0500

    render: Reshuffle and cull dead field from GlyphSetRec
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/render/glyphstr.h b/render/glyphstr.h
index 6c1a837..cc9f284 100644
--- a/render/glyphstr.h
+++ b/render/glyphstr.h
@@ -71,10 +71,9 @@ typedef struct _GlyphHash {
 
 typedef struct _GlyphSet {
     CARD32	    refcnt;
-    PictFormatPtr   format;
     int		    fdepth;
+    PictFormatPtr   format;
     GlyphHashRec    hash;
-    int             maxPrivate;
     PrivateRec      *devPrivates;
 } GlyphSetRec, *GlyphSetPtr;
 
commit 606e079cc4d9a9db3197652ca51683c36f74efb8
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Nov 19 16:17:48 2010 -0500

    dix: reshuffle WindowOptRec to fill a hole on LP64
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/windowstr.h b/include/windowstr.h
index 29b95fc..0b66ebb 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -79,8 +79,8 @@ typedef struct _DevCursorNode {
 } DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
 
 typedef struct _WindowOpt {
-    VisualID		visual;		   /* default: same as parent */
     CursorPtr		cursor;		   /* default: window.cursorNone */
+    VisualID		visual;		   /* default: same as parent */
     Colormap		colormap;	   /* default: same as parent */
     Mask		dontPropagateMask; /* default: window.dontPropagate */
     Mask		otherEventMasks;   /* default: 0 */
commit fba5c8154dbc8f8c33801a5a43d7361cd6b54ffe
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Nov 19 15:21:31 2010 -0500

    dix: Remove unused ChangeSaveUnder hooks
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 813bda1..00d014c 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -345,14 +345,6 @@ typedef    Bool (* MarkOverlappedWindowsProcPtr)(
 	WindowPtr /*firstChild*/,
 	WindowPtr * /*pLayerWin*/);
 
-typedef    Bool (* ChangeSaveUnderProcPtr)(
-	WindowPtr /*pLayerWin*/,
-	WindowPtr /*firstChild*/);
-
-typedef    void (* PostChangeSaveUnderProcPtr)(
-	WindowPtr /*pLayerWin*/,
-	WindowPtr /*firstChild*/);
-
 typedef    int (* ConfigNotifyProcPtr)(
 	WindowPtr /*pWin*/,
 	int /*x*/,
@@ -527,8 +519,6 @@ typedef struct _Screen {
 
     MarkWindowProcPtr		MarkWindow;
     MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
-    ChangeSaveUnderProcPtr	ChangeSaveUnder;
-    PostChangeSaveUnderProcPtr	PostChangeSaveUnder;
     ConfigNotifyProcPtr		ConfigNotify;
     MoveWindowProcPtr		MoveWindow;
     ResizeWindowProcPtr		ResizeWindow;
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 33e3737..d349206 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -269,8 +269,6 @@ miScreenInit(
     pScreen->wakeupData = (pointer)0;
     pScreen->MarkWindow = miMarkWindow;
     pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
-    pScreen->ChangeSaveUnder = NULL;
-    pScreen->PostChangeSaveUnder = NULL;
     pScreen->MoveWindow = miMoveWindow;
     pScreen->ResizeWindow = miSlideAndSizeWindow;
     pScreen->GetLayerWindow = miGetLayerWindow;
commit c4c4676e6874b42c2371eee96faa2c2dbb59a704
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Nov 19 15:04:09 2010 -0500

    dix: Remove the backing store leftovers
    
    Reviewed-by: Keith Packard <keithp at keithp.com>
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
index 6d2f2d3..7a94627 100644
--- a/hw/dmx/dmxscrinit.c
+++ b/hw/dmx/dmxscrinit.c
@@ -283,8 +283,6 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
     if (dmxShadowFB && !shadowInit(pScreen, dmxShadowUpdateProc, NULL))
 	return FALSE;
 
-    miInitializeBackingStore(pScreen);
-
     if (dmxShadowFB) {
 	miDCInitialize(pScreen, &dmxPointerCursorFuncs);
     } else {
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 06c3661..c688eb0 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -1022,12 +1022,6 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     fbInitValidateTree (pScreen);
 #endif
 
-#if 0
-    pScreen->backingStoreSupport = Always;
-    miInitializeBackingStore (pScreen);
-#endif
-
-
     /*
      * Wrap CloseScreen, the order now is:
      *	KdCloseScreen
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index e109734..53f82f9 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -875,13 +875,6 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
 
     if (!ret) return FALSE;
 
-    miInitializeBackingStore(pScreen);
-
-    /*
-     * Circumvent the backing store that was just initialised.  This amounts
-     * to a truely bizarre way of initialising SaveDoomedAreas and friends.
-     */
-
     pScreen->InstallColormap = vfbInstallColormap;
     pScreen->UninstallColormap = vfbUninstallColormap;
     pScreen->ListInstalledColormaps = vfbListInstalledColormaps;
diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index 3804324..1ca6789 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -255,8 +255,6 @@ cat > sdksyms.c << EOF
 
 /* include/Makefile.am */
 #include "XIstubs.h"
-#include "bstore.h"
-#include "bstorestr.h"
 #include "closestr.h"
 #include "closure.h"
 #include "colormap.h"
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 2af954f..40b49e5 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -1241,8 +1241,6 @@ typedef struct _XAAInfoRec {
    GetImageProcPtr GetImage;
    GetSpansProcPtr GetSpans;
    CopyWindowProcPtr CopyWindow;
-   BackingStoreSaveAreasProcPtr SaveAreas;
-   BackingStoreRestoreAreasProcPtr RestoreAreas;
 
    unsigned int offscreenDepths;
    Bool offscreenDepthsInitialized;
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 0a6cab6..d0c7fc8 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -239,8 +239,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
 	       defaultVisual, /* root visual */
 	       numVisuals, visuals);
 
-/*  miInitializeBackingStore(pScreen); */
-
   pScreen->defColormap = (Colormap) FakeClientID(0);
   pScreen->minInstalledCmaps = MINCMAPS;
   pScreen->maxInstalledCmaps = MAXCMAPS;
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index fce3b2c..c8eade8 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -868,28 +868,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
 	    (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
     }
 
-    if (pWin->backStorage &&
-	((pWin->backingStore == Always) || WasViewable))
-    {
-	if (!WasViewable)
-	    pOldClip = &pWin->clipList; /* a convenient empty region */
-	bsExposed = (*pScreen->TranslateBackingStore)
-			     (pWin, 0, 0, pOldClip,
-			      pWin->drawable.x, pWin->drawable.y);
-	if (WasViewable)
-	    RegionDestroy(pOldClip);
-	if (bsExposed)
-	{
-	    RegionPtr	valExposed = NullRegion;
-
-	    if (pWin->valdata)
-		valExposed = &pWin->valdata->after.exposed;
-	    (*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
-	    if (valExposed)
-		RegionEmpty(valExposed);
-	    RegionDestroy(bsExposed);
-	}
-    }
     if (WasViewable)
     {
 	if (anyMarked)
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 57a0884..21036f4 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -394,13 +394,6 @@ winFinishScreenInitFB (int index,
     }
 #endif
 
-  /*
-   * Backing store support should reduce network traffic and increase
-   * performance.
-   */
-  miInitializeBackingStore (pScreen);
-
-  /* KDrive does miDCInitialize right after miInitializeBackingStore */
   /* Setup the cursor routines */
 #if CYGDEBUG
   winDebug ("winFinishScreenInitFB - Calling miDCInitialize ()\n");
diff --git a/include/Makefile.am b/include/Makefile.am
index eb0e3a7..966d215 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,8 +1,6 @@
 if XORG
 sdk_HEADERS =		\
 	XIstubs.h	\
-	bstore.h	\
-	bstorestr.h	\
 	callback.h	\
 	closestr.h	\
 	closure.h	\
diff --git a/include/bstore.h b/include/bstore.h
deleted file mode 100644
index 843d6bb..0000000
--- a/include/bstore.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies.  The University of
- * California makes no representations about the suitability of this software
- * for any purpose.  It is provided "as is" without express or implied
- * warranty.
- */
-
-/*
- * Moved here from mi to allow wrapping of lower level backing store functions.
- * -- 1997.10.27  Marc Aurele La France (tsi at xfree86.org)
- */
-
-#ifndef _BSTORE_H_
-#define _BSTORE_H_
-
-#include "bstorestr.h"
-
-#endif /* _BSTORE_H_ */
diff --git a/include/bstorestr.h b/include/bstorestr.h
deleted file mode 100644
index cf7820b..0000000
--- a/include/bstorestr.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies.  The University of
- * California makes no representations about the suitability of this software
- * for any purpose.  It is provided "as is" without express or implied
- * warranty.
- */
-
-/*
- * Moved here from mi to allow wrapping of lower level backing store functions.
- * -- 1997.10.27  Marc Aurele La France (tsi at xfree86.org)
- */
-
-#ifndef _BSTORESTR_H_
-#define _BSTORESTR_H_
-
-#include "gc.h"
-#include "pixmap.h"
-#include "region.h"
-#include "window.h"
-
-typedef    void (* BackingStoreSaveAreasProcPtr)(
-	PixmapPtr /*pBackingPixmap*/,
-	RegionPtr /*pObscured*/,
-	int /*x*/,
-	int /*y*/,
-	WindowPtr /*pWin*/);
-
-typedef    void (* BackingStoreRestoreAreasProcPtr)(
-	PixmapPtr /*pBackingPixmap*/,
-	RegionPtr /*pExposed*/,
-	int /*x*/,
-	int /*y*/,
-	WindowPtr /*pWin*/);
-
-typedef    void (* BackingStoreSetClipmaskRgnProcPtr)(
-	GCPtr /*pBackingGC*/,
-	RegionPtr /*pbackingCompositeClip*/);
-
-typedef    PixmapPtr (* BackingStoreGetImagePixmapProcPtr)(void);
-
-typedef    PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)(void);
-
-typedef struct _BSFuncs {
-	BackingStoreSaveAreasProcPtr SaveAreas;
-	BackingStoreRestoreAreasProcPtr RestoreAreas;
-	BackingStoreSetClipmaskRgnProcPtr SetClipmaskRgn;
-	BackingStoreGetImagePixmapProcPtr GetImagePixmap;
-	BackingStoreGetSpansPixmapProcPtr GetSpansPixmap;
-} BSFuncRec, *BSFuncPtr;
-
-#endif /* _BSTORESTR_H_ */
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index cd4fb70..813bda1 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -50,7 +50,6 @@ SOFTWARE.
 
 #include "screenint.h"
 #include "regionstr.h"
-#include "bstore.h"
 #include "colormap.h"
 #include "cursor.h"
 #include "validate.h"
@@ -213,48 +212,6 @@ typedef    PixmapPtr (* CreatePixmapProcPtr)(
 typedef    Bool (* DestroyPixmapProcPtr)(
 	PixmapPtr /*pPixmap*/);
 
-typedef    void (* SaveDoomedAreasProcPtr)(
-	WindowPtr /*pWindow*/,
-	RegionPtr /*prgnSave*/,
-	int /*xorg*/,
-	int /*yorg*/);
-
-typedef    RegionPtr (* RestoreAreasProcPtr)(
-	WindowPtr /*pWindow*/,
-	RegionPtr /*prgnRestore*/);
-
-typedef    void (* ExposeCopyProcPtr)(
-	WindowPtr /*pSrc*/,
-	DrawablePtr /*pDst*/,
-	GCPtr /*pGC*/,
-	RegionPtr /*prgnExposed*/,
-	int /*srcx*/,
-	int /*srcy*/,
-	int /*dstx*/,
-	int /*dsty*/,
-	unsigned long /*plane*/);
-
-typedef    RegionPtr (* TranslateBackingStoreProcPtr)(
-	WindowPtr /*pWindow*/,
-	int /*windx*/,
-	int /*windy*/,
-	RegionPtr /*oldClip*/,
-	int /*oldx*/,
-	int /*oldy*/);
-
-typedef    RegionPtr (* ClearBackingStoreProcPtr)(
-	WindowPtr /*pWindow*/,
-	int /*x*/,
-	int /*y*/,
-	int /*w*/,
-	int /*h*/,
-	Bool /*generateExposures*/);
-
-typedef    void (* DrawGuaranteeProcPtr)(
-	WindowPtr /*pWindow*/,
-	GCPtr /*pGC*/,
-	int /*guarantee*/);
-    
 typedef    Bool (* RealizeFontProcPtr)(
 	ScreenPtr /*pScreen*/,
 	FontPtr /*pFont*/);
@@ -511,20 +468,6 @@ typedef struct _Screen {
     CreatePixmapProcPtr		CreatePixmap;
     DestroyPixmapProcPtr	DestroyPixmap;
 
-    /* Backing store procedures */
-
-    SaveDoomedAreasProcPtr	SaveDoomedAreas;
-    RestoreAreasProcPtr		RestoreAreas;
-    ExposeCopyProcPtr		ExposeCopy;
-    TranslateBackingStoreProcPtr TranslateBackingStore;
-    ClearBackingStoreProcPtr	ClearBackingStore;
-    DrawGuaranteeProcPtr	DrawGuarantee;
-    /*
-     * A read/write copy of the lower level backing store vector is needed now
-     * that the functions can be wrapped.
-     */
-    BSFuncRec			BackingStoreFuncs;
-    
     /* Font procedures */
 
     RealizeFontProcPtr		RealizeFont;
diff --git a/mi/Makefile.am b/mi/Makefile.am
index f6dabda..96ceeaa 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -12,9 +12,7 @@ libmi_la_SOURCES = 	\
 	mi.h		\
 	miarc.c		\
 	mibitblt.c	\
-	mibstore.c	\
 	mibstore.h	\
-	mibstorest.h	\
 	micmap.c	\
 	micmap.h	\
 	micoord.h	\
diff --git a/mi/mibstore.c b/mi/mibstore.c
index 262b494..827b9b2 100644
--- a/mi/mibstore.c
+++ b/mi/mibstore.c
@@ -40,10 +40,4 @@
 void
 miInitializeBackingStore (ScreenPtr pScreen)
 {
-    pScreen->SaveDoomedAreas = NULL;
-    pScreen->RestoreAreas = NULL;
-    pScreen->ExposeCopy = NULL;
-    pScreen->TranslateBackingStore = NULL;
-    pScreen->ClearBackingStore = NULL;
-    pScreen->DrawGuarantee = NULL;
 }
diff --git a/mi/mibstore.h b/mi/mibstore.h
index ef7e187..c23caac 100644
--- a/mi/mibstore.h
+++ b/mi/mibstore.h
@@ -18,8 +18,6 @@
 
 #include "screenint.h"
 
-extern _X_EXPORT void miInitializeBackingStore(
-    ScreenPtr /*pScreen*/
-);
+#define miInitializeBackingStore(x) do {} while (0)
 
 #endif /* _MIBSTORE_H */
diff --git a/mi/mibstorest.h b/mi/mibstorest.h
deleted file mode 100644
index ccf4fb7..0000000
--- a/mi/mibstorest.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * mibstorest.h
- *
- * internal structure definitions for mi backing store
- */
-
-
-/*
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice 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 NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-*/
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "mibstore.h"
-#include "regionstr.h"
-
-/*
- * One of these structures is allocated per GC used with a backing-store
- * drawable.
- */
-
-typedef struct {
-    GCPtr	    pBackingGC;	    /* Copy of the GC but with graphicsExposures
-				     * set FALSE and the clientClip set to
-				     * clip output to the valid regions of the
-				     * backing pixmap. */
-    int		    guarantee;      /* GuaranteeNothing, etc. */
-    unsigned long   serialNumber;   /* clientClip computed time */
-    unsigned long   stateChanges;   /* changes in parent gc since last copy */
-    GCOps	    *wrapOps;	    /* wrapped ops */
-    GCFuncs	    *wrapFuncs;	    /* wrapped funcs */
-} miBSGCRec, *miBSGCPtr;
-
-/*
- * one of these structures is allocated per Window with backing store
- */
-
-typedef struct {
-    PixmapPtr	  pBackingPixmap;   /* Pixmap for saved areas */
-    short	  x;		    /* origin of pixmap relative to window */
-    short	  y;
-    RegionRec	  SavedRegion;	    /* Valid area in pBackingPixmap */
-    char    	  viewable; 	    /* Tracks pWin->viewable so SavedRegion may
-				     * be initialized correctly when the window
-				     * is first mapped */
-    char    	  status;    	    /* StatusNoPixmap, etc. */
-    char	  backgroundState;  /* background type */
-    PixUnion	  background;	    /* background pattern */
-} miBSWindowRec, *miBSWindowPtr;
-
-#define StatusNoPixmap	1	/* pixmap has not been created */
-#define StatusVirtual	2	/* pixmap is virtual, tiled with background */
-#define StatusVDirty	3	/* pixmap is virtual, visiblt has contents */
-#define StatusBadAlloc	4	/* pixmap create failed, do not try again */
-#define StatusContents	5	/* pixmap is created, has valid contents */
-
-typedef struct {
-    /*
-     * screen func wrappers
-     */
-    CloseScreenProcPtr	CloseScreen;
-    GetImageProcPtr	GetImage;
-    GetSpansProcPtr	GetSpans;
-    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-    CreateGCProcPtr	CreateGC;
-    DestroyWindowProcPtr DestroyWindow;
-} miBSScreenRec, *miBSScreenPtr;
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 661ecb2..33e3737 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -280,13 +280,6 @@ miScreenInit(
     pScreen->SetShape = miSetShape;
     pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow;
 
-    pScreen->SaveDoomedAreas = 0;
-    pScreen->RestoreAreas = 0;
-    pScreen->ExposeCopy = 0;
-    pScreen->TranslateBackingStore = 0;
-    pScreen->ClearBackingStore = 0;
-    pScreen->DrawGuarantee = 0;
-
     miSetZeroLineBias(pScreen, DEFAULTZEROLINEBIAS);
 
     return miScreenDevPrivateInit(pScreen, width, pbits);
diff --git a/mi/mivalidate.h b/mi/mivalidate.h
index ef258c0..18700ac 100644
--- a/mi/mivalidate.h
+++ b/mi/mivalidate.h
@@ -40,8 +40,7 @@ typedef union _Validate {
 	DDXPointRec	oldAbsCorner;	/* old window position */
 	RegionPtr	borderVisible;	/* visible region of border, */
 					/* non-null when size changes */
-	Bool		resized;	/* unclipped winSize has changed - */
-					/* don't call SaveDoomedAreas */
+	Bool		resized;	/* unclipped winSize has changed */
     } before;
     struct AfterValidate {
 	RegionRec	exposed;	/* exposed regions, absolute pos */
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c
index e2c4ffe..d242600 100644
--- a/miext/rootless/rootlessValTree.c
+++ b/miext/rootless/rootlessValTree.c
@@ -471,18 +471,6 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen,
 			       universe, &pParent->clipList);
     }
 
-    /*
-     * One last thing: backing storage. We have to try to save what parts of
-     * the window are about to be obscured. We can just subtract the universe
-     * from the old clipList and get the areas that were in the old but aren't
-     * in the new and, hence, are about to be obscured.
-     */
-    if (pParent->backStorage && !resized)
-    {
-	RegionSubtract(exposed, &pParent->clipList, universe);
-	(* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
-    }
-    
     /* HACK ALERT - copying contents of regions, instead of regions */
     {
 	RegionRec   tmp;
commit 48bc8d0dd99284f509bc6de01a8fd24a7bfc69d5
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Oct 6 09:56:56 2010 -0400

    render: repack PictureRec
    
    Eliminate the unused dither field, move filter and stateChanges into the
    bitfield, and reorder elements to pack holes on LP64.
    
    sizeof(PictureRec)      ILP32       LP64
    before:                    84        152
    after:                     72        120
    
    Reviewed-by: Dave Airlie <airlied at redhat.com>
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
index 915e767..ab26593 100644
--- a/hw/dmx/dmxpict.c
+++ b/hw/dmx/dmxpict.c
@@ -1011,8 +1011,6 @@ void dmxValidatePicture(PicturePtr pPicture, Mask mask)
 	    attribs.poly_edge = pPicture->polyEdge;
 	if (mask & CPPolyMode)
 	    attribs.poly_mode = pPicture->polyMode;
-	if (mask & CPDither)
-	    attribs.dither = pPicture->dither;
 	if (mask & CPComponentAlpha)
 	    attribs.component_alpha = pPicture->componentAlpha;
 
diff --git a/render/picture.c b/render/picture.c
index 896eaa7..0028cc7 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -735,13 +735,12 @@ SetPictureToDefaults (PicturePtr    pPicture)
 
     pPicture->transform = 0;
 
-    pPicture->dither = None;
     pPicture->filter = PictureGetFilterId (FilterNearest, -1, TRUE);
     pPicture->filter_params = 0;
     pPicture->filter_nparams = 0;
 
     pPicture->serialNumber = GC_CHANGE_SERIAL_BIT;
-    pPicture->stateChanges = (1 << (CPLastBit+1)) - 1;
+    pPicture->stateChanges = -1;
     pPicture->pSourcePict = 0;
 }
 
@@ -1261,7 +1260,7 @@ ChangePicture (PicturePtr	pPicture,
 	    }
 	    break;
 	case CPDither:
-	    pPicture->dither = NEXT_VAL(Atom);
+	    (void) NEXT_VAL(Atom); /* unimplemented */
 	    break;
 	case CPComponentAlpha:
 	    {
@@ -1480,7 +1479,6 @@ CopyPicture (PicturePtr	pSrc,
 	    pDst->polyMode = pSrc->polyMode;
 	    break;
 	case CPDither:
-	    pDst->dither = pSrc->dither;
 	    break;
 	case CPComponentAlpha:
 	    pDst->componentAlpha = pSrc->componentAlpha;
diff --git a/render/picturestr.h b/render/picturestr.h
index 5c6c41e..ae69eef 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -151,8 +151,6 @@ typedef struct _Picture {
     PictFormatShort format;	    /* PICT_FORMAT */
     int		    refcnt;
     CARD32	    id;
-    PicturePtr	    pNext;	    /* chain on same drawable */
-
     unsigned int    repeat : 1;
     unsigned int    graphicsExposures : 1;
     unsigned int    subWindowMode : 1;
@@ -162,7 +160,11 @@ typedef struct _Picture {
     unsigned int    clientClipType : 2;
     unsigned int    componentAlpha : 1;
     unsigned int    repeatType : 2;
-    unsigned int    unused : 21;
+    unsigned int    filter : 3;
+    unsigned int    stateChanges : CPLastBit;
+    unsigned int    unused : 18 - CPLastBit;
+
+    PicturePtr	    pNext;	    /* chain on same drawable */
 
     PicturePtr	    alphaMap;
     DDXPointRec	    alphaOrigin;
@@ -170,9 +172,6 @@ typedef struct _Picture {
     DDXPointRec	    clipOrigin;
     pointer	    clientClip;
 
-    Atom	    dither;
-
-    unsigned long   stateChanges;
     unsigned long   serialNumber;
 
     RegionPtr	    pCompositeClip;
@@ -181,10 +180,9 @@ typedef struct _Picture {
 
     PictTransform   *transform;
 
-    int		    filter;
+    SourcePictPtr   pSourcePict;
     xFixed	    *filter_params;
     int		    filter_nparams;
-    SourcePictPtr   pSourcePict;
 } PictureRec;
 
 typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
@@ -205,6 +203,7 @@ typedef struct {
 #define PictFilterBest		4
 
 #define PictFilterConvolution	5
+/* if you add an 8th filter, expand the filter bitfield above */
 
 typedef struct {
     char	    *alias;
commit 7ee965a300c9eddcc1acacf9414cfe3e589222a8
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue May 11 09:16:19 2010 -0400

    linux: Refactor VT switch on {re,}generation and shutdown
    
    This makes more things fatal than were fatal before, but that's correct;
    if you need the VT, then failing to get it on regeneration means things
    are about to go very very badly.
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 58051d7..9c71a42 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -59,6 +59,16 @@ drain_console(int fd, void *closure)
     }
 }
 
+static void
+switch_to(int vt, const char *from)
+{
+    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0)
+        FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
+
+    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0)
+        FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
+}
+
 void
 xf86OpenConsole(void)
 {
@@ -174,13 +184,7 @@ xf86OpenConsole(void)
 	    /*
 	     * now get the VT.  This _must_ succeed, or else fail completely.
 	     */
-	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
-	        FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n",
-		           strerror(errno));
-
-	    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
-	        FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
-			   strerror(errno));
+            switch_to(xf86Info.vtno, "xf86OpenConsole");
 
 	    if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
 	        FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
@@ -227,16 +231,8 @@ xf86OpenConsole(void)
     } else { 	/* serverGeneration != 1 */
         if (!ShareVTs && VTSwitch)
         {
-	    /*
-	     * now get the VT
-	     */
-	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
-	        xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed %s\n",
-		        strerror(errno));
-
-	    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
-	        xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed %s\n",
-		        strerror(errno));
+	    /* now get the VT */
+            switch_to(xf86Info.vtno, "xf86OpenConsole");
         }
     }
 }
@@ -281,13 +277,7 @@ xf86CloseConsole(void)
          * Perform a switch back to the active VT when we were started
          */
         if (activeVT >= 0) {
-	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, activeVT) < 0)
-	        xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s\n",
-		        strerror(errno));
-	    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, activeVT) < 0)
-		xf86Msg(X_WARNING,
-			"xf86CloseConsole: VT_WAITACTIVE failed: %s\n",
-			strerror(errno));
+            switch_to(activeVT, "xf86CloseConsole");
 	    activeVT = -1;
         }
     }
commit 0def735c6a9fab19acc4b806def6921a702f617f
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue May 11 08:40:33 2010 -0400

    xfree86: Remove dead ifdefs from VT switching
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index d4ef0f7..818de17 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -31,10 +31,6 @@
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
 
-#ifdef OSHEADER
-# include OSHEADER
-#endif
-
 /*
  * Handle the VT-switching interface for OSs that use USL-style ioctl()s
  * (the sysv, sco, and linux subdirs).
@@ -63,16 +59,9 @@ xf86VTSwitchAway(void)
 {
 	xf86Info.vtRequestsPending = FALSE;
 	if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
-	{
 		return FALSE;
-	}
 	else
-	{
-#ifdef OSSWITCHAWAY
-	        OSSWITCHAWAY;
-#endif
 		return TRUE;
-	}
 }
 
 Bool
@@ -80,13 +69,9 @@ xf86VTSwitchTo(void)
 {
 	xf86Info.vtRequestsPending = FALSE;
 	if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
-	{
 		return FALSE;
-	}
 	else
-	{
 		return TRUE;
-	}
 }
 
 Bool
commit 96a7a7d197d5f96e7aa51928155d4b8d5a115875
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 10 18:40:09 2010 -0400

    linux: Don't muck about with tty permissions
    
    This is not X's job.
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 9b50ccd..58051d7 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -43,42 +43,10 @@ static Bool VTSwitch = TRUE;
 static Bool ShareVTs = FALSE;
 static int activeVT = -1;
 
-static int vtPermSave[4];
 static char vtname[11];
 static struct termios tty_attr; /* tty state to restore */
 static int tty_mode; /* kbd mode to restore */
 
-static int
-saveVtPerms(void)
-{
-    /* We need to use stat to get permissions. */
-    struct stat svtp;
-
-    /* Do them numerically ordered, hard coded tty0 first. */
-    if (stat("/dev/tty0", &svtp) != 0)
-	return 0;
-    vtPermSave[0] = (int)svtp.st_uid;
-    vtPermSave[1] = (int)svtp.st_gid;
-
-    /* Now check the console we are dealing with. */
-    if (stat(vtname, &svtp) != 0)
-	return 0;
-    vtPermSave[2] = (int)svtp.st_uid;
-    vtPermSave[3] = (int)svtp.st_gid;
-
-    return 1;
-}
-
-static void
-restoreVtPerms(void)
-{
-    if (geteuid() == 0) {
-	 /* Set the terminal permissions back to before we started. */
-	 (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
-	 (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
-    }
-}
-
 static void *console_handler;
 
 static void
@@ -177,34 +145,6 @@ xf86OpenConsole(void)
 	    FatalError("xf86OpenConsole: Cannot open virtual console"
 		       " %d (%s)\n", xf86Info.vtno, strerror(errno));
 
-        if (!ShareVTs)
-        {
-	    /*
-	     * Grab the vt ownership before we overwrite it.
-	     * Hard coded /dev/tty0 into this function as well for below.
-	     */
-	    if (!saveVtPerms())
-	        xf86Msg(X_WARNING,
-		        "xf86OpenConsole: Could not save ownership of VT\n");
-
-	    if (geteuid() == 0) {
-		    /* change ownership of the vt */
-		    if (chown(vtname, getuid(), getgid()) < 0)
-			    xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
-				    vtname, strerror(errno));
-
-		    /*
-		     * the current VT device we're running on is not
-		     * "console", we want to grab all consoles too
-		     *
-		     * Why is this needed??
-		     */
-		    if (chown("/dev/tty0", getuid(), getgid()) < 0)
-			    xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
-				    strerror(errno));
-	    }
-        }
-
 	/*
 	 * Linux doesn't switch to an active vt after the last close of a vt,
 	 * so we do this ourselves by remembering which is active now.
@@ -352,8 +292,6 @@ xf86CloseConsole(void)
         }
     }
     close(xf86Info.consoleFd);	/* make the vt-manager happy */
-
-    restoreVtPerms();		/* restore the permissions */
 }
 
 int
commit 6ce1908ba4959aaa0a48171acb62cf6a5d5cbf18
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed May 12 08:50:54 2010 -0400

    xfree86: Remove os-support/sysv
    
    Nothing's using it, the SysV derivatives we support have their own
    custom versions.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/configure.ac b/configure.ac
index bd027cd..83bd96f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2230,7 +2230,6 @@ hw/xfree86/os-support/misc/Makefile
 hw/xfree86/os-support/linux/Makefile
 hw/xfree86/os-support/sco/Makefile
 hw/xfree86/os-support/solaris/Makefile
-hw/xfree86/os-support/sysv/Makefile
 hw/xfree86/parser/Makefile
 hw/xfree86/ramdac/Makefile
 hw/xfree86/shadowfb/Makefile
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index 04997a6..b50f441 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -1,5 +1,5 @@
 SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
-DIST_SUBDIRS = bsd bus misc linux solaris sysv sco hurd
+DIST_SUBDIRS = bsd bus misc linux solaris sco hurd
 
 sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
 
diff --git a/hw/xfree86/os-support/sysv/Makefile.am b/hw/xfree86/os-support/sysv/Makefile.am
deleted file mode 100644
index e86e70a..0000000
--- a/hw/xfree86/os-support/sysv/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = sysv_init.c sysv_video.c
diff --git a/hw/xfree86/os-support/sysv/sysv_init.c b/hw/xfree86/os-support/sysv/sysv_init.c
deleted file mode 100644
index 9a423ff..0000000
--- a/hw/xfree86/os-support/sysv/sysv_init.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Wexelblat <dwex at goblin.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Thomas Roell and David Wexelblat 
- * not be used in advertising or publicity pertaining to distribution of 
- * the software without specific, written prior permission.  Thomas Roell and
- * David Wexelblat makes no representations about the suitability of this 
- * software for any purpose.  It is provided "as is" without express or 
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO 
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT BE LIABLE FOR 
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xmd.h>
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-static Bool KeepTty = FALSE;
-#ifdef SVR4
-static Bool Protect0 = FALSE;
-#endif
-static int VTnum = -1;
-
-
-void
-xf86OpenConsole()
-{
-    int fd;
-    struct vt_mode VT;
-    char vtname1[10],vtname2[10];
-    MessageType from = X_PROBED;
-
-    if (serverGeneration == 1) 
-    {
-    	/* check if we're run with euid==0 */
-    	if (geteuid() != 0)
-	{
-      	    FatalError("xf86OpenConsole: Server must be suid root\n");
-	}
-
-#ifdef SVR4
-	/* Protect page 0 to help find NULL dereferencing */
-	/* mprotect() doesn't seem to work */
-	if (Protect0)
-	{
-	    int fd = -1;
-
-	    if ((fd = open("/dev/zero", O_RDONLY, 0)) < 0)
-	    {
-		xf86Msg(X_WARNING,
-			"xf86OpenConsole: cannot open /dev/zero (%s)\n",
-			strerror(errno));
-	    }
-	    else
-	    {
-		if ((int)mmap(0, 0x1000, PROT_NONE,
-			      MAP_FIXED | MAP_SHARED, fd, 0) == -1)
-		{
-		    xf86Msg(X_WARNING,
-			"xf86OpenConsole: failed to protect page 0 (%s)\n",
-			strerror(errno));
-		}
-		close(fd);
-	    }
-	}
-#endif
-    	/*
-     	 * setup the virtual terminal manager
-     	 */
-    	if (VTnum != -1) 
-	{
-      	    xf86Info.vtno = VTnum;
-	    from = X_CMDLINE;
-    	}
-    	else 
-	{
-      	    if ((fd = open("/dev/console",O_WRONLY,0)) < 0) 
-	    {
-        	FatalError(
-		    "xf86OpenConsole: Cannot open /dev/console (%s)\n",
-		    strerror(errno));
-	    }
-      	    if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || 
-		(xf86Info.vtno == -1))
-	    {
-        	FatalError("xf86OpenConsole: Cannot find a free VT\n");
-	    }
-           close(fd);
-        }
-	xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
-
-	sprintf(vtname1,"/dev/vc%02d",xf86Info.vtno); /* ESIX */
-	sprintf(vtname2,"/dev/vt%02d",xf86Info.vtno); /* rest of the world */
-
-	if (!KeepTty)
-    	{
-    	    setpgrp();
-	}
-
-	if (((xf86Info.consoleFd = open(vtname1, O_RDWR|O_NDELAY, 0)) < 0) &&
-	    ((xf86Info.consoleFd = open(vtname2, O_RDWR|O_NDELAY, 0)) < 0))
-	{
-            FatalError("xf86OpenConsole: Cannot open %s (%s) (%s)\n",
-		       vtname2, vtname1, strerror(errno));
-	}
-
-	/* change ownership of the vt */
-	if (chown(vtname1, getuid(), getgid()) < 0)
-	{
-            chown(vtname2, getuid(), getgid());
-	}
-
-	/*
-	 * now get the VT
-	 */
-	if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
-	{
-    	    xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
-	}
-	if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
-	{
-	    xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
-	}
-	if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) 
-	{
-	    FatalError("xf86OpenConsole: VT_GETMODE failed\n");
-	}
-
-	signal(SIGUSR1, xf86VTRequest);
-
-	VT.mode = VT_PROCESS;
-	VT.relsig = SIGUSR1;
-	VT.acqsig = SIGUSR1;
-	if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) 
-	{
-	    FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
-	}
-	if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
-	{
-	    FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
-	}
-    }
-    else 
-    {   
-	/* serverGeneration != 1 */
-	/*
-	 * now get the VT
-	 */
-	if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
-	{
-	    xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
-	}
-	if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
-	{
-      	    xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
-	}
-	/*
-	 * If the server doesn't have the VT when the reset occurs,
-	 * this is to make sure we don't continue until the activate
-	 * signal is received.
-	 */
-	if (!xf86Screens[0]->vtSema)
-	    sleep(5);
-    }
-    return;
-}
-
-void
-xf86CloseConsole()
-{
-    struct vt_mode   VT;
-
-#if 0
-    ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno);
-    ioctl(xf86Info.consoleFd, VT_WAITACTIVE, 0);
-#endif
-    ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);  /* Back to text mode ... */
-    if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
-    {
-	VT.mode = VT_AUTO;
-	ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* set dflt vt handling */
-    }
-    close(xf86Info.consoleFd);                 /* make the vt-manager happy */
-    return;
-}
-
-int
-xf86ProcessArgument(int argc, char *argv[], int i)
-{
-	/*
-	 * Keep server from detaching from controlling tty.  This is useful 
-	 * when debugging (so the server can receive keyboard signals.
-	 */
-	if (!strcmp(argv[i], "-keeptty"))
-	{
-		KeepTty = TRUE;
-		return 1;
-	}
-#ifdef SVR4
-	/*
-	 * Undocumented flag to protect page 0 from read/write to help
-	 * catch NULL pointer dereferences.  This is purely a debugging
-	 * flag.
-	 */
-	if (!strcmp(argv[i], "-protect0"))
-	{
-		Protect0 = TRUE;
-		return 1;
-	}
-#endif
-	if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
-	{
-		if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
-		{
-			UseMsg();
-			VTnum = -1;
-			return 0;
-		}
-		return 1;
-	}
-	return 0;
-}
-
-void
-xf86UseMsg()
-{
-	ErrorF("vtXX                   use the specified VT number\n");
-	ErrorF("-keeptty               ");
-	ErrorF("don't detach controlling tty (for debugging only)\n");
-	return;
-}
diff --git a/hw/xfree86/os-support/sysv/sysv_video.c b/hw/xfree86/os-support/sysv/sysv_video.c
deleted file mode 100644
index 480abe5..0000000
--- a/hw/xfree86/os-support/sysv/sysv_video.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Wexelblat <dwex at goblin.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Thomas Roell and David Wexelblat 
- * not be used in advertising or publicity pertaining to distribution of 
- * the software without specific, written prior permission.  Thomas Roell and
- * David Wexelblat makes no representations about the suitability of this 
- * software for any purpose.  It is provided "as is" without express or 
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO 
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT BE LIABLE FOR 
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#define _NEED_SYSI86
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "xf86OSpriv.h"
-
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-
-#ifndef SI86IOPL
-#define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL)
-#define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0)
-#else
-#define SET_IOPL() sysi86(SI86IOPL,3)
-#define RESET_IOPL() sysi86(SI86IOPL,0)
-#endif
-
-/***************************************************************************/
-/* Video Memory Mapping section                                            */
-/***************************************************************************/
-
-/*
- * XXX Support for SVR3 will need to be reworked if needed.  In particular
- * the Region parameter is no longer passed, and will need to be dealt
- * with internally if required.
- * OK, i'll rework that thing ... (clean it up a lot)
- * SVR3 Support only with SVR3_MMAPDRV (mr)
- * 
- */
-
-#ifdef HAS_SVR3_MMAPDRV
-#ifndef MMAP_DEBUG
-#define MMAP_DEBUG	3
-#endif
-
-struct kd_memloc MapDSC;
-int mmapFd = -2;
-
-static int
-mmapStat(pointer Base, unsigned long Size) {
-
-	int nmmreg,i=0,region=-1;
-	mmapinfo_t *ibuf;
-
-	nmmreg = ioctl(mmapFd, GETNMMREG);
-
-	if(nmmreg <= 0)
-	   xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			  "\nNo physical memory mapped currently.\n\n");
-	else {
-	  if((ibuf = (mmapinfo_t *)malloc(nmmreg*sizeof(mmapinfo_t))) == NULL) 
-		xf86Msg(X_WARNING,
-			  "Couldn't allocate memory 4 mmapinfo_t\n");
-	  else {
-	     if(ioctl(mmapFd, GETMMREG, ibuf) != -1)
-		{ 
-		   xf86MsgVerb(X_INFO, MMAP_DEBUG,
-				"# mmapStat: [Size=%x,Base=%x]\n", Size, Base);
-		   xf86MsgVerb(X_INFO, MMAP_DEBUG,
-		     "#      Physical Address     Size      Reference Count\n");
-		for(i = 0; i < nmmreg; i++) {
-		   xf86MsgVerb(X_INFO, MMAP_DEBUG,
-                      "%-4d   0x%08X         %5dk                %5d	",
-          	      i, ibuf[i].physaddr, ibuf[i].length/1024, ibuf[i].refcnt);
-		   if (ibuf[i].physaddr == Base || ibuf[i].length == Size ) {
-			xf86MsgVerb(X_INFO, MMAP_DEBUG,"MATCH !!!");
-			if (region==-1) region=i;
-                      }
-		   xf86ErrorFVerb(MMAP_DEBUG, "\n");
-		}
-		xf86ErrorFVerb(MMAP_DEBUG, "\n");
-		}
-	     free(ibuf);
-	   }
-	}
-	if (region == -1 && nmmreg > 0) region=region * i;
-	return region;
-}
-#endif
-
-
-static Bool
-linearVidMem()
-{
-#ifdef SVR4
-	return TRUE;
-#elif defined(HAS_SVR3_MMAPDRV)
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-		    "# xf86LinearVidMem: MMAP 2.2.2 called\n");
-
-	if(mmapFd >= 0) return TRUE;
-
-	if ((mmapFd = open("/dev/mmap", O_RDWR)) != -1)
-	{
-	    if(ioctl(mmapFd, GETVERSION) < 0x0222) {
-		xf86Msg(X_WARNING,
-			"xf86LinearVidMem: MMAP 2.2.2 or above required\n");
-		xf86ErrorF("\tlinear memory access disabled\n");
-		return FALSE;
-	    }
-	    return TRUE;
-	}
-	xf86Msg(X_WARNING, "xf86LinearVidMem: failed to open /dev/mmap (%s)\n",
-	        strerror(errno));
-	xf86ErrorF("\tlinear memory access disabled\n");
-	return FALSE;
-#endif
-}
-
-static pointer
-mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
-{
-	pointer base;
-	int fd;
-
-#if defined(SVR4)
-	fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
-	if (fd < 0)
-	{
-		FatalError("xf86MapVidMem: failed to open %s (%s)\n",
-			   DEV_MEM, strerror(errno));
-	}
-	base = mmap((caddr_t)0, Size,
-		    (flags & VIDMEM_READONLY) ?
-		     PROT_READ : (PROT_READ | PROT_WRITE),
-		    MAP_SHARED, fd, (off_t)Base);
-	close(fd);
-	if (base == MAP_FAILED)
-	{
-		FatalError("%s: Could not mmap framebuffer [s=%x,a=%x] (%s)\n",
-			   "xf86MapVidMem", Size, Base, strerror(errno));
-	}
-#else /* SVR4 */
-#ifdef HAS_SVR3_MMAPDRV
-
-	xf86MsgVerb(X_INFO, MMAP_DEBUG, "# xf86MapVidMem: MMAP 2.2.2 called\n");
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"MMAP_VERSION: 0x%x\n",ioctl(mmapFd, GETVERSION));
-	if (ioctl(mmapFd, GETVERSION) == -1)
-	{
-		xf86LinearVidMem();
-	}
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"MMAP_VERSION: 0x%x\n",ioctl(mmapFd, GETVERSION));
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-		"xf86MapVidMem: Screen: %d\n", ScreenNum);
-	mmapStat(Base,Size);
-	/* To force the MMAP driver to provide the address */
-	base = (pointer)0;
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"xf86MapVidMem: [s=%x,a=%x]\n", Size, Base);
-	MapDSC.vaddr    = (char *)base;
-	MapDSC.physaddr = (char *)Base;
-	MapDSC.length   = Size;
-	MapDSC.ioflg    = 1;
-	if(mmapFd >= 0)
-	{
-	    if((base = (pointer)ioctl(mmapFd, MAP, &MapDSC)) == (pointer)-1)
-	    {
-		FatalError("%s: Could not mmap framebuffer [s=%x,a=%x] (%s)\n",
-			   "xf86MapVidMem", Size, Base, strerror(errno));
-		/* NOTREACHED */
-	    }
-
-	    /* Next time we want the same address! */
-	    MapDSC.vaddr    = (char *)base;
-	}
-
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"MapDSC.vaddr   : 0x%x\n", MapDSC.vaddr);
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"MapDSC.physaddr: 0x%x\n", MapDSC.physaddr);
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"MapDSC.length  : %d\n", MapDSC.length);
-	mmapStat(Base,Size);
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"xf86MapVidMem: [s=%x,a=%x,b=%x]\n", Size, Base, base);
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-			"xf86MapVidMem: SUCCEED Mapping FrameBuffer \n");
-#endif /* HAS_SVR3_MMAPDRV */
-#endif /* SVR4 */
-	return base;
-}
-
-/* ARGSUSED */
-static void
-unmapVidMem(int ScreenNum, pointer Base, unsigned long Size)
-{
-#if defined (SVR4)
-	munmap(Base, Size);
-#else /* SVR4 */
-#ifdef HAS_SVR3_MMAPDRV
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-	        "# xf86UnMapVidMem: UNMapping FrameBuffer\n");
-	mmapStat(Base,Size);
-	ioctl(mmapFd, UNMAPRM , Base);
-	mmapStat(Base,Size);
-	xf86MsgVerb(X_INFO, MMAP_DEBUG,
-		"# xf86UnMapVidMem: Screen: %d [v=%x]\n", ScreenNum, Base);
-#endif /* HAS_SVR3_MMAPDRV */
-#endif /* SVR4 */
-	return;
-}
-
-#if defined(SVR4) && defined(__i386__) && !defined(sun)
-/*
- * For some SVR4 versions, a 32-bit read is done for the first location
- * in each page when the page is first mapped.  If this is done while
- * memory access is enabled for regions that have read side-effects,
- * this can cause unexpected results, including lockups on some hardware.
- * This function is called to make sure each page is mapped while it is
- * safe to do so.
- */
-
-/*
- * XXX Should get this the correct way (see os/xalloc.c), but since this is
- * for one platform I'll be lazy.
- */
-#define X_PAGE_SIZE 4096
-
-static void
-readSideEffects(int ScreenNum, pointer Base, unsigned long Size)
-{
-	unsigned long base, end, addr;
-	CARD32 val;
-
-	base = (unsigned long)Base;
-	end = base + Size;
-
-	for (addr = base; addr < end; addr += X_PAGE_SIZE)
-		val = *(volatile CARD32 *)addr;
-}
-#endif
-
-void
-xf86OSInitVidMem(VidMemInfoPtr pVidMem)
-{
-	pVidMem->linearSupported = linearVidMem();
-	pVidMem->mapMem = mapVidMem;
-	pVidMem->unmapMem = unmapVidMem;
-#if defined(SVR4) && defined(__i386__) && !defined(sun)
-	pVidMem->readSideEffects = readSideEffects;
-#endif
-	pVidMem->initialised = TRUE;
-}
-	
-/***************************************************************************/
-/* I/O Permissions section                                                 */
-/***************************************************************************/
-
-static Bool ExtendedEnabled = FALSE;
-static Bool InitDone = FALSE;
-
-Bool
-xf86EnableIO()
-{
-	int i;
-
-	if (ExtendedEnabled)
-		return TRUE;
-
-	if (SET_IOPL() < 0)
-	{
-	    xf86Msg(X_WARNING,
-			"xf86EnableIO: Failed to set IOPL for extended I/O\n");
-	    return FALSE;
-	}
-	ExtendedEnabled = TRUE;
-
-	return TRUE;
-}
-	
-void
-xf86DisableIO()
-{
-	if (!ExtendedEnabled)
-		return;
-
-	RESET_IOPL();
-	ExtendedEnabled = FALSE;
-
-	return;
-}
commit 01159ffc4718ba48ab7b16acaffd8008f9803811
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 10 18:14:49 2010 -0400

    linux: Remove redundant variable
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 7ee9046..9b50ccd 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -39,7 +39,6 @@
 #include <sys/stat.h>
 
 static Bool KeepTty = FALSE;
-static int VTnum = -1;
 static Bool VTSwitch = TRUE;
 static Bool ShareVTs = FALSE;
 static int activeVT = -1;
@@ -112,8 +111,7 @@ xf86OpenConsole(void)
 	/*
 	 * setup the virtual terminal manager
 	 */
-	if (VTnum != -1) {
-	    xf86Info.vtno = VTnum;
+	if (xf86Info.vtno != -1) {
 	    from = X_CMDLINE;
 	} else {
 
@@ -382,10 +380,10 @@ xf86ProcessArgument(int argc, char *argv[], int i)
         }
 	if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
 	{
-		if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
+		if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0)
 		{
 			UseMsg();
-			VTnum = -1;
+			xf86Info.vtno = -1;
 			return 0;
 		}
 		return 1;
commit a80780a7638f847c3be20e5e0c7fe85e83d9bdd1
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Nov 17 09:03:06 2010 -0500

    glx: Remove swap barrier and hyperpipe support
    
    Never implemented in any open source driver.  The implementation
    assumed explicit DDX driver knowledge of how the client-side driver
    worked, since at the time the server's GL renderer was not a DRI driver.
    But now, it is, so any implementation of these should be done with
    additional DRI driver API, like the swap control extension.
    
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/Makefile.am b/glx/Makefile.am
index 9d9fa3c..d708872 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -68,7 +68,6 @@ libglx_la_SOURCES = \
 	indirect_program.c \
 	indirect_table.h \
 	indirect_texture_compression.c \
-        g_disptab.h \
         glxbyteorder.h \
         glxcmds.c \
         glxcmdsswap.c \
diff --git a/glx/g_disptab.h b/glx/g_disptab.h
deleted file mode 100644
index 9b4308b..0000000
--- a/glx/g_disptab.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _GLX_g_disptab_h_
-#define _GLX_g_disptab_h_
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, 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
- * 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 including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * 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 NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. 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.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-extern int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-
-extern int __glXDispSwap_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-
-#endif /* _GLX_g_disptab_h_ */
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 8d13c15..de9c3f0 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -38,7 +38,6 @@
 #include "glxserver.h"
 #include <GL/glxtokens.h>
 #include <unpack.h>
-#include "g_disptab.h"
 #include <pixmapstr.h>
 #include <windowstr.h>
 #include "glxutil.h"
@@ -2061,238 +2060,6 @@ int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc)
     }
 }
 
-extern RESTYPE __glXSwapBarrierRes;
-
-int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc;
-    XID drawable = req->drawable;
-    int barrier = req->barrier;
-    DrawablePtr pDraw;
-    int screen, rc;
-    __GLXscreen *pGlxScreen;
-
-    rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixGetAttrAccess);
-    pGlxScreen = glxGetScreen(pDraw->pScreen);
-    if (rc == Success && (pDraw->type == DRAWABLE_WINDOW)) {
-	screen = pDraw->pScreen->myNum;
-        if (pGlxScreen->swapBarrierFuncs) {
-            int ret = pGlxScreen->swapBarrierFuncs->bindSwapBarrierFunc(screen, drawable, barrier);
-            if (ret == Success) {
-                if (barrier)
-                    /* add source for cleanup when drawable is gone */
-                    AddResource(drawable, __glXSwapBarrierRes, (pointer)(intptr_t)screen);
-                else
-                    /* delete source */
-                    FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE);
-            }
-            return ret;
-        }
-    }
-    client->errorValue = drawable;
-    return __glXError(GLXBadDrawable);
-}
-
-
-int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryMaxSwapBarriersSGIXReq *req =
-                                    (xGLXQueryMaxSwapBarriersSGIXReq *) pc;
-    xGLXQueryMaxSwapBarriersSGIXReply reply;
-    int screen = req->screen;
-    __GLXscreen *pGlxScreen;
-
-    pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-    if (pGlxScreen->swapBarrierFuncs)
-        reply.max = pGlxScreen->swapBarrierFuncs->queryMaxSwapBarriersFunc(screen);
-    else
-        reply.max = 0;
-
-
-    reply.length = 0;
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-    }
-
-    WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
-                        (char *) &reply);
-    return Success;
-}
-
-#define GLX_BAD_HYPERPIPE_SGIX 92
-
-int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryHyperpipeNetworkSGIXReq * req = (xGLXQueryHyperpipeNetworkSGIXReq *) pc;
-    xGLXQueryHyperpipeNetworkSGIXReply reply;
-    int screen = req->screen;
-    void *rdata = NULL;
-
-    int length=0;
-    int npipes=0;
-
-    int n= 0;
-    __GLXscreen *pGlxScreen;
-
-    pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-    if (pGlxScreen->hyperpipeFuncs) {
-        rdata =
-            (pGlxScreen->hyperpipeFuncs->queryHyperpipeNetworkFunc(screen, &npipes, &n));
-    }
-    length = __GLX_PAD(n) >> 2;
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-    reply.length = length;
-    reply.n = n;
-    reply.npipes = npipes;
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-        __GLX_SWAP_INT(&reply.length);
-        __GLX_SWAP_INT(&reply.n);
-        __GLX_SWAP_INT(&reply.npipes);
-    }
-    WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply,
-                  (char *) &reply);
-
-    WriteToClient(client, length << 2, (char *)rdata);
-
-    return Success;
-}
-
-int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXDestroyHyperpipeConfigSGIXReq * req =
-        (xGLXDestroyHyperpipeConfigSGIXReq *) pc;
-    xGLXDestroyHyperpipeConfigSGIXReply reply;
-    int screen = req->screen;
-    int  success = GLX_BAD_HYPERPIPE_SGIX;
-    int hpId ;
-    __GLXscreen *pGlxScreen;
-
-    hpId = req->hpId;
-
-    pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-    if (pGlxScreen->hyperpipeFuncs) {
-        success = pGlxScreen->hyperpipeFuncs->destroyHyperpipeConfigFunc(screen, hpId);
-    }
-
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-    reply.length = __GLX_PAD(0) >> 2;
-    reply.n = 0;
-    reply.success = success;
-
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-    }
-    WriteToClient(client,
-                  sz_xGLXDestroyHyperpipeConfigSGIXReply,
-                  (char *) &reply);
-    return Success;
-}
-
-int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXQueryHyperpipeConfigSGIXReq * req =
-        (xGLXQueryHyperpipeConfigSGIXReq *) pc;
-    xGLXQueryHyperpipeConfigSGIXReply reply;
-    int screen = req->screen;
-    void *rdata = NULL;
-    int length;
-    int npipes=0;
-    int n= 0;
-    int hpId;
-    __GLXscreen *pGlxScreen;
-
-    hpId = req->hpId;
-
-    pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-    if (pGlxScreen->hyperpipeFuncs) {
-        rdata = pGlxScreen->hyperpipeFuncs->queryHyperpipeConfigFunc(screen, hpId,&npipes, &n);
-    }
-
-    length = __GLX_PAD(n) >> 2;
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-    reply.length = length;
-    reply.n = n;
-    reply.npipes = npipes;
-
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-        __GLX_SWAP_INT(&reply.length);
-        __GLX_SWAP_INT(&reply.n);
-        __GLX_SWAP_INT(&reply.npipes);
-    }
-
-    WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply,
-                  (char *) &reply);
-
-    WriteToClient(client, length << 2, (char *)rdata);
-
-    return Success;
-}
-
-int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
-{
-    ClientPtr client = cl->client;
-    xGLXHyperpipeConfigSGIXReq * req =
-        (xGLXHyperpipeConfigSGIXReq *) pc;
-    xGLXHyperpipeConfigSGIXReply reply;
-    int screen = req->screen;
-    void *rdata;
-
-    int npipes=0, networkId;
-    int hpId=-1;
-    __GLXscreen *pGlxScreen;
-
-    pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-    networkId = (int)req->networkId;
-    npipes = (int)req->npipes;
-    rdata = (void *)(req +1);
-
-    if (pGlxScreen->hyperpipeFuncs) {
-        pGlxScreen->hyperpipeFuncs->hyperpipeConfigFunc(screen,networkId,
-                                                        &hpId, &npipes,
-                                                        (void *) rdata);
-    }
-
-    reply.type = X_Reply;
-    reply.sequenceNumber = client->sequence;
-    reply.length = __GLX_PAD(0) >> 2;
-    reply.n = 0;
-    reply.npipes = npipes;
-    reply.hpId = hpId;
-
-    if (client->swapped) {
-        __GLX_DECLARE_SWAP_VARIABLES;
-        __GLX_SWAP_SHORT(&reply.sequenceNumber);
-        __GLX_SWAP_INT(&reply.npipes);
-        __GLX_SWAP_INT(&reply.hpId);
-    }
-
-    WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply,
-                  (char *) &reply);
-
-    return Success;
-}
-
-
 /************************************************************************/
 
 /*
diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
index c414dc8..ce4d69a 100644
--- a/glx/glxcmdsswap.c
+++ b/glx/glxcmdsswap.c
@@ -37,7 +37,6 @@
 #include "glxutil.h"
 #include <GL/glxtokens.h>
 #include <unpack.h>
-#include "g_disptab.h"
 #include <pixmapstr.h>
 #include <windowstr.h>
 #include "glxext.h"
diff --git a/glx/glxdri.c b/glx/glxdri.c
index db3fcd5..7717fcf 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -56,7 +56,6 @@
 #include "glxutil.h"
 #include "glxdricommon.h"
 
-#include "g_disptab.h"
 #include "glapitable.h"
 #include "glapi.h"
 #include "glthread.h"
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 0b69201..1111183 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -48,7 +48,6 @@
 #include "glxutil.h"
 #include "glxdricommon.h"
 
-#include "g_disptab.h"
 #include "glapitable.h"
 #include "glapi.h"
 #include "glthread.h"
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index dc12f57..08ea338 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -48,7 +48,6 @@
 #include "glxutil.h"
 #include "glxdricommon.h"
 
-#include "g_disptab.h"
 #include "glapitable.h"
 #include "glapi.h"
 #include "glthread.h"
diff --git a/glx/glxext.c b/glx/glxext.c
index f5ebe4f..4bd5d6b 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -39,7 +39,6 @@
 #include <registry.h>
 #include "privates.h"
 #include <os.h>
-#include "g_disptab.h"
 #include "unpack.h"
 #include "glxutil.h"
 #include "glxext.h"
@@ -58,7 +57,6 @@ __GLXcontext *__glXContextList;
 */
 RESTYPE __glXContextRes;
 RESTYPE __glXDrawableRes;
-RESTYPE __glXSwapBarrierRes;
 
 /*
 ** Reply for most singles.
@@ -228,19 +226,6 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
     return GL_TRUE;
 }
 
-extern RESTYPE __glXSwapBarrierRes;
-
-static int SwapBarrierGone(int screen, XID drawable)
-{
-    __GLXscreen *pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-
-    if (pGlxScreen->swapBarrierFuncs) {
-        pGlxScreen->swapBarrierFuncs->bindSwapBarrierFunc(screen, drawable, 0);
-    }
-    FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE);
-    return True;
-}
-
 /************************************************************************/
 
 /*
@@ -358,9 +343,7 @@ void GlxExtensionInit(void)
 					    "GLXContext");
     __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone,
 					     "GLXDrawable");
-    __glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone,
-						"GLXSwapBarrier");
-    if (!__glXContextRes || !__glXDrawableRes || !__glXSwapBarrierRes)
+    if (!__glXContextRes || !__glXDrawableRes)
 	return;
 
     if (!dixRegisterPrivateKey(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (__GLXclientState)))
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 8515e14..496cf9e 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -175,8 +175,6 @@ static char GLXServerExtensions[] =
 			"GLX_SGI_make_current_read "
 #ifndef __APPLE__
 			"GLX_SGIS_multisample "
-                        "GLX_SGIX_hyperpipe "
-                        "GLX_SGIX_swap_barrier "
 #endif
 			"GLX_SGIX_fbconfig "
 			"GLX_SGIX_pbuffer "
@@ -184,31 +182,6 @@ static char GLXServerExtensions[] =
                         "GLX_INTEL_swap_event"
 			;
 
-/*
- * If your DDX driver wants to register support for swap barriers or hyperpipe
- * topology, it should call __glXHyperpipeInit() or __glXSwapBarrierInit()
- * with a dispatch table of functions to handle the requests.   In the XFree86
- * DDX, for example, you would call these near the bottom of the driver's
- * ScreenInit method, after DRI has been initialized.
- *
- * This should be replaced with a better method when we teach the server how
- * to load DRI drivers.
- */
-
-void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs)
-{
-    __GLXscreen *pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-
-    pGlxScreen->hyperpipeFuncs = funcs;
-}
-
-void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs)
-{
-    __GLXscreen *pGlxScreen = glxGetScreen(screenInfo.screens[screen]);
-
-    pGlxScreen->swapBarrierFuncs = funcs;
-}
-
 static Bool
 glxCloseScreen (int index, ScreenPtr pScreen)
 {
diff --git a/glx/glxscreens.h b/glx/glxscreens.h
index 861e03c..93b4109 100644
--- a/glx/glxscreens.h
+++ b/glx/glxscreens.h
@@ -35,21 +35,6 @@
  * Silicon Graphics, Inc.
  */
 
-typedef struct {
-    void * (* queryHyperpipeNetworkFunc)(int, int *, int *);
-    void * (* queryHyperpipeConfigFunc)(int, int, int *, int *);
-    int    (* destroyHyperpipeConfigFunc)(int, int);
-    void * (* hyperpipeConfigFunc)(int, int, int *, int *, void *);
-} __GLXHyperpipeExtensionFuncs;
-
-typedef struct {
-    int    (* bindSwapBarrierFunc)(int, XID, int);
-    int    (* queryMaxSwapBarriersFunc)(int);
-} __GLXSwapBarrierExtensionFuncs;
-
-void __glXHyperpipeInit(int screen, __GLXHyperpipeExtensionFuncs *funcs);
-void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs);
-
 typedef struct __GLXconfig __GLXconfig;
 struct __GLXconfig {
     __GLXconfig *next;
@@ -144,9 +129,6 @@ struct __GLXscreen {
     int            (*swapInterval)  (__GLXdrawable *drawable,
 				     int interval);
 
-    __GLXHyperpipeExtensionFuncs *hyperpipeFuncs;
-    __GLXSwapBarrierExtensionFuncs *swapBarrierFuncs;
-
     ScreenPtr pScreen;
 
     /* Linked list of valid fbconfigs for this screen. */
diff --git a/glx/indirect_table.c b/glx/indirect_table.c
index cb32026..01d1da3 100644
--- a/glx/indirect_table.c
+++ b/glx/indirect_table.c
@@ -30,7 +30,6 @@
 #include "glxext.h"
 #include "indirect_dispatch.h"
 #include "indirect_reqsize.h"
-#include "g_disptab.h"
 #include "indirect_table.h"
 
 /*****************************************************************/
diff --git a/glx/xfont.c b/glx/xfont.c
index b4081cf..9943784 100644
--- a/glx/xfont.c
+++ b/glx/xfont.c
@@ -35,7 +35,6 @@
 #include "glxserver.h"
 #include "glxutil.h"
 #include "unpack.h"
-#include "g_disptab.h"
 #include "glapitable.h"
 #include "glapi.h"
 #include "glthread.h"
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 58f78fb..bdc7c3d 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -586,8 +586,6 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) {
     screen->base.createContext  = __glXAquaScreenCreateContext;
     screen->base.createDrawable = __glXAquaScreenCreateDrawable;
     screen->base.swapInterval = /*FIXME*/ NULL;
-    screen->base.hyperpipeFuncs = NULL;
-    screen->base.swapBarrierFuncs = NULL;
     screen->base.pScreen       = pScreen;
     
     screen->base.fbconfigs = __glXAquaCreateVisualConfigs(&screen->base.numFBConfigs, pScreen->myNum);
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 5d7391d..c9831f3 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -649,8 +649,6 @@ glxWinScreenProbe(ScreenPtr pScreen)
       screen->base.createContext = glxWinCreateContext;
       screen->base.createDrawable = glxWinCreateDrawable;
       screen->base.swapInterval = glxWinScreenSwapInterval;
-      screen->base.hyperpipeFuncs = NULL;
-      screen->base.swapBarrierFuncs = NULL;
       screen->base.pScreen = pScreen;
 
       if (strstr(wgl_extensions, "WGL_ARB_pixel_format"))


More information about the xorg-commit mailing list