diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-04-22 14:25:19 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:08 -0400 |
commit | 79daedc942813c0417ff5e277da6f7f35705cde5 (patch) | |
tree | 36f08e83553eb048066fc0374da971aa8861d3ec /drivers/gpu/drm/radeon/radeon_combios.c | |
parent | d91eeb7862a4a5f7c5c92b953fa69d2f1430e840 (diff) |
drm/radeon/kms: minor pm cleanups
- remove non_clock_info struct
- track power state misc flags
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 | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 6a9ec8511261..c22344b7fc58 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -2382,17 +2382,13 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) | |||
2382 | if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || | 2382 | if ((rdev->pm.power_state[state_index].clock_info[0].mclk == 0) || |
2383 | (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) | 2383 | (rdev->pm.power_state[state_index].clock_info[0].sclk == 0)) |
2384 | goto default_mode; | 2384 | goto default_mode; |
2385 | /* skip overclock modes for now */ | ||
2386 | if ((rdev->pm.power_state[state_index].clock_info[0].mclk > | ||
2387 | rdev->clock.default_mclk + RADEON_MODE_OVERCLOCK_MARGIN) || | ||
2388 | (rdev->pm.power_state[state_index].clock_info[0].sclk > | ||
2389 | rdev->clock.default_sclk + RADEON_MODE_OVERCLOCK_MARGIN)) | ||
2390 | goto default_mode; | ||
2391 | rdev->pm.power_state[state_index].type = | 2385 | rdev->pm.power_state[state_index].type = |
2392 | POWER_STATE_TYPE_BATTERY; | 2386 | POWER_STATE_TYPE_BATTERY; |
2393 | misc = RBIOS16(offset + 0x5 + 0x0); | 2387 | misc = RBIOS16(offset + 0x5 + 0x0); |
2394 | if (rev > 4) | 2388 | if (rev > 4) |
2395 | misc2 = RBIOS16(offset + 0x5 + 0xe); | 2389 | misc2 = RBIOS16(offset + 0x5 + 0xe); |
2390 | rdev->pm.power_state[state_index].misc = misc; | ||
2391 | rdev->pm.power_state[state_index].misc2 = misc2; | ||
2396 | if (misc & 0x4) { | 2392 | if (misc & 0x4) { |
2397 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; | 2393 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_GPIO; |
2398 | if (misc & 0x8) | 2394 | if (misc & 0x8) |
@@ -2439,7 +2435,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) | |||
2439 | } else | 2435 | } else |
2440 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; | 2436 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; |
2441 | if (rev > 6) | 2437 | if (rev > 6) |
2442 | rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = | 2438 | rdev->pm.power_state[state_index].pcie_lanes = |
2443 | RBIOS8(offset + 0x5 + 0x10); | 2439 | RBIOS8(offset + 0x5 + 0x10); |
2444 | rdev->pm.power_state[state_index].flags = RADEON_PM_SINGLE_DISPLAY_ONLY; | 2440 | rdev->pm.power_state[state_index].flags = RADEON_PM_SINGLE_DISPLAY_ONLY; |
2445 | state_index++; | 2441 | state_index++; |
@@ -2459,10 +2455,7 @@ default_mode: | |||
2459 | rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; | 2455 | rdev->pm.power_state[state_index].clock_info[0].sclk = rdev->clock.default_sclk; |
2460 | rdev->pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_info[0]; | 2456 | rdev->pm.power_state[state_index].default_clock_mode = &rdev->pm.power_state[state_index].clock_info[0]; |
2461 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; | 2457 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; |
2462 | if (rdev->asic->get_pcie_lanes) | 2458 | rdev->pm.power_state[state_index].pcie_lanes = 16; |
2463 | rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = radeon_get_pcie_lanes(rdev); | ||
2464 | else | ||
2465 | rdev->pm.power_state[state_index].non_clock_info.pcie_lanes = 16; | ||
2466 | rdev->pm.power_state[state_index].flags = 0; | 2459 | rdev->pm.power_state[state_index].flags = 0; |
2467 | rdev->pm.default_power_state_index = state_index; | 2460 | rdev->pm.default_power_state_index = state_index; |
2468 | rdev->pm.num_power_states = state_index + 1; | 2461 | rdev->pm.num_power_states = state_index + 1; |