aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/trinity_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-12-19 12:03:35 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-12-24 17:55:53 -0500
commitbda44c1ae7980c444814a50330f202c175de34ab (patch)
tree742f7ed1a5c86577a7996d76b87ca640da7e67da /drivers/gpu/drm/radeon/trinity_dpm.c
parent14ec9faba374715823dc48ef991261a7b5279d5e (diff)
drm/radeon/dpm: add late_enable for trinity
Need to wait to enable cg and pg until after ring tests. Also make sure interrupts are enabled before we enable thermal interrupts. 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.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
index d700698a1f22..ee0ce0a423ca 100644
--- a/drivers/gpu/drm/radeon/trinity_dpm.c
+++ b/drivers/gpu/drm/radeon/trinity_dpm.c
@@ -1121,6 +1121,28 @@ int trinity_dpm_enable(struct radeon_device *rdev)
1121 return 0; 1121 return 0;
1122} 1122}
1123 1123
1124int trinity_dpm_late_enable(struct radeon_device *rdev)
1125{
1126 int ret;
1127
1128 trinity_acquire_mutex(rdev);
1129 trinity_enable_clock_power_gating(rdev);
1130
1131 if (rdev->irq.installed &&
1132 r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) {
1133 ret = trinity_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX);
1134 if (ret) {
1135 trinity_release_mutex(rdev);
1136 return ret;
1137 }
1138 rdev->irq.dpm_thermal = true;
1139 radeon_irq_set(rdev);
1140 }
1141 trinity_release_mutex(rdev);
1142
1143 return 0;
1144}
1145
1124void trinity_dpm_disable(struct radeon_device *rdev) 1146void trinity_dpm_disable(struct radeon_device *rdev)
1125{ 1147{
1126 trinity_acquire_mutex(rdev); 1148 trinity_acquire_mutex(rdev);