summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/btc_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/btc_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/btc_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/btc_dpm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index 3c9a9b55fc62..e4609fe2228e 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -2233,6 +2233,8 @@ void btc_dpm_reset_asic(struct radeon_device *rdev)
int btc_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;
btc_apply_state_adjust_rules(rdev);
@@ -2243,7 +2245,7 @@ int btc_dpm_set_power_state(struct radeon_device *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);
btc_set_at_for_uvd(rdev);
if (eg_pi->smu_uvd_hs)
@@ -2257,7 +2259,7 @@ int btc_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);