From: Sunmi Lee Date: Mon, 18 Jun 2018 11:37:06 +0000 (+0900) Subject: [COMMON] fimc-is2: Removed the redundant variable - hw_mcsc->blk_set_ctrl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4341c2b1c782e9c770c2044eb372fd267e36d167;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: Removed the redundant variable - hw_mcsc->blk_set_ctrl Change-Id: I9e136fc9667bd31d21263e5d6485e0cd4acfa247 Signed-off-by: Sunmi Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.h b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.h index 10debc9187e6..b65b8a7a6399 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.h +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.h @@ -121,6 +121,8 @@ enum fimc_is_hw_state { HW_RUN, HW_TUNESET, HW_VRA_CH1_START, + HW_MCS_YSUM_CFG, + HW_MCS_DS_CFG, HW_OVERFLOW_RECOVERY, HW_END }; 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 0abadc3d0c2d..b4e7c79594b7 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 @@ -330,7 +330,6 @@ static int fimc_is_hw_mcsc_init(struct fimc_is_hw_ip *hw_ip, u32 instance, hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info; hw_mcsc->rep_flag[instance] = flag; - clear_bit(ALL_BLOCK_SET_DONE, &hw_mcsc->blk_set_ctrl[instance]); cap = GET_MCSC_HW_CAP(hw_ip); for (output_id = MCSC_OUTPUT0; output_id < cap->max_output; output_id++) { @@ -389,6 +388,8 @@ static int fimc_is_hw_mcsc_close(struct fimc_is_hw_ip *hw_ip, u32 instance) frame_manager_close(hw_ip->framemgr_late); clear_bit(HW_OPEN, &hw_ip->state); + clear_bit(HW_MCS_YSUM_CFG, &hw_ip->state); + clear_bit(HW_MCS_DS_CFG, &hw_ip->state); return ret; } @@ -1243,13 +1244,12 @@ void fimc_is_hw_mcsc_frame_done(struct fimc_is_hw_ip *hw_ip, struct fimc_is_fram hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info; - if (test_and_clear_bit(DSVRA_SET_DONE, &hw_mcsc->blk_set_ctrl[instance])) { + if (test_and_clear_bit(HW_MCS_DS_CFG, &hw_ip->state)) { fimc_is_scaler_set_dma_out_enable(hw_ip->regs, MCSC_OUTPUT_DS, false); fimc_is_scaler_set_ds_enable(hw_ip->regs, false); } - if (test_and_clear_bit(YSUM_SET_DONE, &hw_mcsc->blk_set_ctrl[instance])) { + if (test_and_clear_bit(HW_MCS_YSUM_CFG, &hw_ip->state)) fimc_is_scaler_set_ysum_enable(hw_ip->regs, false); - } switch (done_type) { case IS_SHOT_SUCCESS: @@ -2476,7 +2476,7 @@ int fimc_is_hw_mcsc_update_dsvra_register(struct fimc_is_hw_ip *hw_ip, fimc_is_scaler_set_dma_out_enable(hw_ip->regs, MCSC_OUTPUT_DS, true); if (!test_bit(FIMC_IS_GROUP_OTF_INPUT, &head->state)) - set_bit(DSVRA_SET_DONE, &hw_mcsc->blk_set_ctrl[instance]); + set_bit(HW_MCS_DS_CFG, &hw_ip->state); msdbg_hw(2, "%s: dsvra_inport(%d) configured\n", instance, hw_ip, __func__, dsvra_inport); @@ -2542,7 +2542,7 @@ int fimc_is_hw_mcsc_update_ysum_register(struct fimc_is_hw_ip *hw_ip, fimc_is_scaler_set_ysum_input_sourece_enable(hw_ip->regs, ysumport, true); if (!test_bit(FIMC_IS_GROUP_OTF_INPUT, &head->state)) - set_bit(YSUM_SET_DONE, &hw_mcsc->blk_set_ctrl[instance]); + set_bit(HW_MCS_YSUM_CFG, &hw_ip->state); msdbg_hw(2, "%s: ysum_port(%d) configured\n", instance, hw_ip, __func__, ysumport); @@ -2726,6 +2726,9 @@ int fimc_is_hw_mcsc_probe(struct fimc_is_hw_ip *hw_ip, struct fimc_is_interface clear_bit(HW_CONFIG, &hw_ip->state); clear_bit(HW_RUN, &hw_ip->state); clear_bit(HW_TUNESET, &hw_ip->state); + clear_bit(HW_MCS_YSUM_CFG, &hw_ip->state); + clear_bit(HW_MCS_DS_CFG, &hw_ip->state); + spin_lock_init(&shared_output_slock); sinfo_hw("probe done\n", hw_ip); diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h index 8f927f40a8bd..f764e14383e5 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h @@ -74,14 +74,6 @@ enum yic_mode { TDNR_YIC_DISABLE, }; -enum mcsc_block_set_ctrl { - TDNR_SET_DONE = 0, - DJAG_SET_DONE, - YSUM_SET_DONE, - DSVRA_SET_DONE, - ALL_BLOCK_SET_DONE = 0xFF, -}; - struct scaler_setfile_contents { /* Brightness/Contrast control param */ u32 y_offset; @@ -158,7 +150,6 @@ struct fimc_is_hw_mcsc { int yuv_range; u32 instance; ulong out_en; /* This flag save whether the capture video node of MCSC is opened or not. */ - ulong blk_set_ctrl[FIMC_IS_STREAM_COUNT]; u32 prev_hwfc_output_ids; /* for tdnr use */