summaryrefslogtreecommitdiff
path: root/src/i830_sdvo.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@bouzouki.jf.intel.com>2006-12-14 16:51:48 -0800
committerKeith Packard <keithp@bouzouki.jf.intel.com>2006-12-14 16:51:48 -0800
commit082519f34b468d0c5aa08db74ff2b51cf411d743 (patch)
treeb077b64434d519ff085e514444cb520c2d371a29 /src/i830_sdvo.c
parent55e7a32096a58f7bb2380b04df6b3dd9dc8e5b6a (diff)
Turn pll/pipe/plane on in crtc_set_mode
Instead of delaying pll/pipe/plane enables to the dpms function, turn them on right away in the crtc_set_mode function. To avoid rewriting these registers in the subsequent dpms function, check each register written there to see if the enable bit is already on and don't rewrite.
Diffstat (limited to 'src/i830_sdvo.c')
-rw-r--r--src/i830_sdvo.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index fc17efde..d19b8b04 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -679,26 +679,31 @@ i830_sdvo_dpms(xf86OutputPtr output, int mode)
I830OutputPrivatePtr intel_output = output->driver_private;
struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
I830Ptr pI830 = I830PTR(pScrn);
+ CARD32 temp;
if (mode != DPMSModeOn) {
i830_sdvo_set_active_outputs(output, 0);
- OUTREG(dev_priv->output_device,
- INREG(dev_priv->output_device) & ~SDVO_ENABLE);
+ temp = INREG(dev_priv->output_device);
+ if ((temp & SDVO_ENABLE) != 0)
+ OUTREG(dev_priv->output_device, temp & ~SDVO_ENABLE);
} else {
Bool input1, input2;
int i;
CARD8 status;
- OUTREG(dev_priv->output_device,
- INREG(dev_priv->output_device) | SDVO_ENABLE);
+ temp = INREG(dev_priv->output_device);
+ if ((temp & SDVO_ENABLE) == 0)
+ OUTREG(dev_priv->output_device, temp | SDVO_ENABLE);
i830_sdvo_set_active_outputs(output, dev_priv->active_outputs);
+#if 0
/* Do it again! If we remove this below register write, or the exact
* same one 2 lines up, the mac mini SDVO output doesn't turn on.
*/
OUTREG(dev_priv->output_device,
INREG(dev_priv->output_device) | SDVO_ENABLE);
+#endif
for (i = 0; i < 2; i++)
i830WaitForVblank(pScrn);