@@ -2053,7 +2053,7 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman
2053
2053
v -> DISPCLKWithoutRamping ,
2054
2054
v -> DISPCLKDPPCLKVCOSpeed );
2055
2055
v -> MaxDispclkRoundedToDFSGranularity = RoundToDFSGranularityDown (
2056
- v -> soc .clock_limits [mode_lib -> soc .num_states ].dispclk_mhz ,
2056
+ v -> soc .clock_limits [mode_lib -> soc .num_states - 1 ].dispclk_mhz ,
2057
2057
v -> DISPCLKDPPCLKVCOSpeed );
2058
2058
if (v -> DISPCLKWithoutRampingRoundedToDFSGranularity
2059
2059
> v -> MaxDispclkRoundedToDFSGranularity ) {
@@ -3958,20 +3958,20 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
3958
3958
for (k = 0 ; k <= v -> NumberOfActivePlanes - 1 ; k ++ ) {
3959
3959
v -> PlaneRequiredDISPCLKWithoutODMCombine = v -> PixelClock [k ] * (1.0 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 )
3960
3960
* (1.0 + v -> DISPCLKRampingMargin / 100.0 );
3961
- if ((v -> PlaneRequiredDISPCLKWithoutODMCombine >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states ]
3962
- && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states ])) {
3961
+ if ((v -> PlaneRequiredDISPCLKWithoutODMCombine >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states - 1 ]
3962
+ && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states - 1 ])) {
3963
3963
v -> PlaneRequiredDISPCLKWithoutODMCombine = v -> PixelClock [k ] * (1 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 );
3964
3964
}
3965
3965
v -> PlaneRequiredDISPCLKWithODMCombine2To1 = v -> PixelClock [k ] / 2 * (1 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 )
3966
3966
* (1 + v -> DISPCLKRampingMargin / 100.0 );
3967
- if ((v -> PlaneRequiredDISPCLKWithODMCombine2To1 >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states ]
3968
- && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states ])) {
3967
+ if ((v -> PlaneRequiredDISPCLKWithODMCombine2To1 >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states - 1 ]
3968
+ && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states - 1 ])) {
3969
3969
v -> PlaneRequiredDISPCLKWithODMCombine2To1 = v -> PixelClock [k ] / 2 * (1 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 );
3970
3970
}
3971
3971
v -> PlaneRequiredDISPCLKWithODMCombine4To1 = v -> PixelClock [k ] / 4 * (1 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 )
3972
3972
* (1 + v -> DISPCLKRampingMargin / 100.0 );
3973
- if ((v -> PlaneRequiredDISPCLKWithODMCombine4To1 >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states ]
3974
- && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states ])) {
3973
+ if ((v -> PlaneRequiredDISPCLKWithODMCombine4To1 >= v -> MaxDispclk [i ] && v -> MaxDispclk [i ] == v -> MaxDispclk [mode_lib -> soc .num_states - 1 ]
3974
+ && v -> MaxDppclk [i ] == v -> MaxDppclk [mode_lib -> soc .num_states - 1 ])) {
3975
3975
v -> PlaneRequiredDISPCLKWithODMCombine4To1 = v -> PixelClock [k ] / 4 * (1 + v -> DISPCLKDPPCLKDSCCLKDownSpreading / 100.0 );
3976
3976
}
3977
3977
0 commit comments