From: rongrong zhou Date: Wed, 6 Mar 2019 09:59:28 +0000 (+0800) Subject: ptsserv: fix pts lookup fail issue [3/3] X-Git-Tag: hardkernel-4.9.236-104~1627 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7da1a0d3647489319b08f2d2109f61ffb51bd9b;p=platform%2Fkernel%2Flinux-amlogic.git ptsserv: fix pts lookup fail issue [3/3] PD#SWPL-3730 Problem: playback not smooth Solution: if p2 lookup fail, set p2 = p Verify: verified by x301 Change-Id: I181eae2ba40edd937df12e0925c2a55c856162ba Signed-off-by: rongrong zhou --- diff --git a/drivers/amlogic/media/frame_sync/ptsserv.c b/drivers/amlogic/media/frame_sync/ptsserv.c index dde139f..82e1213 100644 --- a/drivers/amlogic/media/frame_sync/ptsserv.c +++ b/drivers/amlogic/media/frame_sync/ptsserv.c @@ -752,6 +752,11 @@ static int pts_lookup_offset_inline_locked(u8 type, u32 offset, u32 *val, p2 = p; } + /* if p2 lookup fail, set p2 = p */ + if (type == PTS_TYPE_VIDEO && p2 && p && + OFFSET_DIFF(offset, p2->offset) > lookup_threshold && + OFFSET_DIFF(offset, p->offset) < lookup_threshold) + p2 = p; } else if (OFFSET_LATER(p->offset, offset)) { list_for_each_entry_continue_reverse(p, &pTable->