Skip to content

Commit d3d6b1b

Browse files
Cheatermansuperna9999
authored andcommitted
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: 6c3c719 ("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> Reviewed-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20221116143523.2126-1-the.cheaterman@gmail.com
1 parent 8c11586 commit d3d6b1b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2720,6 +2720,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
27202720
* if supported. In any case the default RGB888 format is added
27212721
*/
27222722

2723+
/* Default 8bit RGB fallback */
2724+
output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
2725+
27232726
if (max_bpc >= 16 && info->bpc == 16) {
27242727
if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
27252728
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,
27532756
if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
27542757
output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
27552758

2756-
/* Default 8bit RGB fallback */
2757-
output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
2758-
27592759
*num_output_fmts = i;
27602760

27612761
return output_fmts;

0 commit comments

Comments
 (0)