diff options
author | Dave Airlie <airlied@linux.ie> | 2007-12-01 06:49:59 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-12-01 06:49:59 +1000 |
commit | d9858a2b3744b99003cfb9f31b743a2d31b322e9 (patch) | |
tree | b7b134d687c8d4405d795ad54fedf85bc8769c25 /src/atombios_crtc.c | |
parent | e1945f1f25a34310bd58ce128c8ff27ecc985618 (diff) |
radeon: add in pll spread spectrum workaround
Diffstat (limited to 'src/atombios_crtc.c')
-rw-r--r-- | src/atombios_crtc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c index a2f0291..5c2d261 100644 --- a/src/atombios_crtc.c +++ b/src/atombios_crtc.c @@ -229,6 +229,7 @@ atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode) { RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; RADEONInfoPtr info = RADEONPTR(crtc->scrn); + unsigned char *RADEONMMIO = info->MMIO; int index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); int sclock = mode->Clock; uint16_t ref_div = 0, fb_div = 0; @@ -241,7 +242,17 @@ atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode) RADEONSavePtr save = &info->ModeReg; if (IS_AVIVO_VARIANT) { + CARD32 temp; PLLCalculate(crtc->scrn, sclock, &ref_div, &fb_div, &post_div); + + /* disable spread spectrum clocking for now -- thanks Hedy Lamarr */ + if (radeon_crtc->crtc_id == 0) { + temp = INREG(AVIVO_P1PLL_INT_SS_CNTL); + OUTREG(AVIVO_P1PLL_INT_SS_CNTL, temp & ~1); + } else { + temp = INREG(AVIVO_P2PLL_INT_SS_CNTL); + OUTREG(AVIVO_P2PLL_INT_SS_CNTL, temp & ~1); + } } else { sclock = save->dot_clock_freq * 10; fb_div = save->feedback_div; |