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

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



 COPYING                    |   52 ++++++++--
 Makefile.am                |    2 
 configure.ac               |   66 +++++++-----
 man/Makefile.am            |   22 ----
 src/Makefile.am            |    4 
 src/bits2pixels.c          |    1 
 src/bits2pixels.h          |    2 
 src/guest_os.h             |    2 
 src/includeCheck.h         |    1 
 src/svga_limits.h          |    2 
 src/vm_basic_types.h       |    2 
 src/vm_device_version.h    |    2 
 src/vmware.c               |  153 +++++++++++++++++++++---------
 src/vmware.h               |    8 -
 src/vmwarectrl.c           |   53 +++-------
 src/vmwarecurs.c           |    1 
 src/vmwaremodes.c          |  152 ++++++++++++++++++-----------
 src/vmwaremodule.c         |   61 +++++++++--
 src/vmwarevideo.c          |   87 +++++++++++++----
 src/vmwarexinerama.c       |   53 +++++++---
 vmwarectrl/AUTHORS         |    1 
 vmwarectrl/COPYING         |   26 -----
 vmwarectrl/ChangeLog       |    8 -
 vmwarectrl/INSTALL         |  229 ---------------------------------------------
 vmwarectrl/Makefile.am     |   12 +-
 vmwarectrl/NEWS            |    4 
 vmwarectrl/README          |    6 -
 vmwarectrl/autogen.sh      |   12 --
 vmwarectrl/configure.ac    |   12 --
 vmwarectrl/libvmwarectrl.c |    2 
 30 files changed, 484 insertions(+), 554 deletions(-)

New commits:
commit de70a1d0cb79dad9e52baa43306264db80a163da
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Oct 5 13:33:17 2011 +0200

    xf86-video-vmware 11.0.99.901
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/configure.ac b/configure.ac
index cd2854e..74fd1b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-vmware],
-        [11.0.3],
+        [11.0.99.901],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-vmware])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 26845eb54a15d43f09288a87c5f74beac8fb6ec7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Sep 27 19:31:22 2011 -0700

    Use dixLookupWindow instead of LookupWindow on Xorg 1.5 & later
    
    The LookupWindow function was deprecated in xserver commit ed75b056511ccb4
    and removed during the Xorg 1.11 merge window by commit 82a8677d9175732.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/src/vmwarexinerama.c b/src/vmwarexinerama.c
index 371c7b1..2407c27 100644
--- a/src/vmwarexinerama.c
+++ b/src/vmwarexinerama.c
@@ -48,6 +48,26 @@
 #include <xf86_libc.h>
 #endif
 
