From 97d8a70bb0df8b2579ef542ab84f655aeaddc59b Mon Sep 17 00:00:00 2001 From: "zhiwei.yuan" Date: Tue, 14 May 2019 18:39:10 +0800 Subject: [PATCH] vdin: cvbs video is not smooth after playing a period of time [1/1] PD#SWPL-8565 Problem: unknown buf be taken by vpp sometimes Solution: fix skip mechanism, reduce numeber of unknown buf Verify: verified by t962x2_x301 Change-Id: I296d9f2f5c25a37ec32b458ecb23d64ca8c321a7 Signed-off-by: zhiwei.yuan --- drivers/amlogic/media/vin/tvin/vdin/vdin_vf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_vf.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_vf.c index 2bdd0e1..9f8bda6 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_vf.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_vf.c @@ -1018,10 +1018,10 @@ void vdin_vf_disp_mode_update(struct vf_entry *vfe, struct vf_pool *p) p->disp_index[0] = 0; vfe->vf.index_disp = p->disp_index[0]; - if (p->disp_mode[p->disp_index[p->skip_vf_num]] != - VFRAME_DISP_MODE_SKIP) - p->disp_mode[p->disp_index[p->skip_vf_num]] = - VFRAME_DISP_MODE_OK; + for (i = p->skip_vf_num; i > 0 && (i < VFRAME_DISP_MAX_NUM); i--) + if (p->disp_mode[p->disp_index[i]] != VFRAME_DISP_MODE_SKIP) + p->disp_mode[p->disp_index[i]] = VFRAME_DISP_MODE_OK; + p->disp_mode[p->disp_index[0]] = VFRAME_DISP_MODE_UNKNOWN; } /*skip all from current -- 2.7.4