summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/cypress_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-06-28 02:54:46 +0400
committerAlex Deucher <alexander.deucher@amd.com>2013-06-28 03:16:12 +0400
commit5d77d776416a8881e49d42a30e0eaa919fc98ba5 (patch)
tree6dc48c87becb61cbc96d7cd7f8a44f0813ba8fe5 /drivers/gpu/drm/radeon/cypress_dpm.c
parentc70d45536c2e76751dd036951c523e1401eb6e07 (diff)
downloadlinux-5d77d776416a8881e49d42a30e0eaa919fc98ba5.tar.xz
drm/radeon/dpm/rv7xx: restructure code
Needed to properly handle dynamic state adjustment. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/cypress_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/cypress_dpm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index afdb7c7d4e86..2191501ab5fc 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -1930,13 +1930,15 @@ void cypress_dpm_disable(struct radeon_device *rdev)
int cypress_dpm_set_power_state(struct radeon_device *rdev)
{
struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
+ struct radeon_ps *new_ps = rdev->pm.dpm.requested_ps;
+ struct radeon_ps *old_ps = rdev->pm.dpm.current_ps;
rv770_restrict_performance_levels_before_switch(rdev);
if (eg_pi->pcie_performance_request)
cypress_notify_link_speed_change_before_state_change(rdev);
- rv770_set_uvd_clock_before_set_eng_clock(rdev);
+ rv770_set_uvd_clock_before_set_eng_clock(rdev, new_ps, old_ps);
rv770_halt_smc(rdev);
cypress_upload_sw_state(rdev);
@@ -1947,7 +1949,7 @@ int cypress_dpm_set_power_state(struct radeon_device *rdev)
rv770_resume_smc(rdev);
rv770_set_sw_state(rdev);
- rv770_set_uvd_clock_after_set_eng_clock(rdev);
+ rv770_set_uvd_clock_after_set_eng_clock(rdev, new_ps, old_ps);
if (eg_pi->pcie_performance_request)
cypress_notify_link_speed_change_after_state_change(rdev);