From effab21c3d108fac7a4e28ae4dabb0b5f74a5380 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 24 Apr 2006 11:42:24 -0700 Subject: [PATCH] Set displayWidth to a sufficient value for the modes we come up with for LVDS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by: Lukáš Hejtmánek --- src/i830_driver.c | 4 ++++ 1 file changed, 4 insertions(+) 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; }