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

xserver-xorg-video-vmware: Changes to 'upstream-unstable'



 README                  |    6 
 configure.ac            |    2 
 man/vmware.man          |    3 
 src/Makefile.am         |    4 
 src/offscreen_manager.c |  136 -----------
 src/offscreen_manager.h |   25 --
 src/svga_modes.h        |   48 +++
 src/vmware.c            |  135 ++++-------
 src/vmware.h            |   37 ---
 src/vmwarectrl.c        |   31 +-
 src/vmwarexaa.c         |  589 ------------------------------------------------
 11 files changed, 137 insertions(+), 879 deletions(-)

New commits:
commit 0c76b95e7aeac034cc598ea6a407187f76466411
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Fri Feb 9 15:06:17 2007 -0800

    Add svga_modes.h to Makefile.am

diff --git a/src/Makefile.am b/src/Makefile.am
index 97ab86e..d6000fc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,6 +34,7 @@ vmware_drv_la_SOURCES = \
          guest_os.h \
          includeCheck.h \
          svga_limits.h \
+         svga_modes.h \
          svga_reg.h \
          svga_struct.h \
          vm_basic_types.h \

commit a283c62c1db9e25ba11c6d72e4d00e0d911d64a2
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Fri Feb 9 11:09:17 2007 -0800

    Filter out default modes that are larger than the hardware
    maxmimum size and add an explicit mode for the hardware
    maximum.

diff --git a/src/vmware.c b/src/vmware.c
index dabf352..e02e2fa 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -1584,11 +1584,18 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       unsigned int numModes = sizeof (VMWAREDefaultModes) / sizeof *(VMWAREDefaultModes);
       char name[10];
       for (i = 0; i < numModes; i++) {
-         snprintf(name, 10, "%dx%d",
-                  VMWAREDefaultModes[i].width, VMWAREDefaultModes[i].height);
-         VMWAREAddDisplayMode(pScrn, name, VMWAREDefaultModes[i].width,
-                              VMWAREDefaultModes[i].height);
+         const VMWAREDefaultMode *mode = &VMWAREDefaultModes[i];
+
+         /* Only modes that fit the hardware maximums should be added. */
+         if (mode->width <= pVMWARE->maxWidth && mode->height <= pVMWARE->maxHeight) {
+            snprintf(name, 10, "%dx%d", mode->width, mode->height);
+            VMWAREAddDisplayMode(pScrn, name, mode->width, mode->height);
+         }
       }
+
+      /* Add the hardware maximums as a mode. */
+      snprintf(name, 10, "%dx%d", pVMWARE->maxWidth, pVMWARE->maxHeight);
+      VMWAREAddDisplayMode(pScrn, name, pVMWARE->maxWidth, pVMWARE->maxHeight);
    }
 
     /*

commit f4540555dc8c823dfec53dddeb82e2b7b0dbfe3d
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Fri Feb 9 10:00:32 2007 -0800

    Correct the incorrect 1080p resolution.
    
    Should be 1920x1080 and not 1900x1080. Whoops.

diff --git a/src/svga_modes.h b/src/svga_modes.h
index fb5dbe1..97d869e 100644
--- a/src/svga_modes.h
+++ b/src/svga_modes.h
@@ -27,7 +27,7 @@
    SVGA_DEFAULT_MODE( 854,  480) \
    SVGA_DEFAULT_MODE(1280,  720) \
    SVGA_DEFAULT_MODE(1366,  768) \
-   SVGA_DEFAULT_MODE(1900, 1080) \
+   SVGA_DEFAULT_MODE(1920, 1080) \
    /* 16:10 modes */ \
    SVGA_DEFAULT_MODE(1280,  800) \
    SVGA_DEFAULT_MODE(1440,  900) \

commit eca6e9f9458440feebd6598aee24f02a3fd7a75f
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Thu Feb 8 18:22:16 2007 -0800

    Bump version to 10.15.0
    
    This release adds truely usable resizing support by
    removing the restriction that the you cannot resize
    larger than the initial mode.

diff --git a/README b/README
index 883d311..564d57b 100644
--- a/README
+++ b/README
@@ -20,6 +20,9 @@ svga_limits.h
     Included by svga_reg.h, defines maximum frame buffer and memory region
     sizes.
 
+svga_modes.h
+    A list of default display modes that are built into the driver.
+
 guest_os.h
     Values for the GUEST_ID register.
 
@@ -29,6 +32,9 @@ vm_basic_types.h
 vm_device_version.h
     PCI vendor ID's and related information.
 
+vmwarectrl.h
+vmwarectrlproto.h
+    The definitions of the VMWARECTRL protocol extension.
 
 Programming the VMware SVGA Device
 ----------------------------------
diff --git a/configure.ac b/configure.ac
index e68952d..725555b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-vmware],
-        10.14.1,
+        10.15.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-vmware)
 
