summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/kv_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-12-19 23:03:36 +0400
committerAlex Deucher <alexander.deucher@amd.com>2013-12-25 02:56:34 +0400
commitd8852c3446ddeab300c4ae397d658b8715535102 (patch)
tree1bf0d6b336fd5ac99a83d3988c2627be16285d41 /drivers/gpu/drm/radeon/kv_dpm.c
parent902084278b96a8ac6b541152130f5d7a4cd307b5 (diff)
downloadlinux-d8852c3446ddeab300c4ae397d658b8715535102.tar.xz
drm/radeon/dpm: add late_enable for KB/KV
Make sure interrupts are enabled before we enable thermal interrupts. Also, don't powergate uvd, etc. until after the ring tests. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/kv_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/kv_dpm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index a0e20eb963db..eced97975952 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -1238,6 +1238,30 @@ int kv_dpm_enable(struct radeon_device *rdev)
return ret;
}
+int kv_dpm_late_enable(struct radeon_device *rdev)
+{
+ int ret;
+
+ if (rdev->irq.installed &&
+ r600_is_internal_thermal_sensor(rdev->pm.int_thermal_type)) {
+ ret = kv_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX);
+ if (ret) {
+ DRM_ERROR("kv_set_thermal_temperature_range failed\n");
+ return ret;
+ }
+ rdev->irq.dpm_thermal = true;
+ radeon_irq_set(rdev);
+ }
+
+ /* powerdown unused blocks for now */
+ kv_dpm_powergate_acp(rdev, true);
+ kv_dpm_powergate_samu(rdev, true);
+ kv_dpm_powergate_vce(rdev, true);
+ kv_dpm_powergate_uvd(rdev, true);
+
+ return ret;
+}
+
void kv_dpm_disable(struct radeon_device *rdev)
{
kv_smc_bapm_enable(rdev, false);