diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-04-26 17:01:16 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 18:21:23 +1000 |
commit | 956ac86d9277b7142f0ad3f24f7fbd4beed0777d (patch) | |
tree | ed34428be38b04200f28d4370a127e88e6454f6b /drivers/gpu/drm | |
parent | d9932a3241cc6a9629d6586ec362583cb77d7a29 (diff) |
radeon: Enable memory reclockong on r600
With luck, dynamic memory reclocking on r600 should be stable with
the previous patches. Enable it.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 469130994064..1696cc277d8b 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -271,26 +271,27 @@ void r600_set_power_state(struct radeon_device *rdev, bool static_switch) radeon_pm_misc(rdev); if (static_switch) { - radeon_pm_prepare(rdev); + /* set engine clock */ if (sclk != rdev->pm.current_sclk) { radeon_set_engine_clock(rdev, sclk); rdev->pm.current_sclk = sclk; DRM_INFO("Setting: e: %d\n", sclk); } -#if 0 + /* set memory clock */ if (rdev->asic->set_memory_clock && (mclk != rdev->pm.current_mclk)) { + radeon_pm_prepare(rdev); radeon_set_memory_clock(rdev, mclk); + radeon_pm_finish(rdev); rdev->pm.current_mclk = mclk; DRM_INFO("Setting: m: %d\n", mclk); } -#endif - radeon_pm_finish(rdev); + } else { - /* set engine clock */ + radeon_sync_with_vblank(rdev); + if (sclk != rdev->pm.current_sclk) { - radeon_sync_with_vblank(rdev); radeon_pm_debug_check_in_vbl(rdev, false); radeon_set_engine_clock(rdev, sclk); radeon_pm_debug_check_in_vbl(rdev, true); @@ -298,10 +299,8 @@ void r600_set_power_state(struct radeon_device *rdev, bool static_switch) DRM_INFO("Setting: e: %d\n", sclk); } -#if 0 /* set memory clock */ if (rdev->asic->set_memory_clock && (mclk != rdev->pm.current_mclk)) { - radeon_sync_with_vblank(rdev); radeon_pm_debug_check_in_vbl(rdev, false); radeon_pm_prepare(rdev); radeon_set_memory_clock(rdev, mclk); @@ -310,7 +309,6 @@ void r600_set_power_state(struct radeon_device *rdev, bool static_switch) rdev->pm.current_mclk = mclk; DRM_INFO("Setting: m: %d\n", mclk); } -#endif } rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index; |