From 347f18c67ab95592a7d251c17d6e32e606c79ed4 Mon Sep 17 00:00:00 2001 From: "zhiwei.yuan" Date: Wed, 16 Oct 2019 15:16:11 +0800 Subject: [PATCH] vdin: The picture received by the screenshot is the previous frame [1/1] PD#SWPL-15282 Problem: buf is not updated because of absent receiver Solution: force buf recycle after screen cap stopped Verify: verified by t962x3_ab301 Change-Id: Idc5c354a6d744b11a892ffb3f015a5928706d438 Signed-off-by: zhiwei.yuan --- drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c index 6bfab70..5f2ef5e 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c @@ -855,6 +855,8 @@ int start_tvin_service(int no, struct vdin_parm_s *para) if ((devp->parm.reserved & PARAM_STATE_SCREENCAP) && (devp->parm.reserved & PARAM_STATE_HISTGRAM) && (devp->index == 1)) { + /*always update buf to avoid older data be captured*/ + devp->flags |= VDIN_FLAG_FORCE_RECYCLE; mutex_unlock(&devp->fe_lock); return 0; } else { -- 2.7.4