From b6fec989b99a67932006d51eeb9b962ce40af867 Mon Sep 17 00:00:00 2001 From: Wooyeon Kim Date: Fri, 1 Jun 2018 16:24:56 +0900 Subject: [PATCH] [COMMON] fimc-is2: fix a TDNR wrong caculation bug - when NI is set to same setfile NI value, it is not applied to right value. PR JIRA ID: CPR-40 Change-Id: Id1cae98d3731d2e874f71435eea4f49280e6971c Signed-off-by: Wooyeon Kim --- .../platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h index 5f5c9e6dedad..4380be08384a 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h @@ -19,8 +19,9 @@ #define INTERPOLATE_NUMERATOR(Y1, Y2, diff_x_x1) \ ((((Y2) - (Y1)) * (diff_x_x1)) << INTERPOLATE_SHIFT) #define GET_LINEAR_INTERPOLATE_VALUE(Y1, Y2, diff_x2_x1, diff_x_x1) \ - (((INTERPOLATE_NUMERATOR((int)Y1, (int)Y2, diff_x_x1)) / (diff_x2_x1)) + \ - (((int)(Y1) << INTERPOLATE_SHIFT))) + (diff_x2_x1) ? (((INTERPOLATE_NUMERATOR((int)Y1, (int)Y2, diff_x_x1)) / (diff_x2_x1)) + \ + (((int)(Y1) << INTERPOLATE_SHIFT))) : \ + (int)(Y1) << INTERPOLATE_SHIFT #define RESTORE_SHIFT_VALUE(value) ((int)(value) >> INTERPOLATE_SHIFT) enum tdnr_mode { -- 2.20.1