vdin: fix hdmi input hlg video, vpp cannot get hlg flag
authorMingLiang Dong <mingliang.dong@amlogic.com>
Fri, 29 Jun 2018 06:55:50 +0000 (14:55 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 2 Jul 2018 08:19:23 +0000 (01:19 -0700)
PD#167991: vdin: fix hdmi input hlg video, vpp cannot get hlg flag

Change-Id: I9071d6fd956ea70bcfde7cb781ec687fb0a81021
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
drivers/amlogic/media/vin/tvin/tvin_global.h
drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c

index 6daecc1..f5f93e9 100644 (file)
@@ -389,6 +389,7 @@ enum tvin_hdr_eotf_e {
        EOTF_SDR,
        EOTF_HDR,
        EOTF_SMPTE_ST_2048,
+       EOTF_HLG,
        EOTF_MAX,
 };
 
index 86466e2..9a6e5e9 100644 (file)
@@ -3939,6 +3939,16 @@ void vdin_set_drm_data(struct vdin_dev_s *devp,
                                        (vf->signal_type & (~0xFF00)));
                                vf->signal_type = ((9 << 0) |
                                        (vf->signal_type & (~0xFF)));
+                       } else if (devp->prop.hdr_info.hdr_data.eotf ==
+                                       EOTF_HLG) {
+                               vf->signal_type |= (1 << 29);
+                               vf->signal_type |= (0 << 25);/*0:limit*/
+                               vf->signal_type = ((9 << 16) |
+                                       (vf->signal_type & (~0xFF0000)));
+                               vf->signal_type = ((14 << 8) |
+                                       (vf->signal_type & (~0xFF00)));
+                               vf->signal_type = ((9 << 0) |
+                                       (vf->signal_type & (~0xFF)));
                        } else {
                                vf->signal_type &= ~(1 << 29);
                                vf->signal_type &= ~(1 << 25);