From 50a105e88cfdfc22fef8cfd2397fc5e9fae17663 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 15 Mar 2005 13:10:23 +0000 Subject: [PATCH] LFP's may exist on Pipe A in older i830's. Check that case so that Panel ID can be obtained and Xvideo is correctly setup for panel fitting. --- src/i830_driver.c | 5 +++-- src/i830_video.c | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index acfd57d5..8d611a46 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2633,9 +2633,10 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags) return FALSE; } - /* Check we are on pipe B and have an LFP connected, before trying to + /* Check we have an LFP connected, before trying to * read PanelID information. */ - if ((pI830->pipe == 1) && (pI830->operatingDevices & (PIPE_LFP << 8))) { + if ( (pI830->pipe == 1 && pI830->operatingDevices & (PIPE_LFP << 8)) || + (pI830->pipe == 0 && pI830->operatingDevices & PIPE_LFP) ) { vbeDoPanelID(pI830->pVbe); } diff --git a/src/i830_video.c b/src/i830_video.c index fed8c564..c8b715b7 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2036,12 +2036,13 @@ I830VideoSwitchModeAfter(ScrnInfoPtr pScrn, DisplayModePtr mode) } } - /* Check we are on pipe B and have an LFP connected */ - if ((pPriv->pipe == 1) && (pI830->operatingDevices & (PIPE_LFP << 8))) { - size = INREG(PIPEBSRC); + /* Check we have an LFP connected */ + if ((pPriv->pipe == 1 && pI830->operatingDevices & (PIPE_LFP << 8)) || + (pPriv->pipe == 0 && pI830->operatingDevices & PIPE_LFP) ) { + size = pI830->pipe ? INREG(PIPEBSRC) : INREG(PIPEASRC); hsize = (size >> 16) & 0x7FF; vsize = size & 0x7FF; - active = INREG(VTOTAL_B) & 0x7FF; + active = pI830->pipe ? (INREG(VTOTAL_B) & 0x7FF) : (INREG(VTOTAL_A) & 0x7FF); if (vsize < active && hsize > 1024) I830SetOneLineModeRatio(pScrn);