diff --git a/src/vmware.c b/src/vmware.c
index ea3f117..dabf352 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -82,8 +82,8 @@ char rcsId_vmware[] =
 #define VMWARE_NAME "VMWARE"
 #define VMWARE_DRIVER_NAME "vmware"
 #define VMWARE_MAJOR_VERSION	10
-#define VMWARE_MINOR_VERSION	14
-#define VMWARE_PATCHLEVEL	1
+#define VMWARE_MINOR_VERSION	15
+#define VMWARE_PATCHLEVEL	0
 #define VMWARE_DRIVER_VERSION \
    (VMWARE_MAJOR_VERSION * 65536 + VMWARE_MINOR_VERSION * 256 + VMWARE_PATCHLEVEL)
 

commit 2ec8c25cc935a318bd07c0d1fba9960dfe8f38d4
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Thu Feb 8 18:07:19 2007 -0800

    Fix a race condition when switching to a multihead fullscreen mode.
    
    Due to implemtation details on the host side, switching to a multihead
    fullscreen mode means multiple mode changes along the way. However,
    because rrSetScreenConfig returns before the mode change completes,
    we can enter a race, where a subsequent SetDisplayTopology overrides
    the current pending one, leading to a mode switch where the resolution
    and topology are no longer consistent.
    
    So, we fix this by ignoring any attempts to set the pending topology if
    one is already pending.

diff --git a/src/vmwarectrl.c b/src/vmwarectrl.c
index f2c831d..dc9e91f 100644
--- a/src/vmwarectrl.c
+++ b/src/vmwarectrl.c
@@ -229,7 +229,8 @@ VMwareCtrlSetRes(ClientPtr client)
  * VMwareCtrlDoSetTopology --
  *
  *      Set the custom topology and set a dynamic mode to the bounding box
- *      of the passed topology.
+ *      of the passed topology. If a topology is already pending, then do
+ *      nothing but do not return failure.
  *
  * Results:
  *      TRUE on success, FALSE otherwise.
