[COMMON] fimc-is2: Fix a bug of calling get_meta function in case of NDONE frame
authorSunmi Lee <carrotsm.lee@samsung.com>
Fri, 15 Jun 2018 01:58:24 +0000 (10:58 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:01 +0000 (17:05 +0900)
Change-Id: I69b67190199790cf38ce825773926c2a9482fb6b
Signed-off-by: Sunmi Lee <carrotsm.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.c

index bbc34e13da4b29b3d4f0bf1aa3bc9fddcb0c64cb..b994ea0fde790261a6b58e51b5219db9c16f756b 100644 (file)
@@ -1047,13 +1047,14 @@ int fimc_is_hardware_get_meta(struct fimc_is_hw_ip *hw_ip, struct fimc_is_frame
 
        FIMC_BUG(!hw_ip);
 
-       if ((output_id != FIMC_IS_HW_CORE_END)
-               && (done_type == IS_SHOT_SUCCESS)
-               && (test_bit(hw_ip->id, &frame->core_flag))) {
+       if (((output_id != FIMC_IS_HW_CORE_END) && (done_type == IS_SHOT_SUCCESS)
+                       && (test_bit(hw_ip->id, &frame->core_flag)))
+               || (done_type != IS_SHOT_SUCCESS)) {
                /* FIMC-IS v3.x only
                 * There is a chance that the DMA done interrupt occurred before
                 * the core done interrupt. So we skip to call the get_meta function.
                 */
+               /* There is no need to call get_meta function in case of NDONE */
                msdbg_hw(1, "%s: skip to get_meta [F:%d][B:0x%lx][C:0x%lx][O:0x%lx]\n",
                        instance, hw_ip, __func__, frame->fcount,
                        frame->bak_flag, frame->core_flag, frame->out_flag);