From 6dd54e2afb1536bec09fb392e32c173423a4b44c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 20 Apr 2006 17:10:50 +1000 Subject: fixup some issues since updating the clocking --- src/i830_driver.c | 2 +- src/i830_raw.c | 9 +++------ src/i830_sdvo.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/i830_driver.c b/src/i830_driver.c index 7775f873..950e7151 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2346,7 +2346,7 @@ void I830DetectMonitors(ScrnInfoPtr pScrn) case I830_OUTPUT_SDVO: if (pI830->output[i].sdvo_drv->found) { - I830SDVOSetupDDC(pI830->output[i].sdvo_drv); + I830SDVOSetupDDC(pI830->output[i].sdvo_drv, 2); pI830->output[i].MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, pI830->output[i].pI2CBus); diff --git a/src/i830_raw.c b/src/i830_raw.c index 316cfcf0..7deb06d9 100644 --- a/src/i830_raw.c +++ b/src/i830_raw.c @@ -208,7 +208,7 @@ calc_pll_params(int index, int clock, if (p_max > pll->max_p) p_max = pll->max_p; - if (clock < pll->ref_clk) + if (clock < pll->ref_clk/2) { *flags |= I830_MFLAG_DOUBLE; } @@ -651,18 +651,15 @@ I830ProgramModeReg(ScrnInfoPtr pScrn, DisplayModePtr pMode) /* turn off PLL */ tmp = INREG(dpll_reg); - dpll_reg &= ~DPLL_VCO_ENABLE; + tmp &= ~DPLL_VCO_ENABLE; OUTREG(dpll_reg, tmp); /* Set PLL parameters */ - OUTREG(dpll_reg, *dpll & ~DPLL_VCO_ENABLE); OUTREG(fp0_reg, *fp0); OUTREG(fp1_reg, *fp1); /* Enable PLL */ - tmp = INREG(dpll_reg); - tmp |= DPLL_VCO_ENABLE; - OUTREG(dpll_reg, tmp); + OUTREG(dpll_reg, *dpll); /* Set DVOs B/C */ OUTREG(DVOB, hw->dvob); diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index 92550a18..beaf4e59 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -174,7 +174,7 @@ I830SDVOSetupDDC(I830SDVOPtr s, int enable) memset(s->sdvo_regs, 0, 9); s->sdvo_regs[0x08] = 0x7a; - s->sdvo_regs[0x07] = 0x02; + s->sdvo_regs[0x07] = enable; I830SDVOWriteOutputs(s, 7); -- cgit v1.2.3