aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-02-21 17:46:30 -0500
committerDave Airlie <airlied@redhat.com>2010-02-22 18:47:38 -0500
commit08ff2a7a7a13c562e81a406722193f43cbb4e4ef (patch)
tree5cee9ad8073bb23c85b197109ded376bc6c4a154 /drivers/gpu/drm/radeon/radeon_pm.c
parent9038dfdf699a3227004f1f6da32a3ef4ef3ba5a4 (diff)
drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state
AtomBIOS tables on non-mobility GPU do not contain POWERSAVE/BATTERY. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 8960acf1415..d174d93c938 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -91,14 +91,24 @@ static struct radeon_power_state * radeon_pick_power_state(struct radeon_device
91 default: 91 default:
92 return rdev->pm.default_power_state; 92 return rdev->pm.default_power_state;
93 case POWER_STATE_TYPE_POWERSAVE: 93 case POWER_STATE_TYPE_POWERSAVE:
94 wanted_types[0] = POWER_STATE_TYPE_POWERSAVE; 94 if (rdev->flags & RADEON_IS_MOBILITY) {
95 wanted_types[1] = POWER_STATE_TYPE_BATTERY; 95 wanted_types[0] = POWER_STATE_TYPE_POWERSAVE;
96 wanted_count = 2; 96 wanted_types[1] = POWER_STATE_TYPE_BATTERY;
97 wanted_count = 2;
98 } else {
99 wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE;
100 wanted_count = 1;
101 }
97 break; 102 break;
98 case POWER_STATE_TYPE_BATTERY: 103 case POWER_STATE_TYPE_BATTERY:
99 wanted_types[0] = POWER_STATE_TYPE_BATTERY; 104 if (rdev->flags & RADEON_IS_MOBILITY) {
100 wanted_types[1] = POWER_STATE_TYPE_POWERSAVE; 105 wanted_types[0] = POWER_STATE_TYPE_BATTERY;
101 wanted_count = 2; 106 wanted_types[1] = POWER_STATE_TYPE_POWERSAVE;
107 wanted_count = 2;
108 } else {
109 wanted_types[0] = POWER_STATE_TYPE_PERFORMANCE;
110 wanted_count = 1;
111 }
102 break; 112 break;
103 case POWER_STATE_TYPE_BALANCED: 113 case POWER_STATE_TYPE_BALANCED:
104 case POWER_STATE_TYPE_PERFORMANCE: 114 case POWER_STATE_TYPE_PERFORMANCE: