summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-04-24 11:42:24 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-04-24 11:42:24 -0700
commiteffab21c3d108fac7a4e28ae4dabb0b5f74a5380 (patch)
tree943b41cf20a4eb9253df853c48a15c10b662795d
parentbcb441225d1365435bc3373901180de944298e86 (diff)
Set displayWidth to a sufficient value for the modes we come up with for LVDS.
Reported by: Lukáš Hejtmánek
-rw-r--r--src/i830_driver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 8fba83cc..3f671066 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -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;
}