Skip to content

Commit

Permalink
radeon: Enable memory reclockong on r600
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Garrett authored and Dave Airlie committed May 18, 2010
1 parent d9932a3 commit 956ac86
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions drivers/gpu/drm/radeon/r600.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,37 +271,36 @@ 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);
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_sync_with_vblank(rdev);
radeon_pm_debug_check_in_vbl(rdev, false);
radeon_pm_prepare(rdev);
radeon_set_memory_clock(rdev, mclk);
Expand All @@ -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;
Expand Down

0 comments on commit 956ac86

Please sign in to comment.