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);