diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-03-27 02:55:59 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-28 03:16:48 +0400 |
commit | 2c47b063a0d41b8bf7e95d2cae76698298b9b02f (patch) | |
tree | 9946866f1eab1bcf0e7e9b6077a8e3b893aad093 /drivers/gpu/drm/radeon/sumo_dpm.c | |
parent | 1f67df4df78eac28ff6210f1ef74e79f543a7b76 (diff) | |
download | linux-2c47b063a0d41b8bf7e95d2cae76698298b9b02f.tar.xz |
drm/radeon/dpm/sumo: 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/sumo_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/sumo_dpm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c index e6e6e9059a6d..dbad293bfed5 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -1198,11 +1198,14 @@ static void sumo_update_requested_ps(struct radeon_device *rdev, int sumo_dpm_enable(struct radeon_device *rdev) { struct sumo_power_info *pi = sumo_get_pi(rdev); + int ret; if (sumo_dpm_enabled(rdev)) return -EINVAL; - sumo_enable_clock_power_gating(rdev); + ret = sumo_enable_clock_power_gating(rdev); + if (ret) + return ret; sumo_program_bootup_state(rdev); sumo_init_bsp(rdev); sumo_reset_am(rdev); @@ -1228,7 +1231,9 @@ int sumo_dpm_enable(struct radeon_device *rdev) if (rdev->irq.installed && r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) { - sumo_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); + ret = sumo_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); } |