From 5d6673f8df93d9367e59a3428142b9ff3c5b3a0d Mon Sep 17 00:00:00 2001 From: Sunmi Lee Date: Sun, 17 Jun 2018 18:04:57 +0900 Subject: [PATCH] [COMMON] fimc-is2: Code cleanup of tdnr in mcsc Change-Id: I8cfd832f6e6007bfd33179f91deb35e61ebc6d8a Signed-off-by: Sunmi Lee --- .../exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c | 5 +---- .../platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c | 3 +++ .../platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c index bf0a212079a5..679f449234aa 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c @@ -829,10 +829,7 @@ config: fimc_is_scaler_set_lfro_mode_enable(hw_ip->regs, hardware->hw_fro_en, frame->num_buffers); ret_internal = fimc_is_hw_mcsc_update_dsvra_register(hw_ip, head, mcs_param, instance, frame->shot); - - /* setting for TDNR */ - if (cap->tdnr == MCSC_CAP_SUPPORT) - ret = fimc_is_hw_mcsc_update_tdnr_register(hw_ip, frame, param, start_flag); + ret_internal = fimc_is_hw_mcsc_update_tdnr_register(hw_ip, frame, param, start_flag); /* setting for YSUM */ if (cap->ysum == MCSC_CAP_SUPPORT) { diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c index 9ebf749ac643..6045befb8d98 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c @@ -987,6 +987,9 @@ int fimc_is_hw_mcsc_update_tdnr_register(struct fimc_is_hw_ip *hw_ip, hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info; cap = GET_MCSC_HW_CAP(hw_ip); + if (cap->tdnr != MCSC_CAP_SUPPORT) + return ret; + /* init tdnr setting */ if (start_flag) fimc_is_hw_mcsc_tdnr_init(hw_ip, mcs_param, frame->instance); diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c index f616f81fe047..e32b82e99193 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c @@ -919,6 +919,9 @@ int fimc_is_hw_mcsc_update_tdnr_register(struct fimc_is_hw_ip *hw_ip, hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info; cap = GET_MCSC_HW_CAP(hw_ip); + if (cap->tdnr != MCSC_CAP_SUPPORT) + return ret; + head = hw_ip->group[frame->instance]->head; tdnr_mode = fimc_is_hw_mcsc_check_tdnr_mode_pre(hw_ip, head, -- 2.20.1