MLK-17703-7: drm: imx: dcss: configure output pipe according to what sink supports
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 23 Mar 2018 13:25:05 +0000 (08:25 -0500)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Output pipe tables' configuration was hardcoded. This patch will allow the output
pipe to be configured according to what the sink supports.

Also, since there's no way to pass gamut and nonlinearity settings from userspace,
configure the input pipe as REC2020/REC2084.

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

index 9746cfd..42da040 100644 (file)
@@ -462,18 +462,13 @@ static void dcss_plane_atomic_update(struct drm_plane *plane,
                          drm_mode_vrefresh(&crtc_state->mode));
 
        ipipe_cfg.pixel_format = pixel_format;
-       ipipe_cfg.nl = NL_REC709;
+
+       ipipe_cfg.nl = NL_REC2084;
        ipipe_cfg.pr = PR_FULL;
-       ipipe_cfg.g = G_REC709;
+       ipipe_cfg.g = G_REC2020;
 
        dcss_crtc_get_opipe_cfg(state->crtc, &opipe_cfg);
 
-       /* apparently the other settins that are read from connector are not good,
-        * so hardcode */
-       opipe_cfg.nl = NL_REC709;
-       opipe_cfg.pr = PR_FULL;
-       opipe_cfg.g = G_REC2020;
-
        dcss_hdr10_setup(dcss_plane->dcss, dcss_plane->ch_num,
                         &ipipe_cfg, &opipe_cfg);