diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-03-26 19:23:19 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 19:16:52 -0400 |
commit | a172230f1907f073d893ee56ce82593f833722b8 (patch) | |
tree | 6944460939f02f0d806bc94806ab84cf0c5df0dd /drivers/gpu/drm/radeon/rs780_dpm.c | |
parent | ac0cdcb51466d7eb01a248345d73144a66c25cd1 (diff) |
drm/radeon/dpm/rs780: properly catch errors in dpm setup
We weren't properly catching errors in dpm_enable()
and dpm_set_power_state().
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs780_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rs780_dpm.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs780_dpm.c index 8af1a0417c7..e844c737ef7 100644 --- a/drivers/gpu/drm/radeon/rs780_dpm.c +++ b/drivers/gpu/drm/radeon/rs780_dpm.c @@ -546,14 +546,16 @@ int rs780_dpm_enable(struct radeon_device *rdev) { struct igp_power_info *pi = rs780_get_pi(rdev); struct radeon_ps *boot_ps = rdev->pm.dpm.boot_ps; + int ret; rs780_get_pm_mode_parameters(rdev); rs780_disable_vbios_powersaving(rdev); if (r600_dynamicpm_enabled(rdev)) return -EINVAL; - if (rs780_initialize_dpm_parameters(rdev, boot_ps)) - return -EINVAL; + ret = rs780_initialize_dpm_parameters(rdev, boot_ps); + if (ret) + return ret; rs780_start_dpm(rdev); rs780_preset_ranges_slow_clk_fbdiv_en(rdev); @@ -571,7 +573,9 @@ int rs780_dpm_enable(struct radeon_device *rdev) r600_gfx_clockgating_enable(rdev, true); if (rdev->irq.installed && (rdev->pm.int_thermal_type == THERMAL_TYPE_RV6XX)) { - r600_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); + ret = r600_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); + if (ret) + return ret; rdev->irq.dpm_thermal = true; radeon_irq_set(rdev); } @@ -603,6 +607,7 @@ int rs780_dpm_set_power_state(struct radeon_device *rdev) struct igp_power_info *pi = rs780_get_pi(rdev); struct radeon_ps *new_ps = rdev->pm.dpm.requested_ps; struct radeon_ps *old_ps = rdev->pm.dpm.current_ps; + int ret; rs780_get_pm_mode_parameters(rdev); @@ -611,7 +616,9 @@ int rs780_dpm_set_power_state(struct radeon_device *rdev) mdelay(5); } - rs780_set_engine_clock_scaling(rdev, new_ps, old_ps); + ret = rs780_set_engine_clock_scaling(rdev, new_ps, old_ps); + if (ret) + return ret; rs780_set_engine_clock_spc(rdev, new_ps, old_ps); rs780_activate_engine_clk_scaling(rdev, new_ps, old_ps); |