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>
This commit is contained in:
Alex Deucher 2009-12-23 13:21:58 -05:00 committed by Dave Airlie
parent 845db70da0
commit 0ec0e74f78
4 changed files with 102 additions and 1 deletions

View file

@ -40,6 +40,14 @@ static const char *pm_state_names[4] = {
"PM_STATE_ACTIVE"
};
static const char *pm_state_types[5] = {
"Default",
"Powersave",
"Battery",
"Balanced",
"Performance",
};
static void radeon_print_power_mode_info(struct radeon_device *rdev)
{
int i, j;
@ -51,7 +59,9 @@ static void radeon_print_power_mode_info(struct radeon_device *rdev)
is_default = true;
else
is_default = false;
DRM_INFO("State %d %s\n", i, is_default ? "(default)" : "");
DRM_INFO("State %d %s %s\n", i,
pm_state_types[rdev->pm.power_state[i].type],
is_default ? "(default)" : "");
if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP))
DRM_INFO("\t%d PCIE Lanes\n", rdev->pm.power_state[i].non_clock_info.pcie_lanes);
DRM_INFO("\t%d Clock Mode(s)\n", rdev->pm.power_state[i].num_clock_modes);