From: Sunmi Lee Date: Mon, 11 Jun 2018 07:01:09 +0000 (+0900) Subject: [COMMON] fimc-is2: Code cleanup before adding new feature - hw-mcsc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42f247b1f21ee332017a4c3c8ec66153b26fad86;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: Code cleanup before adding new feature - hw-mcsc Change-Id: I46a857df3be5d9dc200b8797b6b140542b7e31f0 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 5110a8972e97..ffa8e9301811 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 @@ -256,8 +256,8 @@ void fimc_is_hw_mcsc_hw_info(struct fimc_is_hw_ip *hw_ip, struct fimc_is_hw_mcsc return; sinfo_hw("==== h/w info(ver:0x%X) ====\n", hw_ip, cap->hw_ver); - info_hw("[IN] max_out:%d, in(otf/dma):%d/%d, hwfc:%d, tdnr:%d\n", - cap->max_output, cap->in_otf, cap->in_dma, cap->hwfc, cap->tdnr); + info_hw("[IN] out:%d, in(otf:%d/dma:%d), hwfc:%d, tdnr:%d, djag:%d, ds_vra:%d, ysum:%d\n", + cap->max_output, cap->in_otf, cap->in_dma, cap->hwfc, cap->tdnr, cap->djag, cap->ds_vra, cap->ysum); for (i = MCSC_OUTPUT0; i < cap->max_output; i++) info_hw("[OUT%d] out(otf/dma):%d/%d, hwfc:%d\n", i, cap->out_otf[i], cap->out_dma[i], cap->out_hwfc[i]); @@ -343,6 +343,7 @@ static int fimc_is_hw_mcsc_open(struct fimc_is_hw_ip *hw_ip, u32 instance, return 0; } + /* initialize of shared values between MCSC0 and MCSC1 */ for (output_id = MCSC_OUTPUT0; output_id < cap->max_output; output_id++) set_bit(output_id, &hw_mcsc_out_configured); clear_bit(HW_MCSC_OUT_CLEARED_ALL, &hw_mcsc_out_configured); @@ -2275,7 +2276,7 @@ int fimc_is_hw_mcsc_output_yuvrange(struct fimc_is_hw_ip *hw_ip, struct param_mc bool config = true; struct fimc_is_hw_mcsc *hw_mcsc = NULL; #if !defined(USE_YUV_RANGE_BY_ISP) - scaler_setfile_contents contents; + struct scaler_setfile_contents contents; #endif struct fimc_is_hw_mcsc_cap *cap = GET_MCSC_HW_CAP(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 272de61652f8..ceee8573574f 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 @@ -8,8 +8,8 @@ * published by the Free Software Foundation. */ -#ifndef FIMC_IS_SUBDEV_MCSC_H -#define FIMC_IS_SUBDEV_MCSC_H +#ifndef FIMC_IS_HW_MCSC_H +#define FIMC_IS_HW_MCSC_H #include "fimc-is-hw-control.h" #include "fimc-is-interface-library.h" @@ -232,7 +232,7 @@ struct ni_dep_factors { struct yuv_table_config yuv_tables; }; -typedef struct { +struct scaler_setfile_contents { /* Brightness/Contrast control param */ u32 y_offset; u32 y_gain; @@ -242,9 +242,9 @@ typedef struct { u32 c_gain01; u32 c_gain10; u32 c_gain11; -} scaler_setfile_contents; +}; -typedef struct { +struct tdnr_setfile_contents { bool tdnr_enable; u32 num_of_noiseindexes; u32 compression_binary_error_thr; @@ -256,7 +256,7 @@ typedef struct { struct regional_ni_indep_config regional_indep_cfg; struct spatial_ni_indep_config spatial_indep_cfg; struct ni_dep_factors ni_dep_factors[MAX_NOISEINDEX_DEPENDED_CONFIGS]; -} tdnr_setfile_contents; +}; struct tdnr_configs { struct general_config general_cfg; @@ -340,9 +340,9 @@ struct hw_api_scaler_setfile { * 0 : SCALER_OUTPUT_YUV_RANGE_FULL * 1 : SCALER_OUTPUT_YUV_RANGE_NARROW */ - scaler_setfile_contents contents[2]; + struct scaler_setfile_contents contents[2]; #ifdef MCSC_DNR_USE_TUNING - tdnr_setfile_contents tdnr_contents; + struct tdnr_setfile_contents tdnr_contents; #endif #ifdef MCSC_USE_DEJAG_TUNING_PARAM /* Setfile tuning parameters for DJAG (Lhotse) @@ -396,7 +396,7 @@ struct fimc_is_hw_mcsc { bool rep_flag[FIMC_IS_STREAM_COUNT]; int yuv_range; u32 instance; - ulong out_en; + 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; diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c index afbd659d52de..9ebf749ac643 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr-v1.c @@ -797,7 +797,7 @@ static void interpolate_yuv_table_factor(struct ni_dep_factors *interpolated_fac diff_ni_actual_to_bottom); } -static void reconfigure_ni_depended_tuneset(tdnr_setfile_contents *tdnr_tuneset, +static void reconfigure_ni_depended_tuneset(struct tdnr_setfile_contents *tdnr_tuneset, struct tdnr_configs *tdnr_cfgs, u32 noise_index, u32 bottom_ni_index, @@ -857,7 +857,7 @@ static int fimc_is_hw_mcsc_cfg_tdnr_tuning_param(struct fimc_is_hw_ip *hw_ip, int ret = 0; int ni_idx, arr_idx; struct fimc_is_hw_mcsc *hw_mcsc = NULL; - tdnr_setfile_contents *tdnr_tuneset; + struct tdnr_setfile_contents *tdnr_tuneset; struct tdnr_configs tdnr_cfgs; u32 max_ref_ni = 0, min_ref_ni = 0; u32 bottom_ni_index = 0, top_ni_index = 0; 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 4c0020c856f3..f616f81fe047 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 @@ -125,7 +125,7 @@ static int fimc_is_hw_mcsc_check_tdnr_mode_pre(struct fimc_is_hw_ip *hw_ip, u32 lindex, hindex; #ifdef MCSC_DNR_USE_TUNING enum exynos_sensor_position sensor_position; - tdnr_setfile_contents *tdnr_tuneset; + struct tdnr_setfile_contents *tdnr_tuneset; #endif bool setfile_tdnr_enable = true; @@ -733,7 +733,7 @@ static void interpolate_yuv_table_factor(struct ni_dep_factors *interpolated_fac diff_ni_actual_to_bottom); } -static void reconfigure_ni_depended_tuneset(tdnr_setfile_contents *tdnr_tuneset, +static void reconfigure_ni_depended_tuneset(struct tdnr_setfile_contents *tdnr_tuneset, struct tdnr_configs *tdnr_cfgs, u32 noise_index, u32 bottom_ni_index, @@ -783,7 +783,7 @@ static int fimc_is_hw_mcsc_cfg_tdnr_tuning_param(struct fimc_is_hw_ip *hw_ip, int ret = 0; int ni_idx, arr_idx; struct fimc_is_hw_mcsc *hw_mcsc = NULL; - tdnr_setfile_contents *tdnr_tuneset; + struct tdnr_setfile_contents *tdnr_tuneset; struct tdnr_configs tdnr_cfgs; u32 max_ref_ni = 0, min_ref_ni = 0; u32 bottom_ni_index = 0, top_ni_index = 0;