video: drain and hold frame when pattern broken. [1/1]
authorshuanglong.wang <shuanglong.wang@amlogic.com>
Tue, 9 Oct 2018 09:33:14 +0000 (17:33 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 9 Jan 2019 06:31:12 +0000 (22:31 -0800)
commit28b444e049f234af4b310da4cee366ebf26a0a73
tree46e1b52ff966a2e428053381f44cc0e530fb2242
parentc18fc768d3b9648c8058c8bdba8772c254ebe7fd
video: drain and hold frame when pattern broken. [1/1]

PD#SWPL-795

Problem:
video video caton

Solution:
1. For 23.97 and 29.97fps, broken patten case, such as 2323..2233..2323
(23.97), 222..2213(2)22(29.97) will hold one sync to toggle.
For 23.97 and 29.97fps, broken patten case, such as 2323..233223...2323
(23.97), 222..223122...22(29.97), will drain frame one sync to toggle.
2. For 24 and 30fps, every 16.6s will occur pattern broken, one frame
will display less vsync. For 24, will happen 22221222, for 30, will
happen 3232223232. Here will escape one sync and also hold one sync to
ensure pattern detection not broken, which others will lead patten
broken, and nothold or drain frame, then frame frezee or lost will
happen.
3. add pts-trace debug. Follow command could help debug video av sync.
     echo 0x400000 > /sys/module/amvideo/parameters/debug_flag
     echo 1,1,1 > /sys/kernel/debug/video/pts_log_enable
   Above command will print too many debug info, you can use follow
     echo 0 > /proc/sys/kernel/printk && dmesg -c > /dev/null
     dmesg > kernel.log

Verify:
verify by p212

Change-Id: Icc03faec772937c273ca74be67f5c52ae25fea39
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
drivers/amlogic/media/video_sink/video.c
drivers/amlogic/media/video_sink/video_priv.h