drm/amd/display: Try YCbCr420 color when YCbCr444 fails
authorWerner Sembach <wse@tuxedocomputers.com>
Wed, 17 Mar 2021 15:13:48 +0000 (16:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:30 +0000 (14:47 +0200)
commitd721702f8a823628d40fe675c56989288b0e7d7b
tree8229c01979d20b18650b2bda6f493236e95279d4
parentf26f33a40952a7d6a5ec7a361d495a1163d3aba1
drm/amd/display: Try YCbCr420 color when YCbCr444 fails

[ Upstream commit 68eb3ae3c63708f823aeeb63bb15197c727bd9bf ]

When encoder validation of a display mode fails, retry with less bandwidth
heavy YCbCr420 color mode, if available. This enables some HDMI 1.4 setups
to support 4k60Hz output, which previously failed silently.

On some setups, while the monitor and the gpu support display modes with
pixel clocks of up to 600MHz, the link encoder might not. This prevents
YCbCr444 and RGB encoding for 4k60Hz, but YCbCr420 encoding might still be
possible. However, which color mode is used is decided before the link
encoder capabilities are checked. This patch fixes the problem by retrying
to find a display mode with YCbCr420 enforced and using it, if it is
valid.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c