]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/edid: Split deep color modes between RGB and YUV444
authorMaxime Ripard <maxime@cerno.tech>
Thu, 20 Jan 2022 15:16:12 +0000 (16:16 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:57:28 +0000 (11:57 +0200)
commit82dc9a4f4f254c52d7d2076af2d4c7f92ebc3b94
tree0df840f15f24cf212720fd638a6e6056d61cd09d
parentcb2c1219faca8090a72df73ca5565de581cbbbf3
drm/edid: Split deep color modes between RGB and YUV444

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit 4adc33f36d80489339f1b43dfeee96bb9ea8e459 ]

The current code assumes that the RGB444 and YUV444 formats are the
same, but the HDMI 2.0 specification states that:

   The three DC_XXbit bits above only indicate support for RGB 4:4:4 at
   that pixel size. Support for YCBCR 4:4:4 in Deep Color modes is
   indicated with the DC_Y444 bit. If DC_Y444 is set, then YCBCR 4:4:4
   is supported for all modes indicated by the DC_XXbit flags.

So if we have YUV444 support and any DC_XXbit flag set but the DC_Y444
flag isn't, we'll assume that we support that deep colour mode for
YUV444 which breaks the specification.

In order to fix this, let's split the edid_hdmi_dc_modes field in struct
drm_display_info into two fields, one for RGB444 and one for YUV444.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: d0c94692e0a3 ("drm/edid: Parse and handle HDMI deep color modes.")
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/20220120151625.594595-4-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit da491fc54e4e387419948840636df15f4a611ec4)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/radeon/radeon_connectors.c
include/drm/drm_connector.h