vdin: The picture received by the screenshot is the previous frame [1/1]
authorzhiwei.yuan <zhiwei.yuan@amlogic.com>
Wed, 16 Oct 2019 07:16:11 +0000 (15:16 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Thu, 17 Oct 2019 06:16:57 +0000 (23:16 -0700)
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 <zhiwei.yuan@amlogic.com>
drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c

index 6bfab70..5f2ef5e 100644 (file)
@@ -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 {