summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-11-04 00:46:18 -0800
committerEric Anholt <eric@anholt.net>2006-11-07 15:17:27 -0800
commitf1ff01e31eb8e9dc05190bf1a8b318d4f587f64a (patch)
tree0063232cbf5ecb356ee84864e9e758c6e9cb4731 /src/i830_video.c
parent0b2d36d4f038c4e8fa08632b6f1368627f010392 (diff)
Eliminate operatingDevices member and PIPE_* values.
operatingDevices and MonType1/MonType2 duplicate information already stored in the device structures. Eliminate them and replace uses with direct references to the appropriate other data. (cherry picked from 3ab7f9693217d8fe993bdc94c376b219b0082961 commit)
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 47f4a03f..a5cd77cf 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -722,7 +722,7 @@ I830SetupImageVideoOverlay(ScreenPtr pScreen)
pPriv->brightness = 0;
pPriv->contrast = 64;
pPriv->saturation = 128;
- pPriv->pipe = pI830->pipe; /* default to current pipe */
+ pPriv->pipe = 0; /* XXX must choose pipe wisely */
pPriv->linear = NULL;
pPriv->currentBuf = 0;
pPriv->gamma5 = 0xc0c0c0;
@@ -3592,6 +3592,8 @@ I830VideoSwitchModeAfter(ScrnInfoPtr pScrn, DisplayModePtr mode)
pPriv->overlayOK = TRUE;
+#if 0
+ /* XXX Must choose pipe wisely */
/* ensure pipe is updated on mode switch */
if (!pI830->Clone) {
if (pPriv->pipe != pI830->pipe) {
@@ -3600,6 +3602,7 @@ I830VideoSwitchModeAfter(ScrnInfoPtr pScrn, DisplayModePtr mode)
pPriv->pipe = pI830->pipe;
}
}
+#endif
if (!IS_I965G(pI830)) {
if (pPriv->pipe == 0) {
@@ -3628,8 +3631,8 @@ I830VideoSwitchModeAfter(ScrnInfoPtr pScrn, DisplayModePtr mode)
}
/* Check we have an LFP connected */
- if ((pPriv->pipe == 1 && pI830->operatingDevices & (PIPE_LFP << 8)) ||
- (pPriv->pipe == 0 && pI830->operatingDevices & PIPE_LFP) ) {
+ if (i830PipeHasType (pScrn, pPriv->pipe, I830_OUTPUT_LVDS))
+ {
size = pPriv->pipe ? INREG(PIPEBSRC) : INREG(PIPEASRC);
hsize = (size >> 16) & 0x7FF;
vsize = size & 0x7FF;