From 90c3905950021a9b37ac1a4dd78225881f4c61e4 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 24 Mar 2010 11:32:29 -0400 Subject: [PATCH] drm/radeon/kms/pm: don't enable pm if there is only on power state Just adds overhead when the power state will never change. Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index a137ee2f722c..811126464a7b 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -113,7 +113,7 @@ int radeon_pm_init(struct radeon_device *rdev) INIT_DELAYED_WORK(&rdev->pm.idle_work, radeon_pm_idle_work_handler); - if (radeon_dynpm != -1 && radeon_dynpm) { + if ((radeon_dynpm != -1 && radeon_dynpm) && (rdev->pm.num_power_states > 1)) { rdev->pm.state = PM_STATE_PAUSED; DRM_INFO("radeon: dynamic power management enabled\n"); } -- 2.20.1