]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Prevent bandwidth overflow
authorChris Park <Chris.Park@amd.com>
Wed, 25 Nov 2020 01:11:25 +0000 (20:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Dec 2020 15:06:39 +0000 (10:06 -0500)
commit478940de224a7b3c33cdf7443709b7ba1700aaf7
tree08b953461a1ab0f2aac9946c2664ae59559edfbf
parentd8aa046a6f1d211d4f63a6ae7c314df57a04257d
drm/amd/display: Prevent bandwidth overflow

[Why]
At very high pixel clock, bandwidth calculation exceeds 32 bit size
and overflow value. This causes the resulting selection of link rate
to be inaccurate.

[How]
Change order of operation and use fixed point to deal with integer
accuracy. Also address bug found when forcing link rate.

Signed-off-by: Chris Park <Chris.Park@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c