From 094f00cecb3d55917c1bc0e63a8b549627b108ad Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 21 Nov 2024 18:43:28 +0000 Subject: [PATCH 556/697] drm/connector: hdmi: Attempt YUV422 output if RGB isn't supported Drop from RGB to YUV422 output if RGB couldn't be supported within the defined max_bpc and TMDS rates, and then try dropping max_bpc. Signed-off-by: Dave Stevenson --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c @@ -294,6 +294,11 @@ hdmi_compute_format(const struct drm_con return 0; } + if (hdmi_try_format_bpc(connector, conn_state, mode, bpc, HDMI_COLORSPACE_YUV422)) { + conn_state->hdmi.output_format = HDMI_COLORSPACE_YUV422; + return 0; + } + drm_dbg_kms(dev, "Failed. No Format Supported for that bpc count.\n"); return -EINVAL;