From: Wooyeon Kim Date: Fri, 1 Jun 2018 07:24:56 +0000 (+0900) Subject: [COMMON] fimc-is2: fix a TDNR wrong caculation bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6fec989b99a67932006d51eeb9b962ce40af867;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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 {