MLK-20788: drm/imx/dcss: fix issue with some HDMI sinks
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 25 Jan 2019 12:43:13 +0000 (14:43 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Apparently, there are HDMI sinks out there that advertise Rec.2020
support in the Colorimetry Data Block but are not HDR capable devices.
In this case, there's no HDR Static metadata data block and EOTF is 0.

This patch will allow setting up the DCSS output pipe non-linearity to
Rec.2020, irrespective of sink's supported EOTF in HDR static metadata.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-crtc.c

index b310ea9..559a274 100644 (file)
@@ -197,7 +197,7 @@ void dcss_crtc_setup_opipe(struct drm_crtc *crtc, struct drm_connector *conn,
        else
                dcss_crtc->opipe_g = G_REC709;
 
-       if ((eotf & (1 << 2)) && dcss_crtc->opipe_g == G_REC2020)
+       if (dcss_crtc->opipe_g == G_REC2020)
                dcss_crtc->opipe_nl = NL_REC2084;
        else if (dcss_crtc->opipe_g == G_ADOBE_ARGB)
                dcss_crtc->opipe_nl = NL_SRGB;