summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-06-27 19:08:23 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 19:40:15 -0400
commit728cf6bb4d0d4723794dabf87b76efa3c36916ab (patch)
tree860b62dcb6d9c3b6ff968e296ef6f9741abfe72e /drivers
parent6e764764d54e05efe04b9eff490dadf662ae44b4 (diff)
drm/radeon/NI: fix TDP adjustment in set_power_state
Fixes hangs with DPM in some cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/ni_dpm.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index 5a43cb592666..777d17e61312 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -3719,7 +3719,7 @@ void ni_dpm_disable(struct radeon_device *rdev)
ni_update_current_ps(rdev, boot_ps);
}
-int ni_power_control_set_level(struct radeon_device *rdev)
+static int ni_power_control_set_level(struct radeon_device *rdev)
{
struct radeon_ps *new_ps = rdev->pm.dpm.requested_ps;
int ret;
@@ -3736,7 +3736,9 @@ int ni_power_control_set_level(struct radeon_device *rdev)
ret = rv770_resume_smc(rdev);
if (ret)
return ret;
- rv770_set_sw_state(rdev);
+ ret = rv770_set_sw_state(rdev);
+ if (ret)
+ return ret;
return 0;
}
@@ -3801,11 +3803,6 @@ int ni_dpm_set_power_state(struct radeon_device *rdev)
DRM_ERROR("ni_program_memory_timing_parameters failed\n");
return ret;
}
- ret = ni_populate_smc_tdp_limits(rdev, new_ps);
- if (ret) {
- DRM_ERROR("ni_populate_smc_tdp_limits failed\n");
- return ret;
- }
ret = rv770_resume_smc(rdev);
if (ret) {
DRM_ERROR("rv770_resume_smc failed\n");
@@ -3828,6 +3825,13 @@ int ni_dpm_set_power_state(struct radeon_device *rdev)
return ret;
}
+ /* update tdp */
+ ret = ni_power_control_set_level(rdev);
+ if (ret) {
+ DRM_ERROR("ni_power_control_set_level failed\n");
+ return ret;
+ }
+
#if 0
/* XXX */
ret = ni_unrestrict_performance_levels_after_switch(rdev);