summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rs780_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-04-12 20:04:10 +0200
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 16:50:08 +0200
commit4a6369e9935e392402d4ccb67f5cddac953e8d3c (patch)
treec3c9b8585776d91f59bba876e99d56c32de0ad78 /drivers/gpu/drm/radeon/rs780_dpm.c
parentdrm/radeon/kms: add dpm support for rs780/rs880 (diff)
downloadlinux-4a6369e9935e392402d4ccb67f5cddac953e8d3c.tar.xz
linux-4a6369e9935e392402d4ccb67f5cddac953e8d3c.zip
drm/radeon/kms: add dpm support for rv6xx (v3)
This adds dpm support for rv6xx asics. This includes: - clockgating - dynamic engine clock scaling - dynamic memory clock scaling - dynamic voltage scaling - dynamic pcie gen1/gen2 switching Set radeon.dpm=1 to enable. v2: remove duplicate line v3: fix thermal interrupt check noticed by Jerome Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs780_dpm.c')
-rw-r--r--drivers/gpu/drm/radeon/rs780_dpm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs780_dpm.c
index f594900160a0..a1497a6315d6 100644
--- a/drivers/gpu/drm/radeon/rs780_dpm.c
+++ b/drivers/gpu/drm/radeon/rs780_dpm.c
@@ -560,6 +560,12 @@ int rs780_dpm_enable(struct radeon_device *rdev)
if (pi->gfx_clock_gating)
r600_gfx_clockgating_enable(rdev, true);
+ if (rdev->irq.installed && (rdev->pm.int_thermal_type == THERMAL_TYPE_RV6XX)) {
+ r600_set_thermal_temperature_range(rdev, R600_TEMP_RANGE_MIN, R600_TEMP_RANGE_MAX);
+ rdev->irq.dpm_thermal = true;
+ radeon_irq_set(rdev);
+ }
+
return 0;
}
@@ -574,6 +580,12 @@ void rs780_dpm_disable(struct radeon_device *rdev)
if (pi->gfx_clock_gating)
r600_gfx_clockgating_enable(rdev, false);
+
+ if (rdev->irq.installed &&
+ (rdev->pm.int_thermal_type == THERMAL_TYPE_RV6XX)) {
+ rdev->irq.dpm_thermal = false;
+ radeon_irq_set(rdev);
+ }
}
int rs780_dpm_set_power_state(struct radeon_device *rdev)