unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob f2e458215ba2e2c8916a31879eb2a6c615e5cdc6 1993 bytes (raw)
name: gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
From 0ae242ebcee68a9b02f466b00ff46944390d80cd Mon Sep 17 00:00:00 2001
From: Guillaume BRUN <the.cheaterman@gmail.com>
Date: Thu, 13 Oct 2022 13:21:53 +0000
Subject: [PATCH 23/73] FROMLIST(v1): drm: bridge: dw_hdmi: fix preference of
 RGB modes over YUV420

Cheap monitors sometimes advertise YUV modes they don't really have
(HDMI specification mandates YUV support so even monitors without actual
support will often wrongfully advertise it) which results in YUV matches
and user forum complaints of a red tint to light colour display areas in
common desktop environments.

Moving the default RGB fall-back before YUV selection results in RGB
mode matching in most cases, reducing complaints.

Fixes: 6c3c719936da ("drm/bridge: synopsys: dw-hdmi: add bus format negociation")
Signed-off-by: Guillaume BRUN <the.cheaterman@gmail.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 40d8ca37f5bc..aa51c61a78c7 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2720,6 +2720,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
 	 * if supported. In any case the default RGB888 format is added
 	 */
 
+	/* Default 8bit RGB fallback */
+	output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
+
 	if (max_bpc >= 16 && info->bpc == 16) {
 		if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
 			output_fmts[i++] = MEDIA_BUS_FMT_YUV16_1X48;
@@ -2753,9 +2756,6 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
 	if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
 		output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
 
-	/* Default 8bit RGB fallback */
-	output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
-
 	*num_output_fmts = i;
 
 	return output_fmts;
-- 
2.17.1


debug log:

solving f2e458215b ...
found f2e458215b in https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/

applying [1/1] https://yhetil.org/guix-patches/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/
diff --git a/gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch b/gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch
new file mode 100644
index 0000000000..f2e458215b

1:34: space before tab in indent.
 	 * if supported. In any case the default RGB888 format is added
1:35: space before tab in indent.
 	 */
1:36: trailing whitespace.
 
1:40: space before tab in indent.
 	if (max_bpc >= 16 && info->bpc == 16) {
1:41: space before tab in indent.
 		if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
Checking patch gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch...
Applied patch gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch cleanly.
warning: squelched 9 whitespace errors
warning: 14 lines add whitespace errors.

index at:
100644 f2e458215ba2e2c8916a31879eb2a6c615e5cdc6	gnu/packages/patches/amlogic-0023-FROMLIST-v1-drm-bridge-dw_hdmi-fix-preference-of-RGB.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).