From 26a6a1ba6bea0720a069958e3795feb16679fd35 Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Fri, 1 Jun 2018 15:22:30 +0900 Subject: [PATCH] [COMMON] fimc-is2: Check too fast H/W frame handling condition When it receives the frame end interrupt callback from DDK, driver must compare the current frame count from DDK and the selected H/W frame's fcount. If the fcount of frame is too earlier than frame count from DDK, it should be skipped for the correct frame end interrupt callback. Change-Id: I1f0a5543e2f7e35027373401e1fe8c2c2f3294c1 Signed-off-by: Sanghoon Lee --- .../exynos/fimc-is2/interface/fimc-is-interface-ddk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ddk.c b/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ddk.c index e203a7163104..46f926c2a921 100644 --- a/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ddk.c +++ b/drivers/media/platform/exynos/fimc-is2/interface/fimc-is-interface-ddk.c @@ -101,6 +101,12 @@ flush_wait_done_frame: framemgr_x_barrier_common(framemgr, 0, flags); fimc_is_hardware_frame_ndone(hw_ip, frame, frame->instance, IS_SHOT_INVALID_FRAMENUMBER); goto flush_wait_done_frame; + } else if (unlikely(frame->fcount > expected_fcount)) { + mswarn_hw("%s:[F%d] Too early frame. Skip it.", + instance_id, hw_ip, + __func__, frame->fcount); + framemgr_x_barrier_common(framemgr, 0, flags); + return true; } } else { framemgr_x_barrier_common(framemgr, 0, flags); -- 2.20.1