From 4ae8aac35b7209576eaeb64347470d3145b27832 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 4 Jul 2011 15:39:02 +0200 Subject: 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 --- src/vmware.c | 3 ++- src/vmwaremodes.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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. -- cgit v1.2.3