39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 3f6f9e704daf85eb5f45aba07997c85d927c880f Mon Sep 17 00:00:00 2001
|
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
|
Date: Fri, 17 Sep 2021 20:10:22 +0000
|
|
Subject: [PATCH] prefer 8-bit RGB over YCbCr
|
|
|
|
---
|
|
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
|
index 84cc52858..5db7024de 100644
|
|
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
|
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
|
@@ -2648,6 +2648,10 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
|
output_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30;
|
|
}
|
|
|
|
+ /* Prefer 8-bit RGB over YCbCr formats */
|
|
+ if (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB888_1X24))
|
|
+ output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
|
|
+
|
|
if ((info->color_formats & DRM_COLOR_FORMAT_YCRCB422) &&
|
|
is_tmds_allowed(info, mode, MEDIA_BUS_FMT_UYVY8_1X16))
|
|
output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16;
|
|
@@ -2656,10 +2660,6 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
|
|
is_tmds_allowed(info, mode, MEDIA_BUS_FMT_YUV8_1X24))
|
|
output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
|
|
|
|
- /* Default 8bit RGB fallback */
|
|
- if (is_tmds_allowed(info, mode, MEDIA_BUS_FMT_RGB888_1X24))
|
|
- output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
|
|
-
|
|
*num_output_fmts = i;
|
|
|
|
return output_fmts;
|
|
--
|
|
2.30.2
|
|
|