diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-04 16:35:57 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-08 08:53:25 +1000 |
commit | 2a008d0ccde4ce59a2714e132d5f86a0771e6422 (patch) | |
tree | 51eabe644466b3601d77ebd8497e44e747acc981 /drivers/gpu/drm/radeon/radeon_clocks.c | |
parent | 92cde00cbaf3236ef7ea9bd4f0b43c8c4a3f507f (diff) | |
download | op-kernel-dev-2a008d0ccde4ce59a2714e132d5f86a0771e6422.zip op-kernel-dev-2a008d0ccde4ce59a2714e132d5f86a0771e6422.tar.gz |
drm/radeon/kms: more r4xx lvds fixes
Grab pll ref div from regs at driver init. r4xx seems very
picky about the dividers for the pll driving lvds.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_clocks.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_clocks.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c index 2c541e0..b062109 100644 --- a/drivers/gpu/drm/radeon/radeon_clocks.c +++ b/drivers/gpu/drm/radeon/radeon_clocks.c @@ -106,8 +106,19 @@ void radeon_get_clock_info(struct drm_device *dev) ret = radeon_combios_get_clock_info(dev); if (ret) { - if (p1pll->reference_div < 2) - p1pll->reference_div = 12; + if (p1pll->reference_div < 2) { + if (!ASIC_IS_AVIVO(rdev)) { + u32 tmp = RREG32_PLL(RADEON_PPLL_REF_DIV); + if (ASIC_IS_R300(rdev)) + p1pll->reference_div = + (tmp & R300_PPLL_REF_DIV_ACC_MASK) >> R300_PPLL_REF_DIV_ACC_SHIFT; + else + p1pll->reference_div = tmp & RADEON_PPLL_REF_DIV_MASK; + if (p1pll->reference_div < 2) + p1pll->reference_div = 12; + } else + p1pll->reference_div = 12; + } if (p2pll->reference_div < 2) p2pll->reference_div = 12; if (rdev->family < CHIP_RS600) { |