]> git.baikalelectronics.ru Git - kernel.git/commit
drm/edid: Always set RGB444
authorMaxime Ripard <maxime@cerno.tech>
Thu, 3 Feb 2022 11:54:16 +0000 (12:54 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 23 Feb 2022 13:12:01 +0000 (14:12 +0100)
commita8efff9348296ea0af96166d7578f32477df70a3
treee76c431b8d8bec303ffb0b7751b2890e99b9df33
parentb2bd55a5f73c7745432bed47c1f289fe7875b06f
drm/edid: Always set RGB444

In order to fill the drm_display_info structure each time an EDID is
read, the code currently will call drm_add_display_info with the parsed
EDID.

drm_add_display_info will then call drm_reset_display_info to reset all
the fields to 0, and then set them to the proper value depending on the
EDID.

In the color_formats case, we will thus report that we don't support any
color format, and then fill it back with RGB444 plus the additional
formats described in the EDID Feature Support byte.

However, since that byte only contains format-related bits since the 1.4
specification, this doesn't happen if the EDID is following an earlier
specification. In turn, it means that for one of these EDID, we end up
with color_formats set to 0.

The EDID 1.3 specification never really specifies what it means by RGB
exactly, but since both HDMI and DVI will use RGB444, it's fairly safe
to assume it's supposed to be RGB444.

Let's move the addition of RGB444 to color_formats earlier in
drm_add_display_info() so that it's always set for a digital display.

Fixes: 8500834831f5 ("drm: parse color format support for digital displays")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reported-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220203115416.1137308-1-maxime@cerno.tech
drivers/gpu/drm/drm_edid.c