From eff1812ead4e0bb90a2ed232b1df81ccc61d6897 Mon Sep 17 00:00:00 2001 From: MingLiang Dong Date: Fri, 29 Jun 2018 14:55:50 +0800 Subject: [PATCH] vdin: fix hdmi input hlg video, vpp cannot get hlg flag PD#167991: vdin: fix hdmi input hlg video, vpp cannot get hlg flag Change-Id: I9071d6fd956ea70bcfde7cb781ec687fb0a81021 Signed-off-by: MingLiang Dong --- drivers/amlogic/media/vin/tvin/tvin_global.h | 1 + drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/amlogic/media/vin/tvin/tvin_global.h b/drivers/amlogic/media/vin/tvin/tvin_global.h index 6daecc145925..f5f93e9a43cd 100644 --- a/drivers/amlogic/media/vin/tvin/tvin_global.h +++ b/drivers/amlogic/media/vin/tvin/tvin_global.h @@ -389,6 +389,7 @@ enum tvin_hdr_eotf_e { EOTF_SDR, EOTF_HDR, EOTF_SMPTE_ST_2048, + EOTF_HLG, EOTF_MAX, }; diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c index 86466e2794ba..9a6e5e952684 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_ctl.c @@ -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);