1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef __IA_CSS_SC_PARAM_H 8 #define __IA_CSS_SC_PARAM_H 9 10 #include "type_support.h" 11 12 /* SC (Shading Corrction) */ 13 struct sh_css_isp_sc_params { 14 s32 gain_shift; 15 }; 16 17 /* Number of horizontal slice times for interpolated gain: 18 * 19 * The start position of the internal frame does not match the start position of the shading table. 20 * To get a vector of shading gains (interpolated horizontally and vertically) 21 * which matches a vector on the internal frame, 22 * vec_slice is used for 2 adjacent vectors of shading gains. 23 * The number of shift times by vec_slice is 8. 24 * Max grid cell bqs to support the shading table centerting: N = 32 25 * CEIL_DIV(N-1, ISP_SLICE_NELEMS) = CEIL_DIV(31, 4) = 8 26 */ 27 #define SH_CSS_SC_INTERPED_GAIN_HOR_SLICE_TIMES 8 28 29 struct sh_css_isp_sc_isp_config { 30 u32 interped_gain_hor_slice_bqs[SH_CSS_SC_INTERPED_GAIN_HOR_SLICE_TIMES]; 31 u32 internal_frame_origin_y_bqs_on_sctbl; 32 }; 33 34 #endif /* __IA_CSS_SC_PARAM_H */ 35