From: Sunmi Lee Date: Wed, 4 Jul 2018 05:00:02 +0000 (+0900) Subject: [COMMON] fimc-is2: Implementation of setting scaler coefficient by setfile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1917a99fb96d8eb204867908f364cb1f0914601d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: Implementation of setting scaler coefficient by setfile To support new method of setting scaler coefficient. PR JIRA ID: CPR-33 Change-Id: Iaabe0ac0e336c041c1a895b90904f40d6ed51a26 Signed-off-by: Sunmi Lee --- 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 2144192817b7..2b1ed2c0a3f8 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 @@ -1504,6 +1504,8 @@ int fimc_is_hw_mcsc_poly_phase(struct fimc_is_hw_ip *hw_ip, struct param_mcs_inp struct fimc_is_hw_mcsc *hw_mcsc; struct fimc_is_hw_mcsc_cap *cap = GET_MCSC_HW_CAP(hw_ip); enum exynos_sensor_position sensor_position; + struct hw_mcsc_setfile *setfile; + struct scaler_coef_cfg *sc_coef; FIMC_BUG(!hw_ip); FIMC_BUG(!input); @@ -1613,8 +1615,15 @@ int fimc_is_hw_mcsc_poly_phase(struct fimc_is_hw_ip *hw_ip, struct param_mcs_inp vratio = (u32)((temp_height << MCSC_PRECISION) / poly_dst_height); sensor_position = hw_ip->hardware->sensor_position[instance]; + setfile = hw_mcsc->cur_setfile[sensor_position]; +#if defined(USE_UVSP_CAC) + sc_coef = &setfile->sc_coef; +#else + sc_coef = NULL; +#endif fimc_is_scaler_set_poly_scaling_ratio(hw_ip->regs, output_id, hratio, vratio); - fimc_is_scaler_set_poly_scaler_coef(hw_ip->regs, output_id, hratio, vratio, sensor_position); + fimc_is_scaler_set_poly_scaler_coef(hw_ip->regs, output_id, hratio, vratio, + sc_coef, sensor_position); fimc_is_scaler_set_poly_round_mode(hw_ip->regs, output_id, round_mode_en); return ret; @@ -1633,6 +1642,9 @@ int fimc_is_hw_mcsc_post_chain(struct fimc_is_hw_ip *hw_ip, struct param_mcs_inp bool round_mode_en = true; struct fimc_is_hw_mcsc *hw_mcsc; struct fimc_is_hw_mcsc_cap *cap = GET_MCSC_HW_CAP(hw_ip); + enum exynos_sensor_position sensor_position; + struct hw_mcsc_setfile *setfile; + struct scaler_coef_cfg *sc_coef; FIMC_BUG(!hw_ip); FIMC_BUG(!input); @@ -1678,8 +1690,15 @@ int fimc_is_hw_mcsc_post_chain(struct fimc_is_hw_ip *hw_ip, struct param_mcs_inp hratio = (u32)((temp_width << MCSC_PRECISION) / dst_width); vratio = (u32)((temp_height << MCSC_PRECISION) / dst_height); + sensor_position = hw_ip->hardware->sensor_position[instance]; + setfile = hw_mcsc->cur_setfile[sensor_position]; +#if defined(USE_UVSP_CAC) + sc_coef = &setfile->sc_coef; +#else + sc_coef = NULL; +#endif fimc_is_scaler_set_post_scaling_ratio(hw_ip->regs, output_id, hratio, vratio); - fimc_is_scaler_set_post_scaler_coef(hw_ip->regs, output_id, hratio, vratio); + fimc_is_scaler_set_post_scaler_coef(hw_ip->regs, output_id, hratio, vratio, sc_coef); fimc_is_scaler_set_post_round_mode(hw_ip->regs, output_id, round_mode_en); return ret;