From: Alex Deucher Date: Wed, 24 Mar 2010 15:32:29 +0000 (-0400) Subject: drm/radeon/kms/pm: don't enable pm if there is only on power state X-Git-Tag: v2.6.35-rc1~18^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90c3905950021a9b37ac1a4dd78225881f4c61e4;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index a137ee2..8111264 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"); }