summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/i830_raw.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/i830_raw.c b/src/i830_raw.c
index 12d25a62..bd88004d 100644
--- a/src/i830_raw.c
+++ b/src/i830_raw.c
@@ -830,9 +830,13 @@ I830RawRestoreState(ScrnInfoPtr pScrn, I830RegPtr hw)
/* turn off pipe A */
temp = hw->pipe_a_conf;
OUTREG(PIPEACONF, temp & ~PIPEACONF_ENABLE);
+
+ if (hw->dvob & DVO_ENABLE)
+ OUTREG(DVOB, (hw->dvob & ~DVO_ENABLE) | SDVO_BORDER_ENABLE);
+
+ if (hw->dvoc & DVO_ENABLE)
+ OUTREG(DVOC, (hw->dvoc & ~DVO_ENABLE) | SDVO_BORDER_ENABLE);
- OUTREG(DVOC, (hw->dvoc & ~DVO_ENABLE) | SDVO_BORDER_ENABLE);
- OUTREG(DVOB, (hw->dvob & ~DVO_ENABLE) | SDVO_BORDER_ENABLE);
OUTREG(ADPA, hw->adpa & ~ADPA_DAC_ENABLE);
OUTREG(0x61204, 0xabcd0000);
@@ -848,8 +852,11 @@ I830RawRestoreState(ScrnInfoPtr pScrn, I830RegPtr hw)
OUTREG(VCLK_DIVISOR_VGA1, hw->vga1_divisor);
OUTREG(VCLK_POST_DIV, hw->vga_pd);
- OUTREG(DVOB, hw->dvob);
- OUTREG(DVOC, hw->dvoc | SDVO_BORDER_ENABLE);
+ if (hw->dvob & DVO_ENABLE)
+ OUTREG(DVOB, hw->dvob | SDVO_BORDER_ENABLE);
+
+ if (hw->dvob & DVO_ENABLE)
+ OUTREG(DVOC, hw->dvoc | SDVO_BORDER_ENABLE);
OUTREG(0x61204, 0x00000000);
@@ -898,8 +905,13 @@ I830RawRestoreState(ScrnInfoPtr pScrn, I830RegPtr hw)
OUTREG(PIPEACONF, hw->pipe_a_conf);
OUTREG(PIPEBCONF, hw->pipe_b_conf);
- OUTREG(DVOC, hw->dvoc | SDVO_BORDER_ENABLE);
- OUTREG(DVOC, hw->dvoc);
+ if (hw->dvoc & DVO_ENABLE) {
+ OUTREG(DVOC, hw->dvoc);
+ }
+
+ if (hw->dvob & DVO_ENABLE) {
+ OUTREG(DVOB, hw->dvoc);
+ }
OUTREG(VGACNTRL, hw->vgacntrl);