@@ -254,6 +255,11 @@ VMwareCtrlDoSetTopology(ScrnInfoPtr pScrn,
       short maxY = 0;
       size_t i;
 
+      if (pVMWARE->xineramaNextState) {
+         VmwareLog(("DoSetTopology: Aborting due to existing pending state\n"));
+         return TRUE;
+      }
+
       for (i = 0; i < number; i++) {
          maxX = MAX(maxX, extents[i].x_org + extents[i].width);
          maxY = MAX(maxY, extents[i].y_org + extents[i].height);

commit a8afe781e108773e4a575ecc3330a5aa83c1cbb9
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Thu Feb 8 17:08:08 2007 -0800

        Add a bunch of useful modes to the mode list.
    
        The X server prunes modes above the initial mode and
        the number of default modes varies with distro and
        server version. As it's easy to do, let's add a bunch
        of useful versions in the driver so that users don't
        have to mess with their config files as often.

diff --git a/src/svga_modes.h b/src/svga_modes.h
new file mode 100644
index 0000000..fb5dbe1
--- /dev/null
+++ b/src/svga_modes.h
@@ -0,0 +1,48 @@
+/* **********************************************************
+ * Copyright (C) 2007 VMware, Inc. All Rights Reserved
+ * **********************************************************/
+
+#ifndef _SVGA_MODES_H_
+#define _SVGA_MODES_H_
+
+#define INCLUDE_ALLOW_USERLEVEL
+#include "includeCheck.h"
+
+#define SVGA_DEFAULT_MODES \
+   /* 4:3 modes */ \
+   SVGA_DEFAULT_MODE( 320,  240) \
+   SVGA_DEFAULT_MODE( 400,  300) \
+   SVGA_DEFAULT_MODE( 512,  384) \
+   SVGA_DEFAULT_MODE( 640,  480) \
+   SVGA_DEFAULT_MODE( 800,  600) \
+   SVGA_DEFAULT_MODE(1024,  768) \
+   SVGA_DEFAULT_MODE(1152,  864) \
+   SVGA_DEFAULT_MODE(1280,  960) \
+   SVGA_DEFAULT_MODE(1400, 1050) \
+   SVGA_DEFAULT_MODE(1600, 1200) \
+   SVGA_DEFAULT_MODE(1920, 1440) \
+   SVGA_DEFAULT_MODE(2048, 1536) \
+   SVGA_DEFAULT_MODE(2560, 1920) \
+   /* 16:9 modes */ \
+   SVGA_DEFAULT_MODE( 854,  480) \
+   SVGA_DEFAULT_MODE(1280,  720) \
+   SVGA_DEFAULT_MODE(1366,  768) \
+   SVGA_DEFAULT_MODE(1900, 1080) \
+   /* 16:10 modes */ \
+   SVGA_DEFAULT_MODE(1280,  800) \
+   SVGA_DEFAULT_MODE(1440,  900) \
+   SVGA_DEFAULT_MODE(1680, 1050) \
+   SVGA_DEFAULT_MODE(1920, 1200) \
+   SVGA_DEFAULT_MODE(2560, 1600) \
+   /* DVD modes */ \
+   SVGA_DEFAULT_MODE( 720, 480) \
+   SVGA_DEFAULT_MODE( 720, 576) \
+   /* Odd modes */ \
+   SVGA_DEFAULT_MODE( 320,  200) \
+   SVGA_DEFAULT_MODE( 640,  400) \
+   SVGA_DEFAULT_MODE( 800,  480) \
+   SVGA_DEFAULT_MODE(1280,  768) \
+   SVGA_DEFAULT_MODE(1280, 1024)
+
+
+#endif /* _SVGA_MODES_H_ */
diff --git a/src/vmware.c b/src/vmware.c
index 576530c..ea3f117 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -37,6 +37,7 @@ char rcsId_vmware[] =
 #include "vmware.h"
 #include "guest_os.h"
 #include "vm_device_version.h"
+#include "svga_modes.h"
 
 #ifdef HaveDriverFuncs
 #define VMWARE_DRIVER_FUNC HaveDriverFuncs
@@ -175,6 +176,21 @@ static const OptionInfoRec VMWAREOptions[] = {
     { -1,               NULL,           OPTV_NONE,      {0},    FALSE }
 };
 
+/* Table of default modes to always add to the mode list. */
+
+typedef struct {
+   int width;
+   int height;
+} VMWAREDefaultMode;
+
+#define SVGA_DEFAULT_MODE(width, height) { width, height, },
+
+static const VMWAREDefaultMode VMWAREDefaultModes[] = {
+   SVGA_DEFAULT_MODES
+};
+
+#undef SVGA_DEFAULT_MODE
+
 static void VMWAREStopFIFO(ScrnInfoPtr pScrn);
 static void VMWARESave(ScrnInfoPtr pScrn);
 
@@ -1560,6 +1576,22 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     }
 
     /*
+     * We explictly add a set of default modes because the X server will
+     * not include modes larger than the initial one.
+     */
+   {
+      unsigned int i;
+      unsigned int numModes = sizeof (VMWAREDefaultModes) / sizeof *(VMWAREDefaultModes);
+      char name[10];
+      for (i = 0; i < numModes; i++) {
+         snprintf(name, 10, "%dx%d",
+                  VMWAREDefaultModes[i].width, VMWAREDefaultModes[i].height);
+         VMWAREAddDisplayMode(pScrn, name, VMWAREDefaultModes[i].width,
+                              VMWAREDefaultModes[i].height);
+      }
+   }
+
+    /*
      * We will lazily add the dynamic modes as the are needed when new
      * modes are requested through the control extension.
      */

commit 520f570aa3869090eac3accf6a2b3886ab188590
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Thu Feb 8 13:44:57 2007 -0800

    Update man page to remove mention of the NoAccel option which
    no longer exists as we don't do any 'acceleration'.

diff --git a/man/vmware.man b/man/vmware.man
index 1092488..c487747 100644
--- a/man/vmware.man
+++ b/man/vmware.man
@@ -28,9 +28,6 @@ are supported:
 .BI "Option \*qHWCursor\*q \*q" boolean \*q
 Enable or disable the HW cursor.  Default: off.
 .TP
-.BI "Option \*qNoAccel\*q \*q" boolean \*q
-Disable or enable acceleration.  Default: acceleration is enabled.
-.TP
 .BI "Option \*qXinerama\*q \*q" boolean \*q
 Disable or enable Xinerama support. Default: xinerama is enabled if the
 hardware supports it.

commit af8c0596a224ba8436d55c5dd6063fff688c7ad1
Author: Philip Langdale <philipl@fido2.homeip.net>
Date:   Thu Feb 8 13:42:31 2007 -0800

    Remove XAA 'acceleration'.
    
    We have a lot of stale code to 'accelerate' certain operations
    through XAA. However, in practice, this acceleration is
    completely unhelpful because whenever we encounter an
    unaccelerated action, we have to sync and flush the fifo
    which kills any performance gain.
    
    As such, the virtual hardware doesn't even advertise these
    acceleration capabilities anymore, so the code is completely
    unusued.
    
    In addition, XAA is on the way out, so there's no point
    leaving in dead code which will have to go in the fairly
    near future.
    
    The one operation we can meaningfully accelerate is a
    front-only fill and when we get around to implementing
    that, we'll use EXA instead.

diff --git a/src/Makefile.am b/src/Makefile.am
index b7857b9..97ab86e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,8 +33,6 @@ vmware_drv_la_SOURCES = \
          bits2pixels.h \
          guest_os.h \
          includeCheck.h \
-         offscreen_manager.c \
-         offscreen_manager.h \
          svga_limits.h \
          svga_reg.h \
          svga_struct.h \
@@ -43,7 +41,6 @@ vmware_drv_la_SOURCES = \
          vmware.c \
          vmwarecurs.c \
          vmware.h \
-         vmwarexaa.c \
          vmwarectrl.c \
          vmwarectrl.h \
          vmwarectrlproto.h \
diff --git a/src/offscreen_manager.c b/src/offscreen_manager.c
deleted file mode 100644
index 10e2e59..0000000
--- a/src/offscreen_manager.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* **********************************************************
- * Copyright (C) 1998-2002 VMware, Inc.
- * All Rights Reserved
- * **********************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vmware/offscreen_manager.c,v 1.1 2002/12/10 04:17:19 dawes Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "vmware.h"
-
-struct _Heap {
-    CARD8* ptr;
-    CARD32 size;
-    CARD32 maxSlots;
-    CARD32 startOffset;
-    SVGASurface* frontBuffer;
-    SVGASurface* slotsStart;
-    Bool clear;
-};
-
-static SVGASurface* FillInSurface(Heap* heap, SVGASurface* surface,
-                                  CARD32 width, CARD32 height,
-                                  CARD32 bpp, CARD32 pitch, CARD32 size,
-                                  CARD32 sizeUsed);
-
-Heap*
-vmwareHeap_Create(CARD8* ptr, CARD32 size, CARD32 maxSlots, CARD32 startOffset,
-            CARD32 sWidth, CARD32 sHeight, CARD32 sBPP, CARD32 sPitch,
-            CARD32 sFbOffset)
-{
-    Heap* newHeap = malloc(sizeof (Heap));
-
-    newHeap->ptr = ptr;
-    newHeap->size = size - sizeof(SVGASurface); /* leave room for frontbuffer */
-    newHeap->maxSlots = maxSlots;
-    newHeap->startOffset = startOffset;
-
-    newHeap->frontBuffer = FillInSurface(newHeap,
-                                         (SVGASurface*)(ptr + newHeap->size),
-                                         sWidth, sHeight, sBPP, sPitch,
-                                         sHeight * sPitch, 0);
-    newHeap->frontBuffer->dataOffset = sFbOffset;
-    newHeap->frontBuffer->numQueued = newHeap->frontBuffer->numDequeued = 0;
-
-    newHeap->slotsStart = (SVGASurface*)(newHeap->ptr + newHeap->size) - 
-                                          newHeap->maxSlots;
-    newHeap->clear = FALSE;
-    vmwareHeap_Clear(newHeap);
-
-    return newHeap;
-}
-
-void
-vmwareHeap_Destroy(Heap* heap)
-{
-    free(heap);
-}
-
-void
-vmwareHeap_Clear(Heap* heap)
-{
-    if (!heap->clear) {
-        memset(heap->slotsStart, 0, heap->maxSlots * sizeof (SVGASurface));
-        heap->clear = TRUE;
-    }
-}
-
-static SVGASurface*
-FillInSurface(Heap* heap, SVGASurface* surface, CARD32 width, CARD32 height,
-              CARD32 bpp, CARD32 pitch, CARD32 size, CARD32 offset)
-{
-    surface->size = sizeof (SVGASurface);
-    surface->version = SVGA_SURFACE_VERSION_1;
-    surface->bpp = bpp;
-    surface->width = width;
-    surface->height = height;
-    surface->pitch = pitch;
-    if (surface->userData == 0) {
-        /*
-         * We allocate exactly what we need the first time we use a slot, so
-         * all reuses of this slot will be equal or smaller.
-         */
-        surface->userData = size;
-    }
-    surface->dataOffset = offset + heap->startOffset;
-
-    return surface;
-}
-
-SVGASurface*
-vmwareHeap_GetFrontBuffer(Heap* heap)
-{
-   return heap->frontBuffer;
-}
-
-SVGASurface*
-vmwareHeap_AllocSurface(Heap* heap, CARD32 width, CARD32 height,
-                  CARD32 pitch, CARD32 bpp)
-{
-    CARD32 size = pitch * height;
-    CARD32 sizeUsed = 0;
-    SVGASurface* surface = heap->slotsStart;
-    int i;
-
-    /*
-     * NOTE: we use SVGASurface::userData to store the largest this slot's
-     * size has ever been, since we don't ever compact anything.
-     */
-
-    /* find a free slot that's big enough */
-    for (i = 0; i < heap->maxSlots; i++) {
-        if (surface[i].userData == 0) { /* this surface has never been used */
-            if ((CARD8*)heap->slotsStart - heap->ptr - sizeUsed < size) {
-                /* no room left for data*/
-                return NULL;
-            }
-
-            heap->clear = FALSE;
-            return FillInSurface(heap, surface + i, width, height, bpp,
-                                 pitch, size, sizeUsed);
-        }
-
-        if (surface[i].numQueued == surface[i].numDequeued &&
-            surface[i].userData >= size) { /* free and big enough, sweet! */
-            heap->clear = FALSE;
-            return FillInSurface(heap, surface + i, width, height, bpp,
-                                 pitch, size, sizeUsed);
-        }
-
-        sizeUsed += surface[i].userData;
-    }
-
-    return NULL;   
-}
diff --git a/src/offscreen_manager.h b/src/offscreen_manager.h
deleted file mode 100644
index e948da9..0000000
--- a/src/offscreen_manager.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* **********************************************************
- * Copyright (C) 1998-2002 VMware, Inc.
- * All Rights Reserved
- * **********************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vmware/offscreen_manager.h,v 1.2 2002/12/11 17:07:58 dawes Exp $ */
-
-#ifndef OFFSCREEN_MANAGER_H
-#define OFFSCREEN_MANAGER_H
-
-struct _Heap;
-typedef struct _Heap Heap;
-
-extern Heap* vmwareHeap_Create(CARD8* ptr, CARD32 size, CARD32 maxSlots,
-                         CARD32 startOffset, CARD32 sWidth, CARD32 sHeight,
-                         CARD32 sBPP, CARD32 sPitch, CARD32 sFbOffset);
-extern void vmwareHeap_Destroy(Heap* heap);
-
-extern void vmwareHeap_Clear(Heap* heap);
-
-extern SVGASurface* vmwareHeap_GetFrontBuffer(Heap* heap);
-
-extern SVGASurface* vmwareHeap_AllocSurface(Heap* heap, CARD32 width, CARD32 height,
-                                      CARD32 pitch, CARD32 bpp);
-
-#endif
diff --git a/src/vmware.c b/src/vmware.c
index 9075326..576530c 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -164,14 +164,12 @@ static XF86ModuleVersionInfo vmwareVersRec = {
 
 typedef enum {
     OPTION_HW_CURSOR,
-    OPTION_NOACCEL,
     OPTION_XINERAMA,
     OPTION_STATIC_XINERAMA
 } VMWAREOpts;
 
 static const OptionInfoRec VMWAREOptions[] = {
     { OPTION_HW_CURSOR, "HWcursor",     OPTV_BOOLEAN,   {0},    FALSE },
-    { OPTION_NOACCEL,   "NoAccel",      OPTV_BOOLEAN,   {0},    FALSE },
     { OPTION_XINERAMA,  "Xinerama",     OPTV_BOOLEAN,   {0},    FALSE },
     { OPTION_STATIC_XINERAMA, "StaticXinerama", OPTV_STRING, {0}, FALSE },
     { -1,               NULL,           OPTV_NONE,      {0},    FALSE }
@@ -846,12 +844,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
     }
     xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n",
                pVMWARE->hwCursor ? "HW" : "SW");
-    if (xf86IsOptionSet(options, OPTION_NOACCEL)) {
-        pVMWARE->noAccel = TRUE;
-        xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");
-    } else {
-        pVMWARE->noAccel = FALSE;
-    }
     pScrn->videoRam = pVMWARE->videoRam / 1024;
     pScrn->memPhysBase = pVMWARE->memPhysBase;
 
@@ -943,14 +935,6 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
         xf86LoaderReqSymLists(ramdacSymbols, NULL);
     }
 
