From a2215aaca1830591136e493524814e1d061fd707 Mon Sep 17 00:00:00 2001 From: Wooyeon Kim Date: Thu, 7 Jun 2018 10:13:55 +0900 Subject: [PATCH] [COMMON] fimc-is2: modified to get tdnr_enable by setfile - If tdnr_enable is false in TDNR setfile, set to not enabled Change-Id: I8d84cfa9bbcebc8c7458cfb86c15bd02f9282ecf Signed-off-by: Wooyeon Kim --- .../exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v2.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 3719347d5555..4c0020c856f3 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 @@ -123,20 +123,31 @@ static int fimc_is_hw_mcsc_check_tdnr_mode_pre(struct fimc_is_hw_ip *hw_ip, struct fimc_is_hw_mcsc *hw_mcsc; struct fimc_is_hw_mcsc_cap *cap = GET_MCSC_HW_CAP(hw_ip); u32 lindex, hindex; +#ifdef MCSC_DNR_USE_TUNING + enum exynos_sensor_position sensor_position; + tdnr_setfile_contents *tdnr_tuneset; +#endif + bool setfile_tdnr_enable = true; BUG_ON(!hw_ip->priv_info); BUG_ON(!tpu_param); BUG_ON(!cap); hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info; - /* bypass setting at below case * 1. dnr_bypass parameter is true * 2. internal shot + * 3. mcsc setfile "tdnr_enable" is "0" */ +#ifdef MCSC_DNR_USE_TUNING + sensor_position = hw_ip->hardware->sensor_position[atomic_read(&hw_ip->instance)]; + tdnr_tuneset = &hw_mcsc->applied_setfile[sensor_position]->tdnr_contents; + setfile_tdnr_enable = tdnr_tuneset->tdnr_enable; +#endif if ((tpu_param->config.tdnr_bypass == true) - || (frame->type == SHOT_TYPE_INTERNAL)) { + || (frame->type == SHOT_TYPE_INTERNAL) + || setfile_tdnr_enable == false) { tdnr_mode = TDNR_MODE_BYPASS; } else { lindex = frame->shot->ctl.vendor_entry.lowIndexParam; -- 2.20.1