diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-05-27 17:01:42 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-02 23:13:31 -0400 |
commit | 84d88f4c92763f519b9e081cdd685a44de14f8c0 (patch) | |
tree | 834d7913e13edd5a58bafe4e6c6773f52c4a9ea9 /drivers/gpu | |
parent | 92645879d07a48897fe8888c2e37607aa1189cc9 (diff) |
drm/radeon/kms/pm: voltage fixes
- Enable GPIO voltage for non pm modes as well so resetting
the default voltage works.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_combios.c | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 42bcaf41b8c4..4305cd55d0ac 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -1538,7 +1538,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1538 | rdev->pm.power_state[state_index].pcie_lanes = | 1538 | rdev->pm.power_state[state_index].pcie_lanes = |
1539 | power_info->info.asPowerPlayInfo[i].ucNumPciELanes; | 1539 | power_info->info.asPowerPlayInfo[i].ucNumPciELanes; |
1540 | misc = le32_to_cpu(power_info->info.asPowerPlayInfo[i].ulMiscInfo); | 1540 | misc = le32_to_cpu(power_info->info.asPowerPlayInfo[i].ulMiscInfo); |
1541 | if (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) { | 1541 | if ((misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) || |
1542 | (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH)) { | ||
1542 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = | 1543 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = |
1543 | VOLTAGE_GPIO; | 1544 | VOLTAGE_GPIO; |
1544 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = | 1545 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = |
@@ -1605,7 +1606,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1605 | power_info->info_2.asPowerPlayInfo[i].ucNumPciELanes; | 1606 | power_info->info_2.asPowerPlayInfo[i].ucNumPciELanes; |
1606 | misc = le32_to_cpu(power_info->info_2.asPowerPlayInfo[i].ulMiscInfo); | 1607 | misc = le32_to_cpu(power_info->info_2.asPowerPlayInfo[i].ulMiscInfo); |
1607 | misc2 = le32_to_cpu(power_info->info_2.asPowerPlayInfo[i].ulMiscInfo2); | 1608 | misc2 = le32_to_cpu(power_info->info_2.asPowerPlayInfo[i].ulMiscInfo2); |
1608 | if (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) { | 1609 | if ((misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) || |
1610 | (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH)) { | ||
1609 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = | 1611 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = |
1610 | VOLTAGE_GPIO; | 1612 | VOLTAGE_GPIO; |
1611 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = | 1613 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = |
@@ -1679,7 +1681,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1679 | power_info->info_3.asPowerPlayInfo[i].ucNumPciELanes; | 1681 | power_info->info_3.asPowerPlayInfo[i].ucNumPciELanes; |
1680 | misc = le32_to_cpu(power_info->info_3.asPowerPlayInfo[i].ulMiscInfo); | 1682 | misc = le32_to_cpu(power_info->info_3.asPowerPlayInfo[i].ulMiscInfo); |
1681 | misc2 = le32_to_cpu(power_info->info_3.asPowerPlayInfo[i].ulMiscInfo2); | 1683 | misc2 = le32_to_cpu(power_info->info_3.asPowerPlayInfo[i].ulMiscInfo2); |
1682 | if (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) { | 1684 | if ((misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT) || |
1685 | (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH)) { | ||
1683 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = | 1686 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = |
1684 | VOLTAGE_GPIO; | 1687 | VOLTAGE_GPIO; |
1685 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = | 1688 | rdev->pm.power_state[state_index].clock_info[0].voltage.gpio = |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 7b5e10d3e9c9..102c744eaf5a 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -2454,7 +2454,12 @@ default_mode: | |||
2454 | rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; | 2454 | rdev->pm.power_state[state_index].clock_info[0].mclk = rdev->clock.default_mclk; |
2455 | 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; |
2456 | 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]; |
2457 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; | 2457 | if ((state_index > 0) && |
2458 | (rdev->pm.power_state[0].clock_info[0].voltage.type = VOLTAGE_GPIO)) | ||
2459 | rdev->pm.power_state[state_index].clock_info[0].voltage = | ||
2460 | rdev->pm.power_state[0].clock_info[0].voltage; | ||
2461 | else | ||
2462 | rdev->pm.power_state[state_index].clock_info[0].voltage.type = VOLTAGE_NONE; | ||
2458 | rdev->pm.power_state[state_index].pcie_lanes = 16; | 2463 | rdev->pm.power_state[state_index].pcie_lanes = 16; |
2459 | rdev->pm.power_state[state_index].flags = 0; | 2464 | rdev->pm.power_state[state_index].flags = 0; |
2460 | rdev->pm.default_power_state_index = state_index; | 2465 | rdev->pm.default_power_state_index = state_index; |