drm/amd/display: fix inputting clk lvl into dml for RN
authorEric Yang <Eric.Yang2@amd.com>
Mon, 20 Jan 2020 17:56:43 +0000 (12:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Feb 2020 20:04:37 +0000 (15:04 -0500)
commita39a58166901f7e72088c5eedbd17e481f0722ea
treef791663da4cac471c663af5c5a2e93492e8d8d73
parent71b81f1275e0b5713fae86004be72719a2fa73b7
drm/amd/display: fix inputting clk lvl into dml for RN

[Why]
Previous logic is only good for 15W parts. Other configuration
need a smarter logic to match clk levels with pp table in the fuse.

[How]
Cache all 8 DPM level's clock data, find lvl that match each pstate
in the pp table and build input into DML base on that

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Signed-off-by: Sung Lee <sung.lee@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h