From bb6d653e81f109e02cb4619af42f2cd9385fa8b1 Mon Sep 17 00:00:00 2001 From: Brian Zhu Date: Thu, 30 Nov 2023 15:06:39 +0800 Subject: [PATCH] di: need wait pre-link stop when process I frame [1/1] PD#SWPL-148072 Problem: When prelink mode, I frame may be bypassed some frames. But under v4l decode flow, I frame can not be bypassed. Otherwise, it will display garbage. Solution: When prelink mode and v4l decode case, I process flow will wait for prelink stop and not bypass. Verify: Verified on txhd2 Change-Id: I770b278e86c0cb9e89b7bf5ce392de91b4054259 Signed-off-by: Brian Zhu --- drivers/media/di_multi/deinterlace.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/media/di_multi/deinterlace.c b/drivers/media/di_multi/deinterlace.c index b9a53b2fb..5548a6933 100644 --- a/drivers/media/di_multi/deinterlace.c +++ b/drivers/media/di_multi/deinterlace.c @@ -5307,6 +5307,16 @@ unsigned char dim_pre_bypass(struct di_ch_s *pch) return 74; } //pch->sumx.vfm_bypass = true; + + ppre = get_pre_stru(ch); + if (dip_itf_is_ins(pch) && + VFMT_IS_I(vframe->type) && + get_datal()->pre_vpp_active) { + dim_print("%s: waiting for pre-link stop vf:%px idx:%d\n", + __func__, vframe, ppre->in_seq); + return 76; + } + nins = nins_get(pch); if (!nins) return 75; @@ -5315,7 +5325,6 @@ unsigned char dim_pre_bypass(struct di_ch_s *pch) dbg_timer(ch, EDBG_TIMER_PRE_BYPASS_0 + nins->c.cnt); dim_bypass_set(pch, 1, bypassr); - ppre = get_pre_stru(ch); /*mem check*/ memcpy(&ppre->vfm_cpy, vframe, sizeof(ppre->vfm_cpy)); @@ -5546,6 +5555,14 @@ unsigned char dim_pre_de_buf_config(unsigned int channel) return 12; } /**************************************************/ + bypassr = is_bypass2(vframe, channel);//dim_is_bypass(vframe, channel); + if (dip_itf_is_ins(pch) && + VFMT_IS_I(vframe->type) && + get_datal()->pre_vpp_active) { + PR_INF("%s: waiting for pre-link stop vf:%px idx:%d\n", + __func__, vframe, ppre->in_seq); + return 26; + } /*mem check*/ memcpy(&ppre->vfm_cpy, vframe, sizeof(ppre->vfm_cpy)); #ifdef DIM_TB_DETECT @@ -5558,7 +5575,6 @@ unsigned char dim_pre_de_buf_config(unsigned int channel) channel, ECMD_TB_PROC); } #endif - bypassr = is_bypass2(vframe, channel);//dim_is_bypass(vframe, channel); /*2020-12-02: here use di_buf->vframe is err*/ change_type = is_source_change(vframe, channel); if (change_type)