summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2008-02-20 13:08:27 -0800
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2008-02-20 14:03:27 -0800
commit83be0e293aee63cd181ace8e36a0ee78e3c5a8e1 (patch)
tree49920ed494d41de969919f839bbf32c8c182ca38
parentaa1813e4807e500fb122f36af988cf60f91e05a5 (diff)
downloadxorg-driver-xf86-video-intel-83be0e293aee63cd181ace8e36a0ee78e3c5a8e1.tar.gz
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.
-rw-r--r--src/i830_driver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 477c50a3..4bbcd5a2 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);