drm/amd/display: Fix clock table filling logic
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Mon, 26 Apr 2021 18:27:38 +0000 (14:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:10:49 +0000 (18:10 -0400)
commitc31bef1cb1203b26f901a511a3246204cfaf8a57
tree68af19ffec33060e5c94fc84ad4f8136104de60e
parentebc22cbdc058d474210343ec87955711546183ad
drm/amd/display: Fix clock table filling logic

[Why]
Currently, the code that fills the clock table can miss filling
information about some of the higher voltage states advertised
by the SMU. This, in turn, may cause some of the higher pixel clock
modes (e.g. 8k60) to fail validation.

[How]
Fill the table with one entry per DCFCLK level instead of one entry
per FCLK level. This is needed because the maximum FCLK does not
necessarily need maximum voltage, whereas DCFCLK values from SMU
cover the full voltage range.

Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c