+/* 
+ * LookupWindow was removed with video abi 11.
+ */
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
+#ifndef DixGetAttrAccess
+#define DixGetAttrAccess   (1<<4)
+#endif
+#endif
+
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 2)
+static inline int
+dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
+{
+    *pWin = LookupWindow(id, client);
+    if (!*pWin)
+	return BadWindow;
+    return Success;
+}
+#endif
+
 
 /*
  *----------------------------------------------------------------------------
@@ -116,10 +136,12 @@ VMwareXineramaGetState(ClientPtr client)
     ExtensionEntry *ext;
     ScrnInfoPtr pScrn;
     VMWAREPtr pVMWARE;
+    int rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-    pWin = LookupWindow(stuff->window, client);
-    if(!pWin) return BadWindow;
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
 
     if (!(ext = CheckExtension(PANORAMIX_PROTOCOL_NAME))) {
        return BadMatch;
@@ -167,10 +189,12 @@ VMwareXineramaGetScreenCount(ClientPtr client)
     ExtensionEntry *ext;
     ScrnInfoPtr pScrn;
     VMWAREPtr pVMWARE;
+    int rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
-    pWin = LookupWindow(stuff->window, client);
-    if(!pWin) return BadWindow;
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
 
     if (!(ext = CheckExtension(PANORAMIX_PROTOCOL_NAME))) {
        return BadMatch;
@@ -218,10 +242,12 @@ VMwareXineramaGetScreenSize(ClientPtr client)
     ExtensionEntry *ext;
     ScrnInfoPtr pScrn;
     VMWAREPtr pVMWARE;
+    int rc;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
-    pWin = LookupWindow (stuff->window, client);
-    if(!pWin)  return BadWindow;
+    rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+    if (rc != Success)
+	return rc;
 
     if (!(ext = CheckExtension(PANORAMIX_PROTOCOL_NAME))) {
        return BadMatch;

commit b5438423ad29338429321cd29118a66b715cdcac
Author: Matt Turner <mattst88@gmail.com>
Date:   Sun Sep 25 14:06:47 2011 -0400

    Fix wrong-sized swaps
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

diff --git a/src/vmwarexinerama.c b/src/vmwarexinerama.c
index 3476f43..371c7b1 100644
--- a/src/vmwarexinerama.c
+++ b/src/vmwarexinerama.c
@@ -134,7 +134,6 @@ VMwareXineramaGetState(ClientPtr client)
     if(client->swapped) {
        swaps (&rep.sequenceNumber, n);
        swapl (&rep.length, n);
-       swaps (&rep.state, n);
     }
     WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);
     return client->noClientException;
@@ -186,7 +185,6 @@ VMwareXineramaGetScreenCount(ClientPtr client)
     if(client->swapped) {
        swaps(&rep.sequenceNumber, n);
        swapl(&rep.length, n);
-       swaps(&rep.ScreenCount, n);
     }
     WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);
     return client->noClientException;
@@ -239,8 +237,8 @@ VMwareXineramaGetScreenSize(ClientPtr client)
     if(client->swapped) {
        swaps(&rep.sequenceNumber, n);
        swapl(&rep.length, n);
-       swaps(&rep.width, n);
-       swaps(&rep.height, n);
+       swapl(&rep.width, n);
+       swapl(&rep.height, n);
     }
     WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);
     return client->noClientException;

commit 4ae8aac35b7209576eaeb64347470d3145b27832
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Mon Jul 4 15:39:02 2011 +0200

    vmwlegacy: Fix server termination due to pitch inconsistency.
    
    Don't require a 32*32 bit pitch alignment when validating modes, since the
    requested virtual pitch (pVMWARE->maxWidth*bpp) must be a multiple of that
    alignment. If not, the server will terminate with a cryptic error message.
    
    This is only for validating modes. The driver will adjust the pitch to the
    host requirement when a mode is set anyway, and hopefully the host won't
    require a pitch it doesn't support.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/src/vmware.c b/src/vmware.c
index 4158732..1be0990 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -970,7 +970,8 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
     }
 
     i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes,
-                          clockRanges, NULL, 256, pVMWARE->maxWidth, 32 * 32,
+                          clockRanges, NULL, 256, pVMWARE->maxWidth,
+                          pVMWARE->bitsPerPixel * 1,
                           128, pVMWARE->maxHeight,
                           pScrn->display->virtualX, pScrn->display->virtualY,
                           pVMWARE->videoRam,
diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index 9a7b757..2965dca 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -138,6 +138,9 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	if (dispModeCount == 0) {
 
 	    /*
+	     * Set up a large virtual size, so that we allow also
+	     * setting modes larger than the initial mode.
+	     *
 	     * We might also want to consider the case where
 	     * dispModeCount != 0, but the requested display modes
 	     * are not available. This is sufficient for now.

commit 0142bb8d10edb153c9ce79a2ea3ff92a7fb15ac5
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Mar 30 12:37:24 2011 +0200

    vmwlegacy: Don't prune modes based on the virtual size of the default mode
    
    We might be pruning modes based on the virtual size of the default mode in
    some situations. Avoid this by allowing a virtual size equal to the device
    max size, unless the user has requested something else.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Alan Hourihane <alanh@vmware.com>

diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index 6df977d..9a7b757 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -39,6 +39,7 @@
 #include <xf86Modes.h>
 #endif
 #include "vm_basic_types.h"
+#include "vmware.h"
 
 #ifndef M_T_DRIVER
 # define M_T_DRIVER  0x40	/* Supplied by the driver (EDID, etc) */
@@ -85,6 +86,7 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	char **dispModeList;
 	char *dynModeName;
 	char name[80];
+	VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
 
 	/* First, add the default mode name to the display mode
 	 * requests.
@@ -132,6 +134,20 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	    dynamic.HTotal / 1000;
 	mode = xf86DuplicateMode(&dynamic);
 	modes = xf86ModesAdd(modes, mode);
+
+	if (dispModeCount == 0) {
+
+	    /*
+	     * We might also want to consider the case where
+	     * dispModeCount != 0, but the requested display modes
+	     * are not available. This is sufficient for now.
+	     */
+
+	    if (pScrn->display->virtualX == 0)
+		pScrn->display->virtualX = pVMWARE->maxWidth;
+	    if (pScrn->display->virtualY == 0)
+		pScrn->display->virtualY = pVMWARE->maxHeight;
+	}
     }
 
     *monitorModes = xf86ModesAdd(*monitorModes, modes);

commit 04297d435b87e3d04a427ac8ef33d314727220e6
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Mar 30 12:22:43 2011 +0200

    vmwlegacy: Fix up default mode VRefresh anc Clock calculation
    
    The VRefresh value was a factor 1000 too high.
    Calculate clock based on vrefresh and resolution.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Alan Hourihane <alanh@vmware.com>

diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index 5386b17..6df977d 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -120,10 +120,6 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	dynamic.HSyncStart = dynamic.HDisplay + 1;
 	dynamic.HSyncEnd = dynamic.HSyncStart + 1;
 	dynamic.HTotal = dynamic.HSyncEnd * 5 / 4;
