From 43742ddcd5cc8753c667edb3ab7adebe7fcb6619 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 10 Sep 2014 16:06:13 -0400 Subject: [PATCH] drm/radeon: force perf level and enable dpm on rv6xx by default The automatic clock changes with auto seem to cause stability issues on some boards, so enable dpm, but force the performance level to high. This seems to be stable and provides lower power usage due to clockgating, etc. bug: https://bugs.freedesktop.org/show_bug.cgi?id=66963 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_pm.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 164898b..52559c3 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -1215,7 +1215,22 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev) /* default to balanced state */ rdev->pm.dpm.state = POWER_STATE_TYPE_BALANCED; rdev->pm.dpm.user_state = POWER_STATE_TYPE_BALANCED; - rdev->pm.dpm.forced_level = RADEON_DPM_FORCED_LEVEL_AUTO; + /* Force performance level to high on 6xx since auto is unstable + * on some boards. This is equivalent to no dpm, clock-wise, but + * saves power due to clockgating, etc. + */ + switch (rdev->family) { + case CHIP_RV610: + case CHIP_RV630: + case CHIP_RV620: + case CHIP_RV635: + case CHIP_RV670: + rdev->pm.dpm.forced_level = RADEON_DPM_FORCED_LEVEL_HIGH; + break; + default: + rdev->pm.dpm.forced_level = RADEON_DPM_FORCED_LEVEL_AUTO; + break; + } rdev->pm.default_sclk = rdev->clock.default_sclk; rdev->pm.default_mclk = rdev->clock.default_mclk; rdev->pm.current_sclk = rdev->clock.default_sclk; @@ -1291,11 +1306,6 @@ int radeon_pm_init(struct radeon_device *rdev) { /* enable dpm on rv6xx+ */ switch (rdev->family) { - case CHIP_RV610: - case CHIP_RV630: - case CHIP_RV620: - case CHIP_RV635: - case CHIP_RV670: case CHIP_RS780: case CHIP_RS880: case CHIP_RV770: @@ -1311,6 +1321,11 @@ int radeon_pm_init(struct radeon_device *rdev) else rdev->pm.pm_method = PM_METHOD_PROFILE; break; + case CHIP_RV610: + case CHIP_RV630: + case CHIP_RV620: + case CHIP_RV635: + case CHIP_RV670: case CHIP_RV730: case CHIP_RV710: case CHIP_RV740: -- 1.8.3.1