diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-23 13:21:58 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-08 18:32:28 -0500 |
commit | 0ec0e74f784ca08eab0354ab1dada46924c39b73 (patch) | |
tree | dc2a3d67fc5009f385b43bf9198427ff9050e39c /drivers/gpu/drm/radeon/radeon_pm.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_pm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 6eb0e0b3264b..93ba0fb27e9d 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -40,6 +40,14 @@ static const char *pm_state_names[4] = { | |||
40 | "PM_STATE_ACTIVE" | 40 | "PM_STATE_ACTIVE" |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static const char *pm_state_types[5] = { | ||
44 | "Default", | ||
45 | "Powersave", | ||
46 | "Battery", | ||
47 | "Balanced", | ||
48 | "Performance", | ||
49 | }; | ||
50 | |||
43 | static void radeon_print_power_mode_info(struct radeon_device *rdev) | 51 | static void radeon_print_power_mode_info(struct radeon_device *rdev) |
44 | { | 52 | { |
45 | int i, j; | 53 | int i, j; |
@@ -51,7 +59,9 @@ static void radeon_print_power_mode_info(struct radeon_device *rdev) | |||
51 | is_default = true; | 59 | is_default = true; |
52 | else | 60 | else |
53 | is_default = false; | 61 | is_default = false; |
54 | DRM_INFO("State %d %s\n", i, is_default ? "(default)" : ""); | 62 | DRM_INFO("State %d %s %s\n", i, |
63 | pm_state_types[rdev->pm.power_state[i].type], | ||
64 | is_default ? "(default)" : ""); | ||
55 | if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP)) | 65 | if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP)) |
56 | DRM_INFO("\t%d PCIE Lanes\n", rdev->pm.power_state[i].non_clock_info.pcie_lanes); | 66 | DRM_INFO("\t%d PCIE Lanes\n", rdev->pm.power_state[i].non_clock_info.pcie_lanes); |
57 | DRM_INFO("\t%d Clock Mode(s)\n", rdev->pm.power_state[i].num_clock_modes); | 67 | DRM_INFO("\t%d Clock Mode(s)\n", rdev->pm.power_state[i].num_clock_modes); |