-	if (monitor->nHsync > 0)
-	    dynamic.Clock = dynamic.HTotal * monitor->hsync[0].lo;
-	else
-	    dynamic.Clock = 75000;
 	dynamic.VDisplay = dheight;
 	dynamic.VSyncStart = dynamic.VDisplay + 1;
 	dynamic.VSyncEnd = dynamic.VSyncStart + 1;
@@ -131,8 +127,9 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	if (monitor->nVrefresh > 0)
 	    dynamic.VRefresh = monitor->vrefresh[0].lo;
 	else
-	    dynamic.VRefresh = 60000;
-
+	    dynamic.VRefresh = 60;
+	dynamic.Clock = dynamic.VRefresh * dynamic.VTotal *
+	    dynamic.HTotal / 1000;
 	mode = xf86DuplicateMode(&dynamic);
 	modes = xf86ModesAdd(modes, mode);
     }

commit c5ca599361c87ec816db92d4f9841143f8601934
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Mar 30 11:01:06 2011 +0200

    vmwlegacy: Fix a bug in screen dimension calculation
    
    This bug resulted in incorrect screen dimensions and DPI being calculated
    in some circumstances, leading to among other things bad aspect ratios in xine.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/src/vmware.c b/src/vmware.c
index 1f262e3..4158732 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -1626,10 +1626,10 @@ VMWareDriverFunc(ScrnInfoPtr pScrn,
        * keep the DPI constant.
        */
       if (modemm && modemm->mode) {
-	  modemm->mmWidth *= (modemm->mode->HDisplay * VMWARE_INCHTOMM +
-			      pScrn->xDpi / 2)  / pScrn->xDpi;
-	  modemm->mmHeight *= (modemm->mode->VDisplay * VMWARE_INCHTOMM +
-			       pScrn->yDpi / 2) / pScrn->yDpi;
+	  modemm->mmWidth = (modemm->mode->HDisplay * VMWARE_INCHTOMM +
+			     pScrn->xDpi / 2)  / pScrn->xDpi;
+	  modemm->mmHeight = (modemm->mode->VDisplay * VMWARE_INCHTOMM +
+			      pScrn->yDpi / 2) / pScrn->yDpi;
       }
       return TRUE;
    default:

commit c02d5977015983473a9bbae97ec65ce70a5faa3b
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Tue Mar 29 13:03:39 2011 +0200

    vmwlegacy: Make sure we draw the colorkey to the right drawable
    
    Don't draw the colorkey to the screen drawable, but to the video drawable
    when possible.
    
    Also change the Xv API/ABI test to use the builtin ABI version
    functions.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Michel D�er <daenzer@vmware.com>

diff --git a/configure.ac b/configure.ac
index e3dcf30..cd2854e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,10 +81,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.1.0],
                  [AC_DEFINE([HAVE_XORG_SERVER_1_1_0], 1,
                  [Has version 1.1.0 or greater of the Xserver])])
 
-PKG_CHECK_EXISTS([xorg-server >= 1.0.99.901],
-                 [AC_DEFINE([HAVE_XORG_SERVER_1_0_99_901], 1,
-                 [Has version 1.0.99.901 or greater of the Xserver])])
-
 PKG_CHECK_EXISTS([xorg-server >= 1.2.0],
                  [AC_DEFINE([HAVE_XORG_SERVER_1_2_0], 1,
                  [Has version 1.2.0 or greater of the Xserver])])
diff --git a/src/vmwarevideo.c b/src/vmwarevideo.c
index 4ce0d5d..71f21fe 100644
--- a/src/vmwarevideo.c
+++ b/src/vmwarevideo.c
@@ -51,6 +51,12 @@
 #include <xf86_libc.h>
 #endif
 
+
+#define HAVE_FILLKEYHELPERDRAWABLE \
+    ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 2) ||  \
+     ((GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) == 1) && \
+      (GET_ABI_MINOR(ABI_VIDEODRV_VERSION) >= 2)))
+
 #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
 
 /*
@@ -159,7 +165,7 @@ struct VMWAREVideoRec {
    int                (*play)(ScrnInfoPtr, struct VMWAREVideoRec *,
                               short, short, short, short, short,
                               short, short, short, int, unsigned char*,
-                              short, short, RegionPtr);
+                              short, short, RegionPtr, DrawablePtr);
    /*
     * Offscreen memory region used to pass video data to the host.
     */
@@ -180,7 +186,7 @@ typedef VMWAREVideoRec *VMWAREVideoPtr;
 /*
  * Callback functions
  */
-#ifdef HAVE_XORG_SERVER_1_0_99_901
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1)
 static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
                             short drw_x, short drw_y, short src_w, short src_h,
                             short drw_w, short drw_h, int image,
@@ -217,7 +223,8 @@ static int vmwareVideoInitStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                                  short drw_y, short src_w, short src_h,
                                  short drw_w, short drw_h, int format,
                                  unsigned char *buf, short width,
-                                 short height, RegionPtr clipBoxes);
+                                 short height, RegionPtr clipBoxes,
+				 DrawablePtr draw);
 static int vmwareVideoInitAttributes(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                                      int format, unsigned short width,
                                      unsigned short height);
