drm/amd/display: add a check for display depth validity
authorMikita Lipski <mikita.lipski@amd.com>
Wed, 4 Jul 2018 21:27:56 +0000 (17:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 15:19:53 +0000 (10:19 -0500)
commit413ff0b942481c7ac2e800abbbac5af318a65e61
tree8dd53d78c3d953d14264b79fdd7cb321a36ce057
parenta6311be8f062db5fe93a08a3722fae53a58f2499
drm/amd/display: add a check for display depth validity

[why]
HDMI 2.0 fails to validate 4K@60 timing with 10 bpc
[how]
Adding a helper function that would verify if the display depth
assigned would pass a bandwidth validation.
Drop the display depth by one level till calculated pixel clk
is lower than maximum TMDS clk.

Bugzilla: https://bugs.freedesktop.org/106959

Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c