1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00
openmptcprouter/6.12/target/linux/bcm27xx/patches-6.12/950-0556-drm-connector-hdmi-Attempt-YUV422-output-if-RGB-isn-.patch
Ycarus (Yannick Chabanois) bdb9b0046f Add bcm27xx 6.12 test support
2024-12-20 14:17:26 +01:00

29 lines
999 B
Diff

From 094f00cecb3d55917c1bc0e63a8b549627b108ad Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
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 <dave.stevenson@raspberrypi.com>
---
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;