diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-23 13:21:58 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-09 09:32:28 +1000 |
commit | 0ec0e74f784ca08eab0354ab1dada46924c39b73 (patch) | |
tree | dc2a3d67fc5009f385b43bf9198427ff9050e39c /drivers/gpu/drm/radeon/radeon_combios.c | |
parent | 845db70da0bd285813b25bb522a0281f28efbf89 (diff) |
drm/radeon/kms: add a power state type based on power state flags
The idea is to flag a power state with a certain type and use
that type to decide on what state to select. On r6xx+, we
select a state and then transition between clock modes in that
state. On pre-r6xx, we transition between states directly.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_combios.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_combios.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index eac2174abc5..a4d40de5043 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -2406,6 +2406,8 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) (rdev->pm.power_state[state_index].clock_info[0].sclk > rdev->clock.default_sclk)) goto default_mode; + rdev->pm.power_state[state_index].type = + POWER_STATE_TYPE_BATTERY; misc = RBIOS16(offset + 0x5 + 0x0); if (rev > 4) misc2 = RBIOS16(offset + 0x5 + 0xe); @@ -2467,6 +2469,8 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) default_mode: /* add the default mode */ + rdev->pm.power_state[state_index].type = + POWER_STATE_TYPE_DEFAULT; rdev->pm.power_state[state_index].num_clock_modes = 1; rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; |