Commit 845db70d authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Dave Airlie

drm/radeon/kms: don't set pcie lanes for ignored power_state

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 56278a8e
...@@ -1593,10 +1593,6 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) ...@@ -1593,10 +1593,6 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
le16_to_cpu(power_info->info_4.usNonClockInfoArrayOffset) + le16_to_cpu(power_info->info_4.usNonClockInfoArrayOffset) +
(power_state->ucNonClockStateIndex * (power_state->ucNonClockStateIndex *
power_info->info_4.ucNonClockSize)); power_info->info_4.ucNonClockSize));
misc = le32_to_cpu(non_clock_info->ulCapsAndSettings);
rdev->pm.power_state[state_index].non_clock_info.pcie_lanes =
((misc & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >>
ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
for (j = 0; j < (power_info->info_4.ucStateEntrySize - 1); j++) { for (j = 0; j < (power_info->info_4.ucStateEntrySize - 1); j++) {
if (rdev->flags & RADEON_IS_IGP) { if (rdev->flags & RADEON_IS_IGP) {
struct _ATOM_PPLIB_RS780_CLOCK_INFO *clock_info = struct _ATOM_PPLIB_RS780_CLOCK_INFO *clock_info =
...@@ -1654,7 +1650,11 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) ...@@ -1654,7 +1650,11 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
} }
rdev->pm.power_state[state_index].num_clock_modes = mode_index; rdev->pm.power_state[state_index].num_clock_modes = mode_index;
if (mode_index) { if (mode_index) {
misc = le32_to_cpu(non_clock_info->ulCapsAndSettings);
misc2 = le16_to_cpu(non_clock_info->usClassification); misc2 = le16_to_cpu(non_clock_info->usClassification);
rdev->pm.power_state[state_index].non_clock_info.pcie_lanes =
((misc & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >>
ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
if (misc2 & ATOM_PPLIB_CLASSIFICATION_BOOT) { if (misc2 & ATOM_PPLIB_CLASSIFICATION_BOOT) {
rdev->pm.default_power_state = &rdev->pm.power_state[state_index]; rdev->pm.default_power_state = &rdev->pm.power_state[state_index];
rdev->pm.current_power_state = &rdev->pm.power_state[state_index]; rdev->pm.current_power_state = &rdev->pm.power_state[state_index];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment