aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/rv770_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-12-19 13:48:36 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-12-24 17:55:26 -0500
commita3f112451567546feece4c3513a42478bfaae3f2 (patch)
tree24328e761320dc31fcabbf32b5e37256093822fb /drivers/gpu/drm/radeon/rv770_dpm.c
parenta4643ba340a3bc5aadd0037085dd3621c53639ba (diff)
drm/radeon/dpm: add late_enable for rv7xx-NI
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/rv770_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/rv770_dpm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index 913b025ae9b3..024e34f82d6b 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -1986,6 +1986,28 @@ int rv770_dpm_enable(struct radeon_device *rdev)
return 0;
}
+int rv770_dpm_late_enable(struct radeon_device *rdev)
+{
+ int ret;
+
+ if (rdev->irq.installed &&
+ r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) {
+ PPSMC_Result result;
+
+ ret = rv770_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);
+ result = rv770_send_msg_to_smc(rdev, PPSMC_MSG_EnableThermalInterrupt);
+
+ if (result != PPSMC_Result_OK)
+ DRM_DEBUG_KMS("Could not enable thermal interrupts.\n");
+ }
+
+ return 0;
+}
+
void rv770_dpm_disable(struct radeon_device *rdev)
{
struct rv7xx_power_info *pi = rv770_get_pi(rdev);