drm/amd/display: add a check for display depth validity
authorMikita Lipski <mikita.lipski@amd.com>
Tue, 3 Jul 2018 13:42:51 +0000 (09:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:40:04 +0000 (16:40 -0500)
commit400443e894c5a7f63f3ace3664640ec3ea4e1585
treecfdfa2dd5f365091a34d0b6b64722a74a589db2b
parentfe61a2f1a57fea5d7b3d27d019fa67e1bc5b7079
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

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