@@ -226,7 +233,8 @@ static int vmwareVideoPlay(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                            short drw_y, short src_w, short src_h,
                            short drw_w, short drw_h, int format,
                            unsigned char *buf, short width,
-                           short height, RegionPtr clipBoxes);
+                           short height, RegionPtr clipBoxes,
+			   DrawablePtr draw);
 static void vmwareVideoFlush(VMWAREPtr pVMWARE, uint32 streamId);
 static void vmwareVideoSetOneReg(VMWAREPtr pVMWARE, uint32 streamId,
                                  uint32 regId, uint32 value);
@@ -631,7 +639,8 @@ vmwareVideoInitStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                       short drw_y, short src_w, short src_h,
                       short drw_w, short drw_h, int format,
                       unsigned char *buf, short width,
-                      short height, RegionPtr clipBoxes)
+                      short height, RegionPtr clipBoxes,
+		      DrawablePtr draw)
 {
     VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
     int i;
@@ -676,8 +685,11 @@ vmwareVideoInitStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
 	BoxPtr boxes = REGION_RECTS(&pVid->clipBoxes);
 	int nBoxes = REGION_NUM_RECTS(&pVid->clipBoxes);
 
+#if HAVE_FILLKEYHELPERDRAWABLE
+	xf86XVFillKeyHelperDrawable(draw, pVid->colorKey, clipBoxes);
+#else
         xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes);
-
+#endif
 	/**
 	 * Force update to paint the colorkey before the overlay flush.
 	 */
@@ -691,7 +703,8 @@ vmwareVideoInitStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                pVid->fbarea->offset, pVid->fbarea->size, pVid->size));
 
     return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w, src_h,
-                      drw_w, drw_h, format, buf, width, height, clipBoxes);
+                      drw_w, drw_h, format, buf, width, height, clipBoxes,
+		      draw);
 }
 
 
@@ -761,7 +774,8 @@ vmwareVideoPlay(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
                 short drw_y, short src_w, short src_h,
                 short drw_w, short drw_h, int format,
                 unsigned char *buf, short width,
-                short height, RegionPtr clipBoxes)
+                short height, RegionPtr clipBoxes,
+		DrawablePtr draw)
 {
     VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
     uint32 *fifoItem;
@@ -803,7 +817,7 @@ vmwareVideoPlay(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
         vmwareStopVideo(pScrn, pVid, TRUE);
         return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w,
                           src_h, drw_w, drw_h, format, buf, width, height,
-                          clipBoxes);
+                          clipBoxes, draw);
     }
 
     pVid->size = size;
@@ -856,8 +870,11 @@ vmwareVideoPlay(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid,
 	    BoxPtr boxes = REGION_RECTS(&pVid->clipBoxes);
 	    int nBoxes = REGION_NUM_RECTS(&pVid->clipBoxes);
 
-            xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes);
-
+#if HAVE_FILLKEYHELPERDRAWABLE
+	    xf86XVFillKeyHelperDrawable(draw, pVid->colorKey, clipBoxes);
+#else
+	    xf86XVFillKeyHelper(pScrn->pScreen, pVid->colorKey, clipBoxes);
+#endif
 	    /**
 	     * Force update to paint the colorkey before the overlay flush.
 	     */
@@ -1056,7 +1073,7 @@ vmwareVideoEndStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid)
  *-----------------------------------------------------------------------------
  */
 
-#ifdef HAVE_XORG_SERVER_1_0_99_901
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1)
 static int
 vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
                  short drw_x, short drw_y, short src_w, short src_h,
@@ -1082,8 +1099,15 @@ vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
         return XvBadAlloc;
     }
 
+#if (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1)
     return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w, src_h,
-                      drw_w, drw_h, format, buf, width, height, clipBoxes);
+                      drw_w, drw_h, format, buf, width, height, clipBoxes,
+		      dst);
+#else
+    return pVid->play(pScrn, pVid, src_x, src_y, drw_x, drw_y, src_w, src_h,
+                      drw_w, drw_h, format, buf, width, height, clipBoxes,
+		      NULL);
+#endif
 }
 
 

commit b234d7d6925b480a9c4fe23e5100e6fe7e5c0eac
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Tue Mar 29 11:18:24 2011 +0200

    vmwlegacy: Silence a number of warnings
    
    This potentially also fixes a use of an uninitialized pointer value, which
    may cause OOM or segfaults.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Michel D�er <daenzer@vmware.com>

diff --git a/src/vmware.c b/src/vmware.c
index e04835f..1f262e3 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -1021,6 +1021,7 @@ VMWAREMapMem(ScrnInfoPtr pScrn)
 #if XSERVER_LIBPCIACCESS
     int err;
     struct pci_device *const device = pVMWARE->PciInfo;
+    void *fbBase;
 #endif
 
 #if XSERVER_LIBPCIACCESS
