]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fallback to clocks which meet requested voltage on DCN31
authorMichael Strauss <michael.strauss@amd.com>
Thu, 21 Oct 2021 17:27:16 +0000 (13:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 02:04:32 +0000 (22:04 -0400)
commit51e4c918375ddf19e122b32b61410b8c3036a67e
tree4e5b969ac2cd97e6848015d90243ffb3c42a575f
parent2b5aca9dea39a128c91f8ed5c0c12d7aa17bebf8
drm/amd/display: Fallback to clocks which meet requested voltage on DCN31

[WHY]
On certain configs, SMU clock table voltages don't match which cause parser
to behave incorrectly by leaving dcfclk and socclk table entries unpopulated.

[HOW]
Currently the function that finds the corresponding clock for a given voltage
only checks for exact voltage level matches. In the case that no match gets
found, parser now falls back to searching for the max clock which meets the
requested voltage (i.e. its corresponding voltage is below requested).

Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c