-    if (!pVMWARE->noAccel) {
-        if (!xf86LoadSubModule(pScrn, "xaa")) {
-            VMWAREFreeRec(pScrn);
-            return FALSE;
-        }
-        xf86LoaderReqSymLists(vmwareXaaSymbols, NULL);
-    }
-
     /* Initialise VMWARE_CTRL extension. */
     VMwareCtrl_ExtInit(pScrn);
 
@@ -1145,15 +1129,6 @@ VMWAREModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool rebuildPixmap)
      */
 
     /*
-     * Let XAA know about the mode change.
-     */
-    if (!pVMWARE->noAccel) {
-        if (!vmwareXAAModeInit(pScrn, mode)) {
-            return FALSE;
-        }
-    }
-
-    /*
      * Update Xinerama info appropriately.
      */
     if (pVMWARE->xinerama && !pVMWARE->xineramaStatic) {
@@ -1242,10 +1217,6 @@ VMWARECloseScreen(int scrnIndex, ScreenPtr pScreen)
             vmwareCursorCloseScreen(pScreen);
         }
 
-        if (pVMWARE->xaaInfo) {
-            vmwareXAACloseScreen(pScreen);
-        }
-
         VMWARERestore(pScrn);
         VMWAREUnmapMem(pScrn);
 
