]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Properly set DCF clock
authorAidan Wood <Aidan.Wood@amd.com>
Fri, 22 Mar 2019 18:21:35 +0000 (14:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:08 +0000 (09:34 -0500)
commit13e2cd8fb8c08e576e4c65ead33fbc18253090b6
treeec41ccd52f1cb4d20e746fa2ba7630ba444b9429
parent2e0a1600b13af3bd3587b4cdd834049a48dcbfb6
drm/amd/display: Properly set DCF clock

[Why]
If num_states == 0 we did update_bound_box which doesn't updated any max
clocks if num_states == 0, therefore we need to do cap_soc_clocks
instead, also SMU cannot set DCF clock to a higher than or equal to freq
than SOC clock

[How]
Add a num_states != 0 check for update_bounding_box to be run, and after
we run get_maximum_sustainable_clocks we now check if the reported max
value of DCF is higher than SOC and if necessary set it to 1000
(becomes 1 after division by 1000) lower than SOC

Signed-off-by: Aidan Wood <Aidan.Wood@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c