drm/amd/display: Fix dml20v2_ModeSupportAndSystemConfigurationFull() to check DesiredBPP.
authorBing Guo <bing.guo@amd.com>
Thu, 7 Jan 2021 22:39:13 +0000 (17:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Jan 2021 21:38:21 +0000 (16:38 -0500)
commit4ef37e2703d97878a44687878cc7145777da335e
treeb4cb5b47c55747ec6a93491a2106a69c9b74b141
parent64ff0882426e563ff19d6068cb674594c95b6aa8
drm/amd/display: Fix dml20v2_ModeSupportAndSystemConfigurationFull() to check DesiredBPP.

Why:
dml20v2_ModeSupportAndSystemConfigurationFull() didn't check against
DesiredBPP, so it doesn't work correctly when DesiredBPP can't be satisfied.

How:
Port the TruncToValidBPP() version from display_mode_vba_21.c to
display_mode_vba_20v2.c.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Bing Guo <bing.guo@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Anson Jacob <anson.jacob@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c