@@ -1028,14 +1029,14 @@ VMWAREMapMem(ScrnInfoPtr pScrn)
                               pVMWARE->memPhysBase,
                               pVMWARE->videoRam,
                               PCI_DEV_MAP_FLAG_WRITABLE,
-                              (void **) &pVMWARE->FbBase);
+			      &fbBase);
    if (err) {
        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                   "Unable to map frame buffer BAR. %s (%d)\n",
                   strerror (err), err);
        return FALSE;
    }
-
+   pVMWARE->FbBase = fbBase;
 #else
     pVMWARE->FbBase = xf86MapPciMem(pScrn->scrnIndex, 0,
                                     pVMWARE->PciTag,
@@ -1336,6 +1337,7 @@ VMWAREInitFIFO(ScrnInfoPtr pScrn)
 #if XSERVER_LIBPCIACCESS
     struct pci_device *const device = pVMWARE->PciInfo;
     int err;
+    void *mmioVirtBase;
 #endif
     CARD32* vmwareFIFO;
     Bool extendedFifo;
@@ -1349,13 +1351,14 @@ VMWAREInitFIFO(ScrnInfoPtr pScrn)
     err = pci_device_map_range(device, pVMWARE->mmioPhysBase,
                                pVMWARE->mmioSize,
                                PCI_DEV_MAP_FLAG_WRITABLE,
-                               (void **) &pVMWARE->mmioVirtBase);
+                               &mmioVirtBase);
     if (err) {
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                    "Unable to map mmio BAR. %s (%d)\n",
                    strerror (err), err);
         return;
     }
+    pVMWARE->mmioVirtBase = mmioVirtBase;
 #else
     pVMWARE->mmioVirtBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
                                           pVMWARE->PciTag,
diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index d82eba6..5386b17 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -50,50 +50,6 @@
 #define VMW_DEFLT_MODE_NAME "vmwlegacy-default-%dx%d"
 
 /*
- * Most of the modelines copied from DMTModes table of xf86EdidModes.c.
- * For those modes not in DMTModes table are generated by gtf
- * These modes are not used currently, and not really necessary.
- * Consider removing them in a future release.
- */
-static DisplayModeRec VMwareModes[] = {
-   /* 4:3 modes */
-   { MODEPREFIX,  5260,  320,  304,  336,  352, 0,  240,  241,  244,  249, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 320x240@60Hz,  GTF */
-   { MODEPREFIX,  8660,  400,  392,  432,  464, 0,  300,  301,  304,  311, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 400x300@60Hz,  GTF */
-   { MODEPREFIX, 14900,  512,  520,  568,  624, 0,  384,  385,  388,  398, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 512x384@60Hz,  GTF */
-   { MODEPREFIX, 25175,  640,  656,  752,  800, 0,  480,  490,  492,  525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz,  DMT */
-   { MODEPREFIX, 40000,  800,  840,  968, 1056, 0,  600,  601,  605,  628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz,  DMT */
-   { MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0,  768,  771,  777,  806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@60Hz, DMT */
-   { MODEPREFIX, 81620, 1152, 1216, 1336, 1520, 0,  864,  865,  868,  895, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1152x864@60Hz, GTF */
-   { MODEPREFIX,108000, 1280, 1376, 1488, 1800, 0,  960,  961,  964, 1000, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x960@60Hz, DMT */
-   { MODEPREFIX,121750, 1400, 1488, 1632, 1864, 0, 1050, 1053, 1057, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1400x1050@60Hz,DMT */
-   { MODEPREFIX,162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@60Hz,DMT */
-   { MODEPREFIX,234000, 1920, 2048, 2256, 2600, 0, 1440, 1441, 1444, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1440@60Hz,DMT */
-   { MODEPREFIX,266950, 2048, 2200, 2424, 2800, 0, 1536, 1537, 1540, 1589, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2048x1536@60Hz,GTF */
-   { MODEPREFIX,421560, 2560, 2768, 3048, 3536, 0, 1920, 1921, 1924, 1987, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2560x1920@60Hz,GTF */
-   /* 16:9 modes */
-   { MODEPREFIX, 31730,  856,  872,  960, 1064, 0,  480,  481,  484,  497, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 856x480@60Hz,  GTF */
-   { MODEPREFIX, 74480, 1280, 1336, 1472, 1664, 0,  720,  721,  724,  746, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x720@60Hz, GTF */
-   { MODEPREFIX, 85860, 1368, 1440, 1584, 1800, 0,  768,  769,  772,  795, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1368x768@60Hz, GTF */
-   { MODEPREFIX,172800, 1920, 2040, 2248, 2576, 0, 1080, 1081, 1084, 1118, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1080@60Hz,GTF */
-   /* 16:10 modes */
-   { MODEPREFIX, 83500, 1280, 1352, 1480, 1680, 0,  800,  803,  809,  831, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x800@60Hz, DMT */
-   { MODEPREFIX,106500, 1440, 1520, 1672, 1904, 0,  900,  903,  909,  934, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1440x900@60Hz, DMT */
-   { MODEPREFIX,146250, 1680, 1784, 1960, 2240, 0, 1050, 1053, 1059, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1680x1050@60Hz,DMT */
-   { MODEPREFIX,193250, 1920, 2056, 2256, 2592, 0, 1200, 1203, 1209, 1245, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1200@60Hz,DMT */
-   { MODEPREFIX,348500, 2560, 2752, 3032, 3504, 0, 1600, 1603, 1609, 1658, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2560x1600@60Hz,DMT */
-   /* DVD modes */
-   { MODEPREFIX, 26720,  720,  736,  808,  896, 0,  480,  481,  484,  497, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x480@60Hz,  GTF */
-   { MODEPREFIX, 32670,  720,  744,  816,  912, 0,  576,  577,  580,  597, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x576@60Hz,  GTF */
-   /* Odd modes */
-   { MODEPREFIX,  4190,  320,  304,  328,  336, 0,  200,  201,  204,  208, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 320x200@60Hz,  GTF */
-   { MODEPREFIX, 19520,  640,  648,  712,  784, 0,  400,  401,  404,  415, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 640x400@60Hz,  GTF */
-   { MODEPREFIX, 29580,  800,  816,  896,  992, 0,  480,  481,  484,  497, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x480@60Hz,  GTF */
-   { MODEPREFIX, 79500, 1280, 1344, 1472, 1664, 0,  768,  771,  778,  798, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x768@60Hz, DMT */
-   { MODEPREFIX,108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@60Hz,DMT */
-};
-
-
-/*
  *-----------------------------------------------------------------------------
  *
  * vmwareAddDefaultMode --
@@ -112,7 +68,6 @@ static DisplayModeRec VMwareModes[] = {
 void
 vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 {
-    MonPtr monitor = pScrn->monitor;
     DisplayModePtr *monitorModes = &pScrn->monitor->Modes;
     DisplayModePtr modes = NULL;
 
@@ -122,10 +77,10 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 
 #ifdef HAVE_XORG_SERVER_1_2_0
     if (dwidth && dheight) {
+	MonPtr monitor = pScrn->monitor;
 	DisplayModePtr mode = NULL;
 	DisplayModeRec dynamic =
 	    { MODEPREFIX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, MODESUFFIX };
-	int i = 0;
 	unsigned dispModeCount = 0;
 	char **dispModeList;
 	char *dynModeName;
@@ -145,9 +100,9 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	    dispModeList = pScrn->display->modes;
 	    while(*dispModeList)
 		dispModeList++;
+	    dispModeCount = dispModeList - pScrn->display->modes;
 	}
 
-	dispModeCount = dispModeList - pScrn->display->modes;
 	dispModeList = xnfcalloc(dispModeCount + 2, sizeof(*dispModeList));
 	if (!dispModeList)
 	    goto out_err;
@@ -183,6 +138,8 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
     }
 
     *monitorModes = xf86ModesAdd(*monitorModes, modes);
+#else
+    (void) modes;
 #endif
     return;
   out_err:

commit cdb04224db69a6b3beb66c99879e20917b8b0fb2
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Fri Mar 25 19:17:00 2011 +0100

    vmwlegacy: Fix segfault and setup of initial mode.
    
    The fact that modes were added without names caused segfaults on older
    X servers. At least up to and including Xserver 1.4.
    
    Also, for some reason, at least Xserver 1.4 insists on setting the first mode
    in the modelist, even if we set another mode as the current one.
    
    Work around this by inserting a new mode with the current screen dimensions,
    and add that modename last to the array of display requested mode names.
    This means that if none of the previous mode names are found, we will at least
    find the newly inserted mode.
    
    Also, if there are no requested mode names at all, the driver previously
    chose the largest mode that fit the timings. Now we will, in that case,
    always select the newly inserted mode and thus not change resolution unless
    specified.
    
    Also add an option to not add this default mode. The option
    "AddDefaultMode" is true by default.
    
    Finally when we restore registers at exit and VT switch, make sure we
    reprogram the initial width, height and bpp for the next time we start a
    server.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/src/vmware.c b/src/vmware.c
index 795ad08..e04835f 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -217,13 +217,15 @@ static XF86ModuleVersionInfo vmwlegacyVersRec = {
 typedef enum {
     OPTION_HW_CURSOR,
     OPTION_XINERAMA,
-    OPTION_STATIC_XINERAMA
+    OPTION_STATIC_XINERAMA,
+    OPTION_DEFAULT_MODE,
 } VMWAREOpts;
 
 static const OptionInfoRec VMWAREOptions[] = {
     { OPTION_HW_CURSOR, "HWcursor",     OPTV_BOOLEAN,   {0},    FALSE },
     { OPTION_XINERAMA,  "Xinerama",     OPTV_BOOLEAN,   {0},    FALSE },
     { OPTION_STATIC_XINERAMA, "StaticXinerama", OPTV_STRING, {0}, FALSE },
+    { OPTION_DEFAULT_MODE, "AddDefaultMode", OPTV_BOOLEAN,   {0},    FALSE },
     { -1,               NULL,           OPTV_NONE,      {0},    FALSE }
 };
 
@@ -608,6 +610,7 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
     ClockRange* clockRanges;
     IOADDRESS domainIOBase = 0;
     uint32 width = 0, height = 0;
+    Bool defaultMode;
 
 #ifndef BUILD_FOR_420
     domainIOBase = pScrn->domainIOBase;
@@ -923,6 +926,17 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
     pScrn->videoRam = pVMWARE->videoRam / 1024;
     pScrn->memPhysBase = pVMWARE->memPhysBase;
 
+    from = X_DEFAULT;
+    defaultMode = TRUE;
+    if (xf86GetOptValBool(options, OPTION_DEFAULT_MODE, &defaultMode)) {
+        from = X_CONFIG;
+    }
+    width = vmwareReadReg(pVMWARE, SVGA_REG_WIDTH);
+    height = vmwareReadReg(pVMWARE, SVGA_REG_HEIGHT);
+    xf86DrvMsg(pScrn->scrnIndex, from,
+	       "Will %sset up a driver mode with dimensions %dx%d.\n",
+	       defaultMode ? "" : "not ", width, height);
+
     free(options);
 
     {
@@ -950,24 +964,10 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
     clockRanges->doubleScanAllowed = FALSE;
     clockRanges->ClockMulFactor = 1;
     clockRanges->ClockDivFactor = 1;
-   
-    /* Read the configured registers for an initial mode.
-     * This gives the benefit that at initial bootup, we're most likely
-     * to have an 800x600 mode and thus we have a reasonable default at
-     * power on. Subsequent logouts will use the pre-configured mode from
-     * last session which is a more natural thing.
-     *
-     * But, only if we haven't any modes specified in the config file.
-     */
-    if (pScrn->display && pScrn->display->modes) {
-	width = vmwareReadReg(pVMWARE, SVGA_REG_WIDTH);
-	height = vmwareReadReg(pVMWARE, SVGA_REG_HEIGHT);
-    }
 
-    /*
-     * Get the default supported modelines
-     */
-    vmwareGetSupportedModelines(pScrn, width, height);
+    if (defaultMode) {
+	vmwareAddDefaultMode(pScrn, width, height);
+    }
 
     i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes,
                           clockRanges, NULL, 256, pVMWARE->maxWidth, 32 * 32,
@@ -986,38 +986,12 @@ VMWAREPreInit(ScrnInfoPtr pScrn, int flags)
         VMWAREFreeRec(pScrn);
         return FALSE;
     }
-    xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V);
 
-    /* Walk the mode list and choose one that matches our registers */
-    {
-	DisplayModePtr modes = pScrn->modes;
-	while (modes) {
-	    if (modes->type != M_T_USERDEF) {
-		/* The first mode isn't our specified one, so fallback
-		 * to a sane default so we don't get a large virtual
-		 * screen that may be scaled to a very small initial
-		 * login screen.
-		 * We read the current SVGA registers, so we'll either
-		 * end up with a default 800x600 at bootup, or the last
-		 * virtual autofitted resolution from the previous session.
-		 */
-		width = vmwareReadReg(pVMWARE, SVGA_REG_WIDTH);
-		height = vmwareReadReg(pVMWARE, SVGA_REG_HEIGHT);
-	    }
+    pScrn->currentMode = pScrn->modes;
+    pScrn->virtualX = pScrn->modes->HDisplay;
+    pScrn->virtualY = pScrn->modes->VDisplay;
 
-	    if (modes->HDisplay == width && modes->VDisplay == height)
-		break;
-
-	    modes = modes->next;
-
-	    if (modes == pScrn->modes)
-		break;
-	}
-
-	pScrn->currentMode = modes;
-	pScrn->virtualX = modes->HDisplay;
-	pScrn->virtualY = modes->VDisplay;
-    }
+    xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V);
 
     xf86PrintModes(pScrn);
     xf86SetDpi(pScrn, 0, 0);
@@ -1153,7 +1127,12 @@ VMWARERestoreRegs(ScrnInfoPtr pScrn, VMWARERegPtr vmwareReg)
                            vmwareReg->svga_reg_cursor_on);
         }
     } else {
-        vmwareWriteReg(pVMWARE, SVGA_REG_ENABLE, vmwareReg->svga_reg_enable);
+        vmwareWriteReg(pVMWARE, SVGA_REG_ID, vmwareReg->svga_reg_id);
+        vmwareWriteReg(pVMWARE, SVGA_REG_WIDTH, vmwareReg->svga_reg_width);
+        vmwareWriteReg(pVMWARE, SVGA_REG_HEIGHT, vmwareReg->svga_reg_height);
+        vmwareWriteReg(pVMWARE, SVGA_REG_BITS_PER_PIXEL,
+                       vmwareReg->svga_reg_bits_per_pixel);
+	vmwareWriteReg(pVMWARE, SVGA_REG_ENABLE, vmwareReg->svga_reg_enable);
     }
 }
 
diff --git a/src/vmware.h b/src/vmware.h
index 3253a64..cf32462 100644
--- a/src/vmware.h
+++ b/src/vmware.h
@@ -313,7 +313,7 @@ void vmwareCheckVideoSanity(
    );
 
 /* vmwaremode.c */
-void vmwareGetSupportedModelines(
+void vmwareAddDefaultMode(
    ScrnInfoPtr pScrn,
    uint32 dwidth,
    uint32 dheight
diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index ceeedf6..d82eba6 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -28,11 +28,7 @@
 /*
  * vmwaremodes.c --
  *      
- *      Provide the supported modelines for the driver.
- *
- *      VMware does not have virtual monitor and there is no EDID to
- *      automatically report the supported mode. The list of
- *      supported modelines are manually added in the driver.
+ *      Provide additional modes for the driver.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -51,9 +47,13 @@
 #define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER
 #define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
 
+#define VMW_DEFLT_MODE_NAME "vmwlegacy-default-%dx%d"
+
 /*
  * Most of the modelines copied from DMTModes table of xf86EdidModes.c.
  * For those modes not in DMTModes table are generated by gtf
+ * These modes are not used currently, and not really necessary.
+ * Consider removing them in a future release.
  */
 static DisplayModeRec VMwareModes[] = {
    /* 4:3 modes */
@@ -96,12 +96,12 @@ static DisplayModeRec VMwareModes[] = {
 /*
  *-----------------------------------------------------------------------------
  *
- * vmwareGetSupportedModelines --
+ * vmwareAddDefaultMode --
  *
- *    Get the supported modelines.
+ *    Add a default mode with the current screen dimensions.
  *
  * Results:
- *    The supported modelines.
+ *    The default mode.
  *
  * Side effects:
  *    None.
@@ -110,30 +110,57 @@ static DisplayModeRec VMwareModes[] = {
  */
 
 void
-vmwareGetSupportedModelines(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
+vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 {
     MonPtr monitor = pScrn->monitor;
     DisplayModePtr *monitorModes = &pScrn->monitor->Modes;
-    DisplayModePtr modes = NULL, mode = NULL;
-    DisplayModeRec dynamic =
-		{ MODEPREFIX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, MODESUFFIX };
-    int i = 0;
+    DisplayModePtr modes = NULL;
 
     if (monitorModes == NULL || *monitorModes == NULL) {
-       return;
+	goto out_err;
     }
 
 #ifdef HAVE_XORG_SERVER_1_2_0
-    for (i = 0; i < sizeof(VMwareModes)/sizeof(DisplayModeRec); i++) {
-       mode = xf86DuplicateMode(&(VMwareModes[i]));
-       modes = xf86ModesAdd(modes, mode);
-    }
-
-    /*
-     * Let's add a mode of current SVGA register values and so we can
-     * match against this for subsequent login.
-     */
     if (dwidth && dheight) {
+	DisplayModePtr mode = NULL;
+	DisplayModeRec dynamic =
+	    { MODEPREFIX, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, MODESUFFIX };
+	int i = 0;
+	unsigned dispModeCount = 0;
+	char **dispModeList;
+	char *dynModeName;
+	char name[80];
+
+	/* First, add the default mode name to the display mode
+	 * requests.
+	 */
+
+	snprintf(name, sizeof(name), VMW_DEFLT_MODE_NAME, dwidth, dheight);
+
+	dynModeName = xnfstrdup(name);
+	if (!dynModeName || !pScrn->display)
+	    goto out_err;
+
+	if (pScrn->display->modes) {
+	    dispModeList = pScrn->display->modes;
+	    while(*dispModeList)
+		dispModeList++;
+	}
+
+	dispModeCount = dispModeList - pScrn->display->modes;
+	dispModeList = xnfcalloc(dispModeCount + 2, sizeof(*dispModeList));
+	if (!dispModeList)
+	    goto out_err;
+
+	memcpy(dispModeList, pScrn->display->modes,
+	       dispModeCount * sizeof(*dispModeList));
+	dispModeList[dispModeCount] = dynModeName;
+	pScrn->display->modes = dispModeList;
+
+	/* Then, add the default mode itself.
+	 */
+
+	dynamic.name = name;
 	dynamic.HDisplay = dwidth;
 	dynamic.HSyncStart = dynamic.HDisplay + 1;
 	dynamic.HSyncEnd = dynamic.HSyncStart + 1;
@@ -157,4 +184,7 @@ vmwareGetSupportedModelines(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 
     *monitorModes = xf86ModesAdd(*monitorModes, modes);
 #endif
+    return;
+  out_err:
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to add default mode.");
 }

commit 9a8f0af8782fd5e9de2d71dfa86fad1d48d52b64


Reply to: