[COMMON] fimc-is2: Removed the redundant variable - hw_mcsc->blk_set_ctrl
authorSunmi Lee <carrotsm.lee@samsung.com>
Mon, 18 Jun 2018 11:37:06 +0000 (20:37 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:26 +0000 (17:05 +0900)
Change-Id: I9e136fc9667bd31d21263e5d6485e0cd4acfa247
Signed-off-by: Sunmi Lee <carrotsm.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-control.h
drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.c
drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h

index 10debc9187e60b76b687f0f6b1ee93f01df8bdbe..b65b8a7a6399147664f70545c577104c19d330b7 100644 (file)
@@ -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
 };
index 0abadc3d0c2ddfdce83e35784b16ff4a9056c108..b4e7c79594b7395a35b8d0431036944c41d46d61 100644 (file)
@@ -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);
index 8f927f40a8bde7d4363f6215c7543acef0474e61..f764e14383e531407bd9a95c9b7bde3bb5abbfe3 100644 (file)
@@ -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 */