diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-03-26 19:01:05 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 19:16:49 -0400 |
commit | c3efac0d5b728daac457421b5fe1494169457568 (patch) | |
tree | 6fb8cae75f970a3ba50ee2cfd979b99013f14c18 /drivers/gpu/drm/radeon/trinity_dpm.c | |
parent | 2c47b063a0d41b8bf7e95d2cae76698298b9b02f (diff) |
drm/radeon/dpm/trinity: 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/trinity_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/trinity_dpm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index b2dc905c5815..fce825e112ff 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c | |||
@@ -1062,6 +1062,7 @@ static void trinity_update_requested_ps(struct radeon_device *rdev, | |||
1062 | int trinity_dpm_enable(struct radeon_device *rdev) | 1062 | int trinity_dpm_enable(struct radeon_device *rdev) |
1063 | { | 1063 | { |
1064 | struct trinity_power_info *pi = trinity_get_pi(rdev); | 1064 | struct trinity_power_info *pi = trinity_get_pi(rdev); |
1065 | int ret; | ||
1065 | 1066 | ||
1066 | trinity_acquire_mutex(rdev); | 1067 | trinity_acquire_mutex(rdev); |
1067 | 1068 | ||
@@ -1085,7 +1086,11 @@ int trinity_dpm_enable(struct radeon_device *rdev) | |||
1085 | 1086 | ||
1086 | if (rdev->irq.installed && | 1087 | if (rdev->irq.installed && |
1087 | r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) { | 1088 | r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) { |
1088 | trinity_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); | 1089 | ret = trinity_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX); |
1090 | if (ret) { | ||
1091 | trinity_release_mutex(rdev); | ||
1092 | return ret; | ||
1093 | } | ||
1089 | rdev->irq.dpm_thermal = true; | 1094 | rdev->irq.dpm_thermal = true; |
1090 | radeon_irq_set(rdev); | 1095 | radeon_irq_set(rdev); |
1091 | } | 1096 | } |