Set displayWidth to a sufficient value for the modes we come up with for LVDS.

Reported by:	Lukáš Hejtmánek
This commit is contained in:
Eric Anholt 2006-04-24 11:42:24 -07:00
parent bcb441225d
commit effab21c3d
1 changed files with 4 additions and 0 deletions

View File

@ -1693,6 +1693,10 @@ static int i830ValidateFPModes(ScrnInfoPtr pScrn, char **ppModeName)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Total number of valid FP mode(s) found: %d\n", count);
/* Adjust the display pitch to fit the modes we've come up with. */
pScrn->displayWidth = MAX(pScrn->displayWidth, pScrn->virtualX);
pScrn->displayWidth = (pScrn->displayWidth + 63) & ~63;
return count;
}