summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2008-08-11 12:07:32 -0400
committerAdam Jackson <ajax@redhat.com>2008-08-11 12:07:32 -0400
commit9ec36e0c8bd8a4bd7c40569412fc1a21219b5af9 (patch)
treeb864b5e2738ae440a7777805fe1bf474d5092ed3 /src
parent445c2e9ef8fc1d49bbb03e07bf36e0339be16a80 (diff)
Fix DPMS off in the presence of the pipe A quirk.
Still turn off the VGA plane, and also handle the DRI path at the end.
Diffstat (limited to 'src')
-rw-r--r--src/i830_display.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index e1dad03c..622209b9 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -854,44 +854,43 @@ 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);
- /* Disable display plane */
- temp = INREG(dspcntr_reg);
- if ((temp & DISPLAY_PLANE_ENABLE) != 0)
+ /* May need to leave pipe A on */
+ if ((pipe != 0) || (!pI830->quirk_flag & QUIRK_PIPEA_FORCE))
{
- OUTREG(dspcntr_reg, temp & ~DISPLAY_PLANE_ENABLE);
- /* Flush the plane changes */
- OUTREG(dspbase_reg, INREG(dspbase_reg));
- POSTING_READ(dspbase_reg);
- }
+ /* Disable display plane */
+ temp = INREG(dspcntr_reg);
+ if ((temp & DISPLAY_PLANE_ENABLE) != 0)
+ {
+ OUTREG(dspcntr_reg, temp & ~DISPLAY_PLANE_ENABLE);
+ /* Flush the plane changes */
+ OUTREG(dspbase_reg, INREG(dspbase_reg));
+ POSTING_READ(dspbase_reg);
+ }
- if (!IS_I9XX(pI830)) {
- /* Wait for vblank for the disable to take effect */
- i830WaitForVblank(pScrn);
- }
+ if (!IS_I9XX(pI830)) {
+ /* Wait for vblank for the disable to take effect */
+ 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);
- }
+ /* 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);
break;