diff options
author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-20 13:08:27 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-20 13:08:27 -0800 |
commit | 28049540d8a9f79401fcfeb90784f5a528e7b34f (patch) | |
tree | 4a6031a7b2bdc5dde3355f77160b65762c554dc5 /src | |
parent | 293120bfc40a5b828567551954d8312639e73578 (diff) |
Fix DSP*CNTR restoration
When checking which pipe a given plane was associated with, we weren't properly
masking the pipe selection bits. Fixes #14481 and should allow the driver to
work with vesafb again.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_driver.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 290236ec..5cd0a34b 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2120,12 +2120,14 @@ RestoreHWState(ScrnInfoPtr pScrn) * enabled if pipe A is actually on (otherwise we have a bug in the initial * state). */ - if (pI830->saveDSPACNTR & DISPPLANE_SEL_PIPE_A) { + if ((pI830->saveDSPACNTR & DISPPLANE_SEL_PIPE_MASK) == + DISPPLANE_SEL_PIPE_A) { OUTREG(DSPACNTR, pI830->saveDSPACNTR); OUTREG(DSPABASE, INREG(DSPABASE)); i830WaitForVblank(pScrn); } - if (pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_A) { + if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) == + DISPPLANE_SEL_PIPE_A) { OUTREG(DSPBCNTR, pI830->saveDSPBCNTR); OUTREG(DSPBBASE, INREG(DSPBBASE)); i830WaitForVblank(pScrn); @@ -2177,12 +2179,14 @@ RestoreHWState(ScrnInfoPtr pScrn) * Note that pipe B may be disabled, and in that case, the plane * should also be disabled or we must have had a bad initial state. */ - if (pI830->saveDSPACNTR & DISPPLANE_SEL_PIPE_B) { + if ((pI830->saveDSPACNTR & DISPPLANE_SEL_PIPE_MASK) == + DISPPLANE_SEL_PIPE_B) { OUTREG(DSPACNTR, pI830->saveDSPACNTR); OUTREG(DSPABASE, INREG(DSPABASE)); i830WaitForVblank(pScrn); } - if (pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_B) { + if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) == + DISPPLANE_SEL_PIPE_B) { OUTREG(DSPBCNTR, pI830->saveDSPBCNTR); OUTREG(DSPBBASE, INREG(DSPBBASE)); i830WaitForVblank(pScrn); |