From: Wooyeon Kim Date: Tue, 14 Aug 2018 07:50:22 +0000 (+0900) Subject: [COMMON] fimc-is: fix a bug TDNR mode setting at each other instance X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=923f76f44877be7514675e2ddeb4515d89bba4e4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is: fix a bug TDNR mode setting at each other instance - if device is used a multi-instance, TDNR mode should set 2DNR mode as other instance is operated PR JIRA ID: CPR-166 Change-Id: I25254bcf4a2579cdbd4b16609a3257d42fa6392a Signed-off-by: Wooyeon Kim --- 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 f79a34d5f435..f12941d8fe7f 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 @@ -857,6 +857,7 @@ config: msdbg_hw(2, "shot: mcsc_out_st[0x%lx]\n", instance, hw_ip, mcsc_out_st); + hw_mcsc->instance = instance; clear_bit(MCSC_RST_CHK, &mcsc_out_st); set_bit(HW_CONFIG, &hw_ip->state); @@ -957,7 +958,6 @@ int fimc_is_hw_mcsc_update_param(struct fimc_is_hw_ip *hw_ip, control_cmd = true; msdbg_hw(2, "update_param: hw_ip->instance(%d), control_cmd(%d)\n", instance, hw_ip, hw_mcsc->instance, control_cmd); - hw_mcsc->instance = instance; } if (control_cmd || (lindex & LOWBIT_OF(PARAM_MCS_INPUT)) 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 1eabaaac9dd5..218ca9dd4bee 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 @@ -188,12 +188,14 @@ static int fimc_is_hw_mcsc_check_tdnr_mode_pre(struct fimc_is_hw_ip *hw_ip, * 2. head group shot count is "0"(first shot) * 3. tdnr wdma size changed * 4. tdnr wdma dma out disabled - * 5. setfile tuneset changed(TODO) + * 5. instance is changed + * 6. setfile tuneset changed(TODO) */ if ((cur_mode == TDNR_MODE_BYPASS) || (!atomic_read(&head->scount)) || (lindex & LOWBIT_OF(PARAM_MCS_INPUT)) - || (hindex & HIGHBIT_OF(PARAM_MCS_INPUT))) + || (hindex & HIGHBIT_OF(PARAM_MCS_INPUT)) + || (atomic_read(&hw_ip->instance) != hw_mcsc->instance)) tdnr_mode = TDNR_MODE_2DNR; /* first frame */ else /* set to 3DNR mode */