summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@airlied-rhel5.(none)>2010-04-21 11:06:02 +1000
committerDave Airlie <airlied@airlied-rhel5.(none)>2010-04-21 11:06:02 +1000
commite51b9e297c1f6a27f1f87466899a8b56592c4703 (patch)
tree3c50befc70b53fb9ff4d7284660722eb1b44a04c
parentbbfd78c580e491426b7b52ec185174b9846af4a2 (diff)
intel-2.2.1-disable-planes.patch
-rw-r--r--src/i830_display.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index b2f4d079..41f43987 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -740,12 +740,12 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
/* Give the overlay scaler a chance to disable if it's on this pipe */
i830_crtc_dpms_video(crtc, FALSE);
- /* May need to leave pipe A on */
- if ((pipe == 0) && (pI830->quirk_flag & QUIRK_PIPEA_FORCE))
- return;
-
- /* Disable the VGA plane that we never use */
- OUTREG(VGACNTRL, VGA_DISP_DISABLE);
+ /*
+ * The documentation says :
+ * - Disable planes (VGA or hires)
+ * - Disable pipe
+ * - Disable VGA display
+ */
/* Disable display plane */
temp = INREG(dspcntr_reg);
@@ -762,24 +762,33 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
i830WaitForVblank(pScrn);
}
- /* Next, disable display pipes */
- temp = INREG(pipeconf_reg);
- if ((temp & PIPEACONF_ENABLE) != 0) {
- OUTREG(pipeconf_reg, temp & ~PIPEACONF_ENABLE);
- POSTING_READ(pipeconf_reg);
- }
+ /* May need to leave pipe A on */
+ if ((pipe != 0) || !(pI830->quirk_flag & QUIRK_PIPEA_FORCE))
+ {
+ /* Next, disable display pipes */
+ temp = INREG(pipeconf_reg);
+ if ((temp & PIPEACONF_ENABLE) != 0) {
+ OUTREG(pipeconf_reg, temp & ~PIPEACONF_ENABLE);
+ POSTING_READ(pipeconf_reg);
+ }
- /* Wait for vblank for the disable to take effect. */
- i830WaitForVblank(pScrn);
+ /* Wait for vblank for the disable to take effect. */
+ i830WaitForVblank(pScrn);
- temp = INREG(dpll_reg);
- if ((temp & DPLL_VCO_ENABLE) != 0) {
- OUTREG(dpll_reg, temp & ~DPLL_VCO_ENABLE);
- POSTING_READ(dpll_reg);
+ temp = INREG(dpll_reg);
+ if ((temp & DPLL_VCO_ENABLE) != 0) {
+ OUTREG(dpll_reg, temp & ~DPLL_VCO_ENABLE);
+ POSTING_READ(dpll_reg);
+ }
+
+ /* Wait for the clocks to turn off. */
+ usleep(150);
}
- /* Wait for the clocks to turn off. */
- usleep(150);
+ /* Disable the VGA plane that we never use. */
+ OUTREG(VGACNTRL, VGA_DISP_DISABLE);
+ i830WaitForVblank(pScrn);
+
break;
}