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

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



 ChangeLog            |  227 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac         |    6 -
 debian/changelog     |    8 +
 src/vmware.c         |   68 ++++++++++-----
 src/vmware.h         |    6 -
 src/vmwarectrl.c     |   41 ++-------
 src/vmwaremodes.c    |  152 +++++++++++++++++++++-------------
 src/vmwaremodule.c   |    7 -
 src/vmwarevideo.c    |   50 ++++++++---
 src/vmwarexinerama.c |    6 -
 10 files changed, 439 insertions(+), 132 deletions(-)

New commits:
commit bd0fa01e7b27e37f1ed1af50f1a2b6ef72e81634
Author: Cyril Brulebois <kibi@debian.org>
Date:   Thu Nov 3 01:09:29 2011 +0100

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 1900dc4..8a3cca9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-xserver-xorg-video-vmware (1:11.0.99.901-1) UNRELEASED; urgency=low
+xserver-xorg-video-vmware (1:11.0.99.901-1) unstable; urgency=low
 
   * New upstream release candidate.
   * It's probably not bug-free, but that's what release candidates and
     unstable users are for. ;-)
 
- -- Cyril Brulebois <kibi@debian.org>  Thu, 03 Nov 2011 01:01:21 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Thu, 03 Nov 2011 01:09:25 +0100
 
 xserver-xorg-video-vmware (1:11.0.3-3) unstable; urgency=high
 

commit 8da17585deef022f26154d0454464db5355fc29d
Author: Cyril Brulebois <kibi@debian.org>
Date:   Thu Nov 3 01:08:31 2011 +0100

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 3e9b3d4..5ded524 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,230 @@
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+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>
+
+commit 9a8f0af8782fd5e9de2d71dfa86fad1d48d52b64
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Mar 3 09:47:48 2011 +0100
+
+    Remove unused variable
+    
+    Signed-off-by: Cyril Brulebois <kibi@debian.org>
+    Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit c208a5380b20f910ab49433abc0d39dce6bb5528
+Author: Alan Hourihane <alanh@vmware.com>
+Date:   Wed Feb 16 18:53:14 2011 +0100
+
+    vmwlegacy: Fix mode lookup
+    
+    In situations where we have trouble finding a specified mode,
+    use the resolution given by the width and height device registers.
+    
+    Signed-off-by: Alan Hourihane <alanh@vmware.com>
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 2e5001b7e93c63c2cd25d7d8ebdee8a420c13b96
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Feb 16 18:47:02 2011 +0100
+
+    vmwlegacy: Add a missing include
+    
+    The test for Xserver >= 1.2 in the affected file was always failing.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Michel Dänzer <daenzer@vmware.com>
+
+commit b3c244ebd7899a66aa401d2d7b0ddc66ee56e6d7
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Feb 16 17:29:47 2011 +0100
+
+    vmwlegacy: Don't attempt to call RRSendConfigNotify on Xservers < 1.2
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Alan Hourihane <alanh@vmware.com>
+    Reviewed-by: Michel Dänzer <daenzer@vmware.com>
+
+commit eacfa46ada8562bfb15d3fc6a8af272d88036d2f
+Author: Michel Dänzer <daenzer@vmware.com>
+Date:   Thu Jan 27 11:09:39 2011 +0100
+
+    vmwlegacy: Send ConfigureNotify events on Xinerama state changes with no mode change
+    
+    Signed-off-by: Michel D�er <daenzer@vmware.com>
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit cc66e4a49a4a9ac90940d7866db5bc7621cb7e16
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 27 11:02:44 2011 +0100
+
+    Fix crosscompile build for older Xservers v2
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit d1ac343b8894a9b8a34c1dcf4b6aeb57239034c0
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Fri Jan 21 23:07:10 2011 +0100
+
+    Revert "Fix crosscompile build for older Xservers"
+    
+    This reverts commit 16e16390385d890b3666485a40369f4c690d5033.
+    
+    The fix was bogus as pointed out by Cyril Bruleboid <kibi@debian.org>, and
+    Gaetan Nadon <memsize@videotron.ca>
+
+commit 16e16390385d890b3666485a40369f4c690d5033
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 13 13:17:17 2011 +0100
+
+    Fix crosscompile build for older Xservers
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 5b30df47117bc65fd5f14667671041428e1d00b5
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 13 12:52:14 2011 +0100
+
+    vmwlegacy: Remove Write-Combining setups
+    
+    The virtual CPUs doesn't support it anyway.
+    Once suggested by Michel Daenzer.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+
 commit 8f8f71f0075d9d5cbbfca93425462ba03c5b8046
 Author: Thomas Hellstrom <thellstrom@vmware.com>
 Date:   Tue Nov 9 14:31:30 2010 +0100
diff --git a/debian/changelog b/debian/changelog
index d6ecf81..1900dc4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xserver-xorg-video-vmware (1:11.0.99.901-1) UNRELEASED; urgency=low
+
+  * New upstream release candidate.
+  * It's probably not bug-free, but that's what release candidates and
+    unstable users are for. ;-)
+
+ -- Cyril Brulebois <kibi@debian.org>  Thu, 03 Nov 2011 01:01:21 +0100
+
 xserver-xorg-video-vmware (1:11.0.3-3) unstable; urgency=high
 
   * Cherry-pick from upstream: Use dixLookupWindow instead of LookupWindow on

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;
 


Reply to: