MLK-18163-3: drm: imx: hdp: properly check DC bit depth
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Wed, 2 May 2018 10:33:37 +0000 (13:33 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Currently, the code checks if RGB supports 10-bit when it should
actually check that YUV420 supports 10-bit.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit 4064f377b0425fd7ec2c3ed15410ae7fad4077b5)

drivers/gpu/drm/imx/hdp/imx-hdp.c

index b18e222..bfd8394 100644 (file)
@@ -498,7 +498,7 @@ bool imx_hdp_bridge_mode_fixup(struct drm_bridge *bridge,
 
        if (vic == VIC_MODE_97_60Hz &&
            (di->color_formats & DRM_COLOR_FORMAT_YCRCB420) &&
-            di->bpc >= 10) {
+           (di->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)) {
                hdp->bpc = 10;
                hdp->format = YCBCR_4_2_0;
                return true;