Skip to content

Commit 72f5b5a

Browse files
Michael Straussalexdeucher
authored andcommitted
drm/amd/display: Check for null fclk voltage when parsing clock table
[WHY] In cases where a clock table is malformed such that fclk entries have frequencies but not voltages listed, we don't catch the error and set clocks to 0 instead of using hardcoded values as we should. [HOW] Add check for clock tables fclk entry's voltage as well Signed-off-by: Michael Strauss <[email protected]> Reviewed-by: Eric Yang <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 6dbebf4 commit 72f5b5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ static void rn_clk_mgr_helper_populate_bw_params(struct clk_bw_params *bw_params
643643
/* Find lowest DPM, FCLK is filled in reverse order*/
644644

645645
for (i = PP_SMU_NUM_FCLK_DPM_LEVELS - 1; i >= 0; i--) {
646-
if (clock_table->FClocks[i].Freq != 0) {
646+
if (clock_table->FClocks[i].Freq != 0 && clock_table->FClocks[i].Vol != 0) {
647647
j = i;
648648
break;
649649
}

0 commit comments

Comments
 (0)