@@ -1550,17 +1521,6 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     }
 
     /*
-     * Initialize acceleration.
-     */
-    if (!pVMWARE->noAccel) {
-        if (!vmwareXAAScreenInit(pScreen)) {
-            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                       "XAA initialization failed -- running unaccelerated!\n");
-            pVMWARE->noAccel = TRUE;
-        }
-    }
-
-    /*
      * If backing store is to be supported (as is usually the case),
      * initialise it.
      */
@@ -1756,7 +1716,7 @@ vmwareSetup(pointer module, pointer opts, int *errmaj, int *errmin)
         xf86AddDriver(&VMWARE, module, VMWARE_DRIVER_FUNC);
 
         LoaderRefSymLists(vgahwSymbols, fbSymbols, ramdacSymbols,
-                          shadowfbSymbols, vmwareXaaSymbols, NULL);
+                          shadowfbSymbols, NULL);
 
         return (pointer)1;
     }
diff --git a/src/vmware.h b/src/vmware.h
index 159e374..960ce13 100644
--- a/src/vmware.h
+++ b/src/vmware.h
@@ -25,7 +25,6 @@
 
 #include "vgaHW.h"		/* VGA hardware */
 #include "fb.h"
-#include "xaa.h"
 
 #include "xf86cmap.h"		/* xf86HandleColormaps */
 
