@@ -1528,7 +1528,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1528
1528
if ((rdev -> pm .power_state [state_index ].clock_info [0 ].mclk == 0 ) ||
1529
1529
(rdev -> pm .power_state [state_index ].clock_info [0 ].sclk == 0 ))
1530
1530
continue ;
1531
- rdev -> pm .power_state [state_index ].non_clock_info . pcie_lanes =
1531
+ rdev -> pm .power_state [state_index ].pcie_lanes =
1532
1532
power_info -> info .asPowerPlayInfo [i ].ucNumPciELanes ;
1533
1533
misc = le32_to_cpu (power_info -> info .asPowerPlayInfo [i ].ulMiscInfo );
1534
1534
if (misc & ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT ) {
@@ -1550,6 +1550,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1550
1550
power_info -> info .asPowerPlayInfo [i ].ucVoltageDropIndex ;
1551
1551
}
1552
1552
rdev -> pm .power_state [state_index ].flags = RADEON_PM_SINGLE_DISPLAY_ONLY ;
1553
+ rdev -> pm .power_state [state_index ].misc = misc ;
1553
1554
/* order matters! */
1554
1555
if (misc & ATOM_PM_MISCINFO_POWER_SAVING_MODE )
1555
1556
rdev -> pm .power_state [state_index ].type =
@@ -1590,7 +1591,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1590
1591
if ((rdev -> pm .power_state [state_index ].clock_info [0 ].mclk == 0 ) ||
1591
1592
(rdev -> pm .power_state [state_index ].clock_info [0 ].sclk == 0 ))
1592
1593
continue ;
1593
- rdev -> pm .power_state [state_index ].non_clock_info . pcie_lanes =
1594
+ rdev -> pm .power_state [state_index ].pcie_lanes =
1594
1595
power_info -> info_2 .asPowerPlayInfo [i ].ucNumPciELanes ;
1595
1596
misc = le32_to_cpu (power_info -> info_2 .asPowerPlayInfo [i ].ulMiscInfo );
1596
1597
misc2 = le32_to_cpu (power_info -> info_2 .asPowerPlayInfo [i ].ulMiscInfo2 );
@@ -1613,6 +1614,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1613
1614
power_info -> info_2 .asPowerPlayInfo [i ].ucVoltageDropIndex ;
1614
1615
}
1615
1616
rdev -> pm .power_state [state_index ].flags = RADEON_PM_SINGLE_DISPLAY_ONLY ;
1617
+ rdev -> pm .power_state [state_index ].misc = misc ;
1618
+ rdev -> pm .power_state [state_index ].misc2 = misc2 ;
1616
1619
/* order matters! */
1617
1620
if (misc & ATOM_PM_MISCINFO_POWER_SAVING_MODE )
1618
1621
rdev -> pm .power_state [state_index ].type =
@@ -1659,7 +1662,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1659
1662
if ((rdev -> pm .power_state [state_index ].clock_info [0 ].mclk == 0 ) ||
1660
1663
(rdev -> pm .power_state [state_index ].clock_info [0 ].sclk == 0 ))
1661
1664
continue ;
1662
- rdev -> pm .power_state [state_index ].non_clock_info . pcie_lanes =
1665
+ rdev -> pm .power_state [state_index ].pcie_lanes =
1663
1666
power_info -> info_3 .asPowerPlayInfo [i ].ucNumPciELanes ;
1664
1667
misc = le32_to_cpu (power_info -> info_3 .asPowerPlayInfo [i ].ulMiscInfo );
1665
1668
misc2 = le32_to_cpu (power_info -> info_3 .asPowerPlayInfo [i ].ulMiscInfo2 );
@@ -1688,6 +1691,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1688
1691
}
1689
1692
}
1690
1693
rdev -> pm .power_state [state_index ].flags = RADEON_PM_SINGLE_DISPLAY_ONLY ;
1694
+ rdev -> pm .power_state [state_index ].misc = misc ;
1695
+ rdev -> pm .power_state [state_index ].misc2 = misc2 ;
1691
1696
/* order matters! */
1692
1697
if (misc & ATOM_PM_MISCINFO_POWER_SAVING_MODE )
1693
1698
rdev -> pm .power_state [state_index ].type =
@@ -1730,6 +1735,8 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1730
1735
& rdev -> pm .power_state [state_index - 1 ].clock_info [0 ];
1731
1736
rdev -> pm .power_state [state_index ].flags &=
1732
1737
~RADEON_PM_SINGLE_DISPLAY_ONLY ;
1738
+ rdev -> pm .power_state [state_index ].misc = 0 ;
1739
+ rdev -> pm .power_state [state_index ].misc2 = 0 ;
1733
1740
}
1734
1741
} else {
1735
1742
/* add the i2c bus for thermal/fan chip */
@@ -1852,7 +1859,9 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1852
1859
if (mode_index ) {
1853
1860
misc = le32_to_cpu (non_clock_info -> ulCapsAndSettings );
1854
1861
misc2 = le16_to_cpu (non_clock_info -> usClassification );
1855
- rdev -> pm .power_state [state_index ].non_clock_info .pcie_lanes =
1862
+ rdev -> pm .power_state [state_index ].misc = misc ;
1863
+ rdev -> pm .power_state [state_index ].misc2 = misc2 ;
1864
+ rdev -> pm .power_state [state_index ].pcie_lanes =
1856
1865
((misc & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK ) >>
1857
1866
ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT ) + 1 ;
1858
1867
switch (misc2 & ATOM_PPLIB_CLASSIFICATION_UI_MASK ) {
@@ -1902,10 +1911,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev)
1902
1911
rdev -> pm .power_state [state_index ].default_clock_mode =
1903
1912
& rdev -> pm .power_state [state_index ].clock_info [0 ];
1904
1913
rdev -> pm .power_state [state_index ].clock_info [0 ].voltage .type = VOLTAGE_NONE ;
1905
- if (rdev -> asic -> get_pcie_lanes )
1906
- rdev -> pm .power_state [state_index ].non_clock_info .pcie_lanes = radeon_get_pcie_lanes (rdev );
1907
- else
1908
- rdev -> pm .power_state [state_index ].non_clock_info .pcie_lanes = 16 ;
1914
+ rdev -> pm .power_state [state_index ].pcie_lanes = 16 ;
1909
1915
rdev -> pm .default_power_state_index = state_index ;
1910
1916
rdev -> pm .power_state [state_index ].flags = 0 ;
1911
1917
state_index ++ ;
0 commit comments