summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-07-04 15:39:02 +0200
committerThomas Hellstrom <thellstrom@vmware.com>2011-07-05 20:19:03 +0200
commit4ae8aac35b7209576eaeb64347470d3145b27832 (patch)
treea63068488601f085897408e392dd69b6055403e0 /src
parent0142bb8d10edb153c9ce79a2ea3ff92a7fb15ac5 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/vmware.c3
-rw-r--r--src/vmwaremodes.c3
2 files changed, 5 insertions, 1 deletions
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.