diff --git a/drivers/amlogic/media/enhancement/amvecm/amcsc.c b/drivers/amlogic/media/enhancement/amvecm/amcsc.c index 28c51c812abe..8a12d7ce907b 100644 --- a/drivers/amlogic/media/enhancement/amvecm/amcsc.c +++ b/drivers/amlogic/media/enhancement/amvecm/amcsc.c @@ -6651,10 +6651,21 @@ void update_hdr10_plus_pkt(bool enable, } else { if (!vdev) return; - vdev->fresh_tx_hdr_pkt( - &cur_send_info); - vdev->fresh_tx_hdr10plus_pkt(0, - &cur_hdr10plus_params); + if ((get_dolby_vision_policy() == + DOLBY_VISION_FOLLOW_SINK) && + sink_support_hdr(vinfo) && + (!sink_support_dolby_vision(vinfo))) { + pr_csc(2, "update_hdr10_plus_pkt: DISABLE_VSIF\n"); + vdev->fresh_tx_hdr10plus_pkt( + HDR10_PLUS_DISABLE_VSIF, + &cur_hdr10plus_params); + } else { + pr_csc(2, "update_hdr10_plus_pkt: ZERO_VSIF\n"); + vdev->fresh_tx_hdr_pkt(send_info); + vdev->fresh_tx_hdr10plus_pkt( + HDR10_PLUS_ZERO_VSIF, + &cur_hdr10plus_params); + } hdr10_plus_pkt_update = HDRPLUS_PKT_IDLE; pr_csc(2, "update_hdr10_plus_pkt off\n"); } diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c index e43210ddd90b..e008025fecb3 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c @@ -867,14 +867,9 @@ static void Edid_ParsingVendSpec(struct rx_cap *prxcap, unsigned char *dat = buf; unsigned char pos = 0; unsigned int ieeeoui = 0; + u8 length = 0; - memset(dv, 0, sizeof(struct dv_info)); - memset(hdr10_plus, 0, sizeof(struct hdr10_plus_info)); - - dv->block_flag = CORRECT; - dv->length = dat[pos] & 0x1f; - hdr10_plus->length = dat[pos] & 0x1f; - memcpy(dv->rawdata, dat, dv->length + 1); + length = dat[pos] & 0x1f; pos++; if (dat[pos] != 1) { @@ -887,9 +882,12 @@ static void Edid_ParsingVendSpec(struct rx_cap *prxcap, ieeeoui = dat[pos++]; ieeeoui += dat[pos++] << 8; ieeeoui += dat[pos++] << 16; + pr_info("Edid_ParsingVendSpec:ieeeoui=0x%x,len=%u\n", ieeeoui, length); /*HDR10+ use vsvdb*/ if (ieeeoui == HDR10_PLUS_IEEE_OUI) { + memset(hdr10_plus, 0, sizeof(struct hdr10_plus_info)); + hdr10_plus->length = length; hdr10_plus->ieeeoui = ieeeoui; hdr10_plus->application_version = dat[pos] & 0x3; pos++; @@ -900,6 +898,12 @@ static void Edid_ParsingVendSpec(struct rx_cap *prxcap, dv->block_flag = ERROR_OUI; return; } + +/* it is a Dovi block*/ + memset(dv, 0, sizeof(struct dv_info)); + dv->block_flag = CORRECT; + dv->length = length; + memcpy(dv->rawdata, dat, dv->length + 1); dv->ieeeoui = ieeeoui; dv->ver = (dat[pos] >> 5) & 0x7; if ((dv->ver) > 2) {