aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_combios.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-04-22 14:03:55 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 04:20:58 -0400
commita48b9b4edb8bb87deb13b9f088a595cf71457b69 (patch)
tree2cfe4156f911042a6c3943ee98503d452941dd92 /drivers/gpu/drm/radeon/radeon_combios.c
parentbae6b5627387a950a8faf366d6027bd0a7a93078 (diff)
drm/radeon/kms/pm: add asic specific callbacks for getting power state (v2)
This also simplifies the code and enables reclocking with multiple heads active by tracking whether the power states are single or multi-head capable. Eventually, we will want to select a power state based on external factors (AC/DC state, user selection, etc.). (v2) Update for evergreen 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 44198581ba9e..6a9ec8511261 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2368,7 +2368,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
2368 u8 rev, blocks, tmp; 2368 u8 rev, blocks, tmp;
2369 int state_index = 0; 2369 int state_index = 0;
2370 2370
2371 rdev->pm.default_power_state = NULL; 2371 rdev->pm.default_power_state_index = -1;
2372 2372
2373 if (rdev->flags & RADEON_IS_MOBILITY) { 2373 if (rdev->flags & RADEON_IS_MOBILITY) {
2374 offset = combios_get_table_offset(dev, COMBIOS_POWERPLAY_INFO_TABLE); 2374 offset = combios_get_table_offset(dev, COMBIOS_POWERPLAY_INFO_TABLE);
@@ -2441,6 +2441,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
2441 if (rev > 6) 2441 if (rev > 6)
2442 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = 2442 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes =
2443 RBIOS8(offset + 0x5 + 0x10); 2443 RBIOS8(offset + 0x5 + 0x10);
2444 rdev->pm.power_state[state_index].flags = RADEON_PM_SINGLE_DISPLAY_ONLY;
2444 state_index++; 2445 state_index++;
2445 } else { 2446 } else {
2446 /* XXX figure out some good default low power mode for mobility cards w/out power tables */ 2447 /* XXX figure out some good default low power mode for mobility cards w/out power tables */
@@ -2462,12 +2463,12 @@ default_mode:
2462 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = radeon_get_pcie_lanes(rdev); 2463 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = radeon_get_pcie_lanes(rdev);
2463 else 2464 else
2464 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = 16; 2465 rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = 16;
2465 rdev->pm.default_power_state = &rdev->pm.power_state[state_index]; 2466 rdev->pm.power_state[state_index].flags = 0;
2467 rdev->pm.default_power_state_index = state_index;
2466 rdev->pm.num_power_states = state_index + 1; 2468 rdev->pm.num_power_states = state_index + 1;
2467 2469
2468 rdev->pm.current_power_state = rdev->pm.default_power_state; 2470 rdev->pm.current_power_state_index = rdev->pm.default_power_state_index;
2469 rdev->pm.current_clock_mode = 2471 rdev->pm.current_clock_mode_index = 0;
2470 rdev->pm.default_power_state->default_clock_mode;
2471} 2472}
2472 2473
2473void radeon_external_tmds_setup(struct drm_encoder *encoder) 2474void radeon_external_tmds_setup(struct drm_encoder *encoder)