Skip to content

Commit 90c3905

Browse files
agd5fairlied
authored andcommitted
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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 678e7df commit 90c3905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/radeon/radeon_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int radeon_pm_init(struct radeon_device *rdev)
113113

114114
INIT_DELAYED_WORK(&rdev->pm.idle_work, radeon_pm_idle_work_handler);
115115

116-
if (radeon_dynpm != -1 && radeon_dynpm) {
116+
if ((radeon_dynpm != -1 && radeon_dynpm) && (rdev->pm.num_power_states > 1)) {
117117
rdev->pm.state = PM_STATE_PAUSED;
118118
DRM_INFO("radeon: dynamic power management enabled\n");
119119
}

0 commit comments

Comments
 (0)