drm/amd/display: fill in clock values when DPM is not enabled
authorSamson Tam <samson.tam@amd.com>
Fri, 9 Sep 2022 21:16:32 +0000 (17:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 27 Sep 2022 22:00:01 +0000 (18:00 -0400)
commit2d3907c152611a0d65efe54b93972320dcce1565
treec4b10f6cf37817c8d52e5a06f15d81202216d41a
parenta28acf7091babf4248b042326946cee7736f796a
drm/amd/display: fill in clock values when DPM is not enabled

[Why]
For individual feature testing, PMFW may not report all clock
values back. Driver will default them to 0 but this will
cause the BB table to be skipped and default to one state
with max clocks.

[How]
Add helper function to scan through initial clock values and
populate them with default clock limits so that BB table
can be built.
Add dpm_enabled flag to check when DPM is not enabled and
to trigger helper function.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Samson Tam <samson.tam@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/dcn32/dcn32_clk_mgr.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h