@@ -33,8 +32,6 @@
 #include "svga_reg.h"
 #include "svga_struct.h"
 
-#include "offscreen_manager.h"
-
 /* Arbitrarily choose max cursor dimensions.  The emulation doesn't care. */
 #define MAX_CURS        32
 
@@ -124,23 +121,6 @@ typedef struct {
     ScreenRec ScrnFuncs;
 
     /*
-     * XAA info rec and misc storage
-     */
-    XAAInfoRecPtr xaaInfo;
-    int xaaFGColor;
-    int xaaBGColor;
-    int xaaRop;
-
-    unsigned char* xaaColorExpScanLine[1];
-    unsigned int xaaColorExpSize; /* size of current scan line in DWords */
-
-    Heap* heap;
-    SVGASurface* frontBuffer;
-
-    SVGASurface* curPict;
-    int op;
-
-    /*
      * Xinerama state
      */
     Bool xinerama;
@@ -189,8 +169,6 @@ static __inline ScrnInfoPtr infoFromScreen(ScreenPtr s) {
 
 #define MOUSE_ID 1
 
-extern const char *vmwareXaaSymbols[];
-
 /*#define DEBUG_LOGGING*/
 #ifdef DEBUG_LOGGING
 # define VmwareLog(args) ErrorF args
@@ -255,19 +233,6 @@ void vmwareCursorHookWrappers(
    );
 
 
-/* vmwarexaa.c */
-Bool vmwareXAAScreenInit(
-   ScreenPtr pScreen
-   );
-
-Bool vmwareXAAModeInit(
-    ScrnInfoPtr pScrn, DisplayModePtr mode
-    );
-
-void vmwareXAACloseScreen(
-   ScreenPtr pScreen
-   );
-
 /* vmwarectrl.c */
 void VMwareCtrl_ExtInit(ScrnInfoPtr pScrn);
 
diff --git a/src/vmwarexaa.c b/src/vmwarexaa.c
deleted file mode 100644
index b0882c5..0000000
--- a/src/vmwarexaa.c
+++ /dev/null
@@ -1,589 +0,0 @@
-/* **********************************************************
- * Copyright (C) 1998-2001 VMware, Inc.
- * All Rights Reserved
- * **********************************************************/
-#ifdef VMX86_DEVEL
-char rcsId_vmwarexaa[] =
-    "Id: $";
-#endif
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/vmware/vmwarexaa.c,v 1.5 2003/02/04 01:39:53 dawes Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "vmware.h"
-
-#define OFFSCREEN_SCRATCH_SIZE 1*1024*1024
-/* We'll assume we average about 32x32 alpha surfaces (4096 bytes) or larger */
-#define OFFSCREEN_SCRATCH_MAX_SLOTS OFFSCREEN_SCRATCH_SIZE / 4096
-
-const char *vmwareXaaSymbols[] = {
-    "XAACreateInfoRec",
-    "XAADestroyInfoRec",
-    "XAAInit",
-    NULL
-};
-
-static void vmwareXAASync(ScrnInfoPtr pScrn);
-
-static void vmwareSetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
-                                    unsigned int planemask);
-static void vmwareSubsequentSolidFillRect(ScrnInfoPtr pScrn,
-                                          int x, int y, int w, int h);
-
-static void vmwareSetupForScreenToScreenCopy(ScrnInfoPtr pScrn,
-                                             int xdir, int ydir, int rop,
-                                             unsigned int planemask,
-                                             int trans_color);
-static void vmwareSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
-                                               int x1, int y1,
-                                               int x2, int y2,
-                                               int width, int height);
-
-static void vmwareSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-                                                             int fg, int bg,
-                                                             int rop,
-                                                             unsigned int planemask);
-static void vmwareSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
-                                                               int x, int y,
-                                                               int w, int h,
-                                                               int skipleft );
-static void vmwareSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
-
-#ifdef RENDER
-static Bool vmwareSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int op,
-                                                  CARD16 red, CARD16 green,
-                                                  CARD16 blue, CARD16 alpha,
-                                                  int alphaType, CARD8 *alphaPtr,
-                                                  int alphaPitch,
-                                                  int width, int height,
-                                                  int flags);
-
-static Bool vmwareSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op,
-                                             int texType, CARD8 *texPtr,
-                                             int texPitch,
-                                             int width, int height,
-                                             int flags);
-
-static void vmwareSubsequentCPUToScreenTexture(ScrnInfoPtr pScrn,
-                                               int dstx, int dsty,
-                                               int srcx, int srcy,
-                                               int width, int height);
-
-static void vmwareXAAEnableDisableFBAccess(int index, Bool enable);
-
-CARD32 vmwareAlphaTextureFormats[2] = {PICT_a8, 0};
-CARD32 vmwareTextureFormats[2] = {PICT_a8r8g8b8, 0};
-
-#endif
-
-#define SCRATCH_SIZE_BYTES(pvmware) \
-    (((OFFSCREEN_SCRATCH_SIZE + (pvmware)->fbPitch - 1) / \
-     (pvmware)->fbPitch) * (pvmware)->fbPitch)
-
-static void vmwareXAACreateHeap(ScreenPtr pScreen, ScrnInfoPtr pScrn,
-                                VMWAREPtr pVMWARE) {
-   int scratchSizeBytes = SCRATCH_SIZE_BYTES(pVMWARE);
-   CARD8* osPtr = pVMWARE->FbBase + pVMWARE->videoRam - scratchSizeBytes;
-
-   pVMWARE->heap = vmwareHeap_Create(osPtr,
-                                     scratchSizeBytes,
-                                     OFFSCREEN_SCRATCH_MAX_SLOTS,
-                                     pVMWARE->videoRam - scratchSizeBytes,
-                                     pScrn->virtualX,
-                                     pScrn->virtualY,
-                                     pVMWARE->bitsPerPixel,
-                                     pVMWARE->fbPitch,
-                                     pVMWARE->fbOffset);
-   pVMWARE->frontBuffer = vmwareHeap_GetFrontBuffer(pVMWARE->heap);
-}
-
-#define DESTROY_XAA_INFO(pVMWARE) \
-    if (pVMWARE->xaaInfo) { XAADestroyInfoRec(pVMWARE->xaaInfo); \
-    pVMWARE->xaaInfo = NULL; }
-
-Bool
-vmwareXAAScreenInit(ScreenPtr pScreen)
-{
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
-    XAAInfoRecPtr xaaInfo;
-        
-    pVMWARE->xaaInfo = XAACreateInfoRec();
-    if (!pVMWARE->xaaInfo) {
-        return FALSE;
-    }
-
-    xaaInfo = pVMWARE->xaaInfo;
-
-    xaaInfo->Sync = vmwareXAASync;
-
-    if (pVMWARE->vmwareCapability & SVGA_CAP_RECT_FILL) {
-        xaaInfo->SetupForSolidFill = vmwareSetupForSolidFill;
-        xaaInfo->SubsequentSolidFillRect = vmwareSubsequentSolidFillRect;
-
-        xaaInfo->SolidFillFlags = NO_PLANEMASK |
-            (pVMWARE->vmwareCapability & SVGA_CAP_RASTER_OP ? 0 : GXCOPY_ONLY);
-    }
-
-    if (pVMWARE->vmwareCapability & SVGA_CAP_RECT_COPY) {
-        xaaInfo->SetupForScreenToScreenCopy = vmwareSetupForScreenToScreenCopy;
-        xaaInfo->SubsequentScreenToScreenCopy =
-           vmwareSubsequentScreenToScreenCopy;
-
-        xaaInfo->ScreenToScreenCopyFlags = NO_TRANSPARENCY | NO_PLANEMASK |
-           (pVMWARE->vmwareCapability & SVGA_CAP_RASTER_OP ? 0 : GXCOPY_ONLY);
-    }
-
-    /*
-     * We don't support SVGA_CAP_GLYPH without clipping, since we use clipping
-     * for normal glyphs.
-     */
-    if (pVMWARE->vmwareCapability & SVGA_CAP_GLYPH_CLIPPING) {
-        xaaInfo->SetupForScanlineCPUToScreenColorExpandFill =
-           vmwareSetupForScanlineCPUToScreenColorExpandFill;
-        xaaInfo->SubsequentScanlineCPUToScreenColorExpandFill =
-           vmwareSubsequentScanlineCPUToScreenColorExpandFill;
-        xaaInfo->SubsequentColorExpandScanline =
-           vmwareSubsequentColorExpandScanline;
-
-        xaaInfo->NumScanlineColorExpandBuffers = 1;
-        xaaInfo->ScanlineColorExpandBuffers = pVMWARE->xaaColorExpScanLine;
-
-        xaaInfo->ScanlineCPUToScreenColorExpandFillFlags = GXCOPY_ONLY |
-           NO_PLANEMASK | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING;
-    }
-
-    if (pVMWARE->vmwareCapability & SVGA_CAP_OFFSCREEN_1) {
-        int scratchSizeBytes = SCRATCH_SIZE_BYTES(pVMWARE);
-        BoxRec box;
-        RegionRec region;
-
-        box.x1 = 0;
-        box.y1 = (pVMWARE->FbSize + pVMWARE->fbPitch - 1) / pVMWARE->fbPitch;
-        box.x2 = pScrn->displayWidth;
-        box.y2 = pVMWARE->videoRam / pVMWARE->fbPitch;
-
-#ifdef RENDER
-        if (pVMWARE->vmwareCapability & SVGA_CAP_ALPHA_BLEND &&
-            pScrn->bitsPerPixel > 8) {
-            if (box.y2 - (scratchSizeBytes / pVMWARE->fbPitch) > box.y1 + 4) {
-                box.y2 -= scratchSizeBytes / pVMWARE->fbPitch;
-
-                VmwareLog(("Allocated %d bytes at offset %d for alpha scratch\n",
-                           scratchSizeBytes,
-                           pVMWARE->videoRam - scratchSizeBytes)); 
-
-                vmwareXAACreateHeap(pScreen, pScrn, pVMWARE);
-
-                xaaInfo->SetupForCPUToScreenAlphaTexture =
-                   vmwareSetupForCPUToScreenAlphaTexture;
-                xaaInfo->SubsequentCPUToScreenAlphaTexture =
-                   vmwareSubsequentCPUToScreenTexture;
-                xaaInfo->CPUToScreenAlphaTextureFlags = XAA_RENDER_NO_TILE |
-                   XAA_RENDER_NO_SRC_ALPHA;
-                xaaInfo->CPUToScreenAlphaTextureFormats = vmwareAlphaTextureFormats;
-
-                xaaInfo->SetupForCPUToScreenTexture =
-                   vmwareSetupForCPUToScreenTexture;
-                xaaInfo->SubsequentCPUToScreenTexture = 
-                   vmwareSubsequentCPUToScreenTexture;
-                xaaInfo->CPUToScreenTextureFlags = XAA_RENDER_NO_TILE;
-                xaaInfo->CPUToScreenTextureFormats = vmwareTextureFormats;
-            } else {
-                xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Allocation of offscreen "
-                           "scratch area for alpha blending failed\n");
-            }
-        }
-#endif
-
-        if (box.y2 > box.y1) {
-            REGION_INIT(pScreen, &region, &box, 1);
-
-            if (REGION_NOTEMPTY(pScreen, &region) &&
-                xf86InitFBManagerRegion(pScreen, &region)) {
-                VmwareLog(("Offscreen memory initialized: (%d, %d) - (%d, %d)\n",
-                           box.x1, box.y1, box.x2, box.y2));
-
-                xaaInfo->Flags =
-                   LINEAR_FRAMEBUFFER | PIXMAP_CACHE | OFFSCREEN_PIXMAPS;
-            } else {
-                xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Offscreen memory manager "
-                           "initialization failed.\n");
-            }
-
-            REGION_UNINIT(pScreen, &region);
-        }
-    }
-
-    if (!XAAInit(pScreen, xaaInfo)) {
-        DESTROY_XAA_INFO(pVMWARE);
-        return FALSE;
-    }
-
-#ifdef RENDER
-    if (pVMWARE->heap) {
-        pVMWARE->EnableDisableFBAccess = pScrn->EnableDisableFBAccess;
-        pScrn->EnableDisableFBAccess = vmwareXAAEnableDisableFBAccess;
-    }
-#endif
-
-    return TRUE;
-}
-
-Bool
-vmwareXAAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
-{
-    VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
-
-    /*
-     * Alloc a sufficiently large buffer for XAA to render scanlines
-     * for a color expand into.
-     */
-    if (pVMWARE->vmwareCapability & SVGA_CAP_GLYPH) {
-        /*
-         * This formula came straight from the XAA.HOWTO doc.  The +62 is
-         * there because we potentially have 31 extra bits off to the left,
-         * since we claim LEFT_EDGE_CLIPPING support.
-         */
-        int scanLineSize = ((pScrn->virtualX + 62)/32) * 4;
-        if (pVMWARE->xaaColorExpScanLine[0]) {
-            xfree(pVMWARE->xaaColorExpScanLine[0]);
-        }
-        pVMWARE->xaaColorExpScanLine[0] = xalloc(scanLineSize);
-        return pVMWARE->xaaColorExpScanLine[0] != NULL;
-    }
-
-    return TRUE;



Reply to: