1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Release Version: irci_stable_candrpv_0415_20150521_0458 */
3 /*
4  * Support for Intel Camera Imaging ISP subsystem.
5  * Copyright (c) 2015, Intel Corporation.
6  */
7 
8 #ifndef _IA_CSS_TYPES_H
9 #define _IA_CSS_TYPES_H
10 
11 /* @file
12  * This file contains types used for the ia_css parameters.
13  * These types are in a separate file because they are expected
14  * to be used in software layers that do not access the CSS API
15  * directly but still need to forward parameters for it.
16  */
17 
18 #include <type_support.h>
19 
20 #include "ia_css_frac.h"
21 
22 #include "isp/kernels/aa/aa_2/ia_css_aa2_types.h"
23 #include "isp/kernels/anr/anr_1.0/ia_css_anr_types.h"
24 #include "isp/kernels/anr/anr_2/ia_css_anr2_types.h"
25 #include "isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h"
26 #include "isp/kernels/csc/csc_1.0/ia_css_csc_types.h"
27 #include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h"
28 #include "isp/kernels/dp/dp_1.0/ia_css_dp_types.h"
29 #include "isp/kernels/de/de_1.0/ia_css_de_types.h"
30 #include "isp/kernels/de/de_2/ia_css_de2_types.h"
31 #include "isp/kernels/fc/fc_1.0/ia_css_formats_types.h"
32 #include "isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h"
33 #include "isp/kernels/gc/gc_1.0/ia_css_gc_types.h"
34 #include "isp/kernels/gc/gc_2/ia_css_gc2_types.h"
35 #include "isp/kernels/macc/macc_1.0/ia_css_macc_types.h"
36 #include "isp/kernels/ob/ob_1.0/ia_css_ob_types.h"
37 #include "isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h"
38 #include "isp/kernels/sc/sc_1.0/ia_css_sc_types.h"
39 #include "isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h"
40 #include "isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h"
41 #include "isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h"
42 #include "isp/kernels/wb/wb_1.0/ia_css_wb_types.h"
43 #include "isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h"
44 #include "isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h"
45 
46 /* ISP2401 */
47 #include "isp/kernels/tnr/tnr3/ia_css_tnr3_types.h"
48 
49 #include "isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h"
50 #include "isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h"
51 #include "isp/kernels/output/output_1.0/ia_css_output_types.h"
52 
53 #define IA_CSS_DVS_STAT_GRID_INFO_SUPPORTED
54 /** Should be removed after Driver adaptation will be done */
55 
56 #define IA_CSS_VERSION_MAJOR    2
57 #define IA_CSS_VERSION_MINOR    0
58 #define IA_CSS_VERSION_REVISION 2
59 
60 #define IA_CSS_MORPH_TABLE_NUM_PLANES  6
61 
62 /* Min and max exposure IDs. These macros are here to allow
63  * the drivers to get this information. Changing these macros
64  * constitutes a CSS API change. */
65 #define IA_CSS_ISYS_MIN_EXPOSURE_ID 1   /** Minimum exposure ID */
66 #define IA_CSS_ISYS_MAX_EXPOSURE_ID 250 /** Maximum exposure ID */
67 
68 /* opaque types */
69 struct ia_css_isp_parameters;
70 struct ia_css_pipe;
71 struct ia_css_memory_offsets;
72 struct ia_css_config_memory_offsets;
73 struct ia_css_state_memory_offsets;
74 
75 /* Virtual address within the CSS address space. */
76 typedef u32 ia_css_ptr;
77 
78 #define SIZE_OF_IA_CSS_PTR		sizeof(uint32_t)
79 
80 /* Generic resolution structure.
81  */
82 struct ia_css_resolution {
83 	u32 width;  /** Width */
84 	u32 height; /** Height */
85 };
86 
87 /* Generic coordinate structure.
88  */
89 struct ia_css_coordinate {
90 	s32 x;	/** Value of a coordinate on the horizontal axis */
91 	s32 y;	/** Value of a coordinate on the vertical axis */
92 };
93 
94 /* Vector with signed values. This is used to indicate motion for
95  * Digital Image Stabilization.
96  */
97 struct ia_css_vector {
98 	s32 x; /** horizontal motion (in pixels) */
99 	s32 y; /** vertical motion (in pixels) */
100 };
101 
102 /* Short hands */
103 #define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0
104 #define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0
105 
106 /* CSS data descriptor */
107 struct ia_css_data {
108 	ia_css_ptr address; /** CSS virtual address */
109 	u32   size;    /** Disabled if 0 */
110 };
111 
112 /* Host data descriptor */
113 struct ia_css_host_data {
114 	char      *address; /** Host address */
115 	u32   size;    /** Disabled if 0 */
116 };
117 
118 /* ISP data descriptor */
119 struct ia_css_isp_data {
120 	u32   address; /** ISP address */
121 	u32   size;    /** Disabled if 0 */
122 };
123 
124 /* Shading Correction types. */
125 enum ia_css_shading_correction_type {
126 	IA_CSS_SHADING_CORRECTION_NONE,	 /** Shading Correction is not processed in the pipe. */
127 	IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */
128 
129 	/** More shading correction types can be added in the future. */
130 };
131 
132 /* Shading Correction information. */
133 struct ia_css_shading_info {
134 	enum ia_css_shading_correction_type type; /** Shading Correction type. */
135 
136 	union {	/* Shading Correction information of each Shading Correction types. */
137 
138 		/* Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1.
139 		 *
140 		 *  This structure contains the information necessary to generate
141 		 *  the shading table required in the isp.
142 		 *  This structure is filled in the css,
143 		 *  and the driver needs to get it to generate the shading table.
144 		 *
145 		 *  Before the shading correction is applied, NxN-filter and/or scaling
146 		 *  are applied in the isp, depending on the isp binaries.
147 		 *  Then, these should be considered in generating the shading table.
148 		 *    - Bad pixels on left/top sides generated by NxN-filter
149 		 *      (Bad pixels are NOT considered currently,
150 		 *      because they are subtle.)
151 		 *    - Down-scaling/Up-scaling factor
152 		 *
153 		 *  Shading correction is applied to the area
154 		 *  which has real sensor data and margin.
155 		 *  Then, the shading table should cover the area including margin.
156 		 *  This structure has this information.
157 		 *    - Origin coordinate of bayer (real sensor data)
158 		 *      on the shading table
159 		 *
160 		 * ------------------------ISP 2401-----------------------
161 		 *
162 		 *  the shading table directly required from ISP.
163 		 *  This structure is filled in CSS, and the driver needs to get it to generate the shading table.
164 		 *
165 		 *  The shading correction is applied to the bayer area which contains sensor data and padding data.
166 		 *  The shading table should cover this bayer area.
167 		 *
168 		 *  The shading table size directly required from ISP is expressed by these parameters.
169 		 *    1. uint32_t num_hor_grids;
170 		 *    2. uint32_t num_ver_grids;
171 		 *    3. uint32_t bqs_per_grid_cell;
172 		 *
173 		 *  In some isp binaries, the bayer scaling is applied before the shading correction is applied.
174 		 *  Then, this scaling factor should be considered in generating the shading table.
175 		 *  The scaling factor is expressed by these parameters.
176 		 *    4. uint32_t bayer_scale_hor_ratio_in;
177 		 *    5. uint32_t bayer_scale_hor_ratio_out;
178 		 *    6. uint32_t bayer_scale_ver_ratio_in;
179 		 *    7. uint32_t bayer_scale_ver_ratio_out;
180 		 *
181 		 *  The sensor data size inputted to ISP is expressed by this parameter.
182 		 *  This is the size BEFORE the bayer scaling is applied.
183 		 *    8. struct ia_css_resolution isp_input_sensor_data_res_bqs;
184 		 *
185 		 *  The origin of the sensor data area positioned on the shading table at the shading correction
186 		 *  is expressed by this parameter.
187 		 *  The size of this area assumes the size AFTER the bayer scaling is applied
188 		 *  to the isp_input_sensor_data_resolution_bqs.
189 		 *    9. struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
190 		 *
191 		 *  ****** Definitions of the shading table and the sensor data at the shading correction ******
192 		 *
193 		 * (0,0)--------------------- TW -------------------------------
194 		 *   |                                            shading table |
195 		 *   |      (ox,oy)---------- W --------------------------      |
196 		 *   |        |                               sensor data |     |
197 		 *   |        |                                           |     |
198 		 *  TH        H             sensor data center            |     |
199 		 *   |        |                  (cx,cy)                  |     |
200 		 *   |        |                                           |     |
201 		 *   |        |                                           |     |
202 		 *   |        |                                           |     |
203 		 *   |         -------------------------------------------      |
204 		 *   |                                                          |
205 		 *    ----------------------------------------------------------
206 		 *
207 		 *    Example of still mode for output 1080p:
208 		 *
209 		 *    num_hor_grids = 66
210 		 *    num_ver_grids = 37
211 		 *    bqs_per_grid_cell = 16
212 		 *    bayer_scale_hor_ratio_in = 1
213 		 *    bayer_scale_hor_ratio_out = 1
214 		 *    bayer_scale_ver_ratio_in = 1
215 		 *    bayer_scale_ver_ratio_out = 1
216 		 *    isp_input_sensor_data_resolution_bqs = {966, 546}
217 		 *    sensor_data_origin_bqs_on_sctbl = {61, 15}
218 		 *
219 		 *    TW, TH [bqs]: width and height of shading table
220 		 *        TW = (num_hor_grids - 1) * bqs_per_grid_cell = (66 - 1) * 16 = 1040
221 		 *        TH = (num_ver_grids - 1) * bqs_per_grid_cell = (37 - 1) * 16 = 576
222 		 *
223 		 *    W, H [bqs]: width and height of sensor data at shading correction
224 		 *        W = sensor_data_res_bqs.width
225 		 *          = isp_input_sensor_data_res_bqs.width
226 		 *              * bayer_scale_hor_ratio_out / bayer_scale_hor_ratio_in + 0.5 = 966
227 		 *        H = sensor_data_res_bqs.height
228 		 *          = isp_input_sensor_data_res_bqs.height
229 		 *               * bayer_scale_ver_ratio_out / bayer_scale_ver_ratio_in + 0.5 = 546
230 		 *
231 		 *    (ox, oy) [bqs]: origin of sensor data positioned on shading table at shading correction
232 		 *        ox = sensor_data_origin_bqs_on_sctbl.x = 61
233 		 *        oy = sensor_data_origin_bqs_on_sctbl.y = 15
234 		 *
235 		 *    (cx, cy) [bqs]: center of sensor data positioned on shading table at shading correction
236 		 *        cx = ox + W/2 = 61 + 966/2 = 544
237 		 *        cy = oy + H/2 = 15 + 546/2 = 288
238 		 *
239 		 *  ****** Relation between the shading table and the sensor data ******
240 		 *
241 		 *    The origin of the sensor data should be on the shading table.
242 		 *        0 <= ox < TW,  0 <= oy < TH
243 		 *
244 		 *  ****** How to center the shading table on the sensor data ******
245 		 *
246 		 *    To center the shading table on the sensor data,
247 		 *    CSS decides the shading table size so that a certain grid point is positioned
248 		 *    on the center of the sensor data at the shading correction.
249 		 *    CSS expects the shading center is set on this grid point
250 		 *    when the shading table data is calculated in AIC.
251 		 *
252 		 *    W, H [bqs]: width and height of sensor data at shading correction
253 		 *	W = sensor_data_res_bqs.width
254 		 *	H = sensor_data_res_bqs.height
255 		 *
256 		 *    (cx, cy) [bqs]: center of sensor data positioned on shading table at shading correction
257 		 *	cx = sensor_data_origin_bqs_on_sctbl.x + W/2
258 		 *	cy = sensor_data_origin_bqs_on_sctbl.y + H/2
259 		 *
260 		 *    CSS decides the shading table size and the sensor data position
261 		 *    so that the (cx, cy) satisfies this condition.
262 		 *	mod(cx, bqs_per_grid_cell) = 0
263 		 *	mod(cy, bqs_per_grid_cell) = 0
264 		 *
265 		 *  ****** How to change the sensor data size by processes in the driver and ISP ******
266 		 *
267 		 *    1. sensor data size: Physical sensor size
268 		 *			   (The struct ia_css_shading_info does not have this information.)
269 		 *    2. process:          Driver applies the sensor cropping/binning/scaling to physical sensor size.
270 		 *    3. sensor data size: ISP input size (== shading_info.isp_input_sensor_data_res_bqs)
271 		 *			   (ISP assumes the ISP input sensor data is centered on the physical sensor.)
272 		 *    4. process:          ISP applies the bayer scaling by the factor of shading_info.bayer_scale_*.
273 		 *    5. sensor data size: Scaling factor * ISP input size (== shading_info.sensor_data_res_bqs)
274 		 *    6. process:          ISP applies the shading correction.
275 		 *
276 		 *  ISP block: SC1
277 		 *  ISP1: SC1 is used.
278 		 *  ISP2: SC1 is used.
279 		 */
280 		struct {
281 			/* ISP2400 */
282 			u32 enable;	/** Shading correction enabled.
283 						     0:disabled, 1:enabled */
284 
285 			/* ISP2401 */
286 			u32 num_hor_grids;	/** Number of data points per line per color on shading table. */
287 			u32 num_ver_grids;	/** Number of lines of data points per color on shading table. */
288 			u32 bqs_per_grid_cell; /** Grid cell size in BQ unit.
289 							 NOTE: bqs = size in BQ(Bayer Quad) unit.
290 							       1BQ means {Gr,R,B,Gb} (2x2 pixels).
291 							       Horizontal 1 bqs corresponds to horizontal 2 pixels.
292 							       Vertical 1 bqs corresponds to vertical 2 pixels. */
293 			u32 bayer_scale_hor_ratio_in;
294 			u32 bayer_scale_hor_ratio_out;
295 
296 			/** Horizontal ratio of bayer scaling between input width and output width,
297 			     for the scaling which should be done before shading correction.
298 				output_width = input_width * bayer_scale_hor_ratio_out
299 								/ bayer_scale_hor_ratio_in + 0.5 */
300 			u32 bayer_scale_ver_ratio_in;
301 			u32 bayer_scale_ver_ratio_out;
302 
303 			/** Vertical ratio of bayer scaling
304 			between input height and output height, for the scaling
305 			which should be done before shading correction.
306 			  output_height = input_height * bayer_scale_ver_ratio_out
307 						/ bayer_scale_ver_ratio_in */
308 			/* ISP2400 */
309 			u32 sc_bayer_origin_x_bqs_on_shading_table;
310 			/** X coordinate (in bqs) of bayer origin on shading table.
311 			This indicates the left-most pixel of bayer
312 			(not include margin) inputted to the shading correction.
313 			This corresponds to the left-most pixel of bayer
314 			inputted to isp from sensor. */
315 			/* ISP2400 */
316 			u32 sc_bayer_origin_y_bqs_on_shading_table;
317 			/** Y coordinate (in bqs) of bayer origin on shading table.
318 			This indicates the top pixel of bayer
319 			(not include margin) inputted to the shading correction.
320 			This corresponds to the top pixel of bayer
321 			inputted to isp from sensor. */
322 
323 			/** Vertical ratio of bayer scaling between input height and output height,
324 			     for the scaling which should be done before shading correction.
325 				output_height = input_height * bayer_scale_ver_ratio_out
326 								/ bayer_scale_ver_ratio_in + 0.5 */
327 			/* ISP2401 */
328 			struct ia_css_resolution isp_input_sensor_data_res_bqs;
329 			/** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
330 			     NOTE: This is NOT the size of the physical sensor size.
331 				   CSS requests the driver that ISP inputs sensor data
332 				   by the size of isp_input_sensor_data_res_bqs.
333 				   The driver sends the sensor data to ISP,
334 				   after the adequate cropping/binning/scaling
335 				   are applied to the physical sensor data area.
336 				   ISP assumes the area of isp_input_sensor_data_res_bqs
337 				   is centered on the physical sensor. */
338 			/* ISP2401 */
339 			struct ia_css_resolution sensor_data_res_bqs;
340 			/** Sensor data size (in bqs) at shading correction.
341 			     This is the size AFTER bayer scaling. */
342 			/* ISP2401 */
343 			struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
344 			/** Origin of sensor data area positioned on shading table at shading correction.
345 			     The coordinate x,y should be positive values. */
346 		} type_1;
347 
348 		/** More structures can be added here when more shading correction types will be added
349 		     in the future. */
350 	} info;
351 };
352 
353 /* Default Shading Correction information of Shading Correction Type 1. */
354 #define DEFAULT_SHADING_INFO_TYPE_1 \
355 (struct ia_css_shading_info) { \
356 	.type = IA_CSS_SHADING_CORRECTION_TYPE_1, \
357 	.info = { \
358 		.type_1 = { \
359 			.bayer_scale_hor_ratio_in	= 1, \
360 			.bayer_scale_hor_ratio_out	= 1, \
361 			.bayer_scale_ver_ratio_in	= 1, \
362 			.bayer_scale_ver_ratio_out	= 1, \
363 		} \
364 	} \
365 }
366 
367 /* Default Shading Correction information. */
368 #define DEFAULT_SHADING_INFO	DEFAULT_SHADING_INFO_TYPE_1
369 
370 /* structure that describes the 3A and DIS grids */
371 struct ia_css_grid_info {
372 	/* \name ISP input size
373 	  * that is visible for user
374 	  * @{
375 	  */
376 	u32 isp_in_width;
377 	u32 isp_in_height;
378 	/* @}*/
379 
380 	struct ia_css_3a_grid_info  s3a_grid; /** 3A grid info */
381 	union ia_css_dvs_grid_u dvs_grid;
382 	/** All types of DVS statistics grid info union */
383 
384 	enum ia_css_vamem_type vamem_type;
385 };
386 
387 /* defaults for ia_css_grid_info structs */
388 #define DEFAULT_GRID_INFO { \
389 	.dvs_grid	= DEFAULT_DVS_GRID_INFO, \
390 	.vamem_type	= IA_CSS_VAMEM_TYPE_1 \
391 }
392 
393 /* Morphing table, used for geometric distortion and chromatic abberration
394  *  correction (GDCAC, also called GDC).
395  *  This table describes the imperfections introduced by the lens, the
396  *  advanced ISP can correct for these imperfections using this table.
397  */
398 struct ia_css_morph_table {
399 	u32 enable; /** To disable GDC, set this field to false. The
400 			  coordinates fields can be set to NULL in this case. */
401 	u32 height; /** Table height */
402 	u32 width;  /** Table width */
403 	u16 *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES];
404 	/** X coordinates that describe the sensor imperfection */
405 	u16 *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES];
406 	/** Y coordinates that describe the sensor imperfection */
407 };
408 
409 struct ia_css_dvs_6axis_config {
410 	unsigned int exp_id;
411 	/** Exposure ID, see ia_css_event_public.h for more detail */
412 	u32 width_y;
413 	u32 height_y;
414 	u32 width_uv;
415 	u32 height_uv;
416 	u32 *xcoords_y;
417 	u32 *ycoords_y;
418 	u32 *xcoords_uv;
419 	u32 *ycoords_uv;
420 };
421 
422 /**
423  * This specifies the coordinates (x,y)
424  */
425 struct ia_css_point {
426 	s32 x; /** x coordinate */
427 	s32 y; /** y coordinate */
428 };
429 
430 /**
431  * This specifies the region
432  */
433 struct ia_css_region {
434 	struct ia_css_point origin; /** Starting point coordinates for the region */
435 	struct ia_css_resolution resolution; /** Region resolution */
436 };
437 
438 /**
439  * Digital zoom:
440  * This feature is currently available only for video, but will become
441  * available for preview and capture as well.
442  * Set the digital zoom factor, this is a logarithmic scale. The actual zoom
443  * factor will be 64/x.
444  * Setting dx or dy to 0 disables digital zoom for that direction.
445  * New API change for Digital zoom:(added struct ia_css_region zoom_region)
446  * zoom_region specifies the origin of the zoom region and width and
447  * height of that region.
448  * origin : This is the coordinate (x,y) within the effective input resolution
449  * of the stream. where, x >= 0 and y >= 0. (0,0) maps to the upper left of the
450  * effective input resolution.
451  * resolution : This is resolution of zoom region.
452  * where, x + width <= effective input width
453  * y + height <= effective input height
454  */
455 struct ia_css_dz_config {
456 	u32 dx; /** Horizontal zoom factor */
457 	u32 dy; /** Vertical zoom factor */
458 	struct ia_css_region zoom_region; /** region for zoom */
459 };
460 
461 /* The still capture mode, this can be RAW (simply copy sensor input to DDR),
462  *  Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR).
463  */
464 enum ia_css_capture_mode {
465 	IA_CSS_CAPTURE_MODE_RAW,      /** no processing, copy data only */
466 	IA_CSS_CAPTURE_MODE_BAYER,    /** bayer processing, up to demosaic */
467 	IA_CSS_CAPTURE_MODE_PRIMARY,  /** primary ISP */
468 	IA_CSS_CAPTURE_MODE_ADVANCED, /** advanced ISP (GDC) */
469 	IA_CSS_CAPTURE_MODE_LOW_LIGHT /** low light ISP (ANR) */
470 };
471 
472 struct ia_css_capture_config {
473 	enum ia_css_capture_mode mode; /** Still capture mode */
474 	u32 enable_xnr;	       /** Enable/disable XNR */
475 	u32 enable_raw_output;
476 	bool enable_capture_pp_bli;    /** Enable capture_pp_bli mode */
477 };
478 
479 /* default settings for ia_css_capture_config structs */
480 #define DEFAULT_CAPTURE_CONFIG { \
481 	.mode	= IA_CSS_CAPTURE_MODE_PRIMARY, \
482 }
483 
484 /* ISP filter configuration. This is a collection of configurations
485  *  for each of the ISP filters (modules).
486  *
487  *  NOTE! The contents of all pointers is copied when get or set with the
488  *  exception of the shading and morph tables. For these we only copy the
489  *  pointer, so the caller must make sure the memory contents of these pointers
490  *  remain valid as long as they are used by the CSS. This will be fixed in the
491  *  future by copying the contents instead of just the pointer.
492  *
493  *  Comment:
494  *    ["ISP block", 1&2]   : ISP block is used both for ISP1 and ISP2.
495  *    ["ISP block", 1only] : ISP block is used only for ISP1.
496  *    ["ISP block", 2only] : ISP block is used only for ISP2.
497  */
498 struct ia_css_isp_config {
499 	struct ia_css_wb_config   *wb_config;	/** White Balance
500 							[WB1, 1&2] */
501 	struct ia_css_cc_config   *cc_config;	/** Color Correction
502 							[CSC1, 1only] */
503 	struct ia_css_tnr_config  *tnr_config;	/** Temporal Noise Reduction
504 							[TNR1, 1&2] */
505 	struct ia_css_ecd_config  *ecd_config;	/** Eigen Color Demosaicing
506 							[DE2, 2only] */
507 	struct ia_css_ynr_config  *ynr_config;	/** Y(Luma) Noise Reduction
508 							[YNR2&YEE2, 2only] */
509 	struct ia_css_fc_config   *fc_config;	/** Fringe Control
510 							[FC2, 2only] */
511 	struct ia_css_formats_config
512 		*formats_config;	/** Formats Control for main output
513 							[FORMATS, 1&2] */
514 	struct ia_css_cnr_config  *cnr_config;	/** Chroma Noise Reduction
515 							[CNR2, 2only] */
516 	struct ia_css_macc_config *macc_config;	/** MACC
517 							[MACC2, 2only] */
518 	struct ia_css_ctc_config  *ctc_config;	/** Chroma Tone Control
519 							[CTC2, 2only] */
520 	struct ia_css_aa_config   *aa_config;	/** YUV Anti-Aliasing
521 							[AA2, 2only]
522 							(not used currently) */
523 	struct ia_css_aa_config   *baa_config;	/** Bayer Anti-Aliasing
524 							[BAA2, 1&2] */
525 	struct ia_css_ce_config   *ce_config;	/** Chroma Enhancement
526 							[CE1, 1only] */
527 	struct ia_css_dvs_6axis_config *dvs_6axis_config;
528 	struct ia_css_ob_config   *ob_config;  /** Objective Black
529 							[OB1, 1&2] */
530 	struct ia_css_dp_config   *dp_config;  /** Defect Pixel Correction
531 							[DPC1/DPC2, 1&2] */
532 	struct ia_css_nr_config   *nr_config;  /** Noise Reduction
533 							[BNR1&YNR1&CNR1, 1&2]*/
534 	struct ia_css_ee_config   *ee_config;  /** Edge Enhancement
535 							[YEE1, 1&2] */
536 	struct ia_css_de_config   *de_config;  /** Demosaic
537 							[DE1, 1only] */
538 	struct ia_css_gc_config   *gc_config;  /** Gamma Correction (for YUV)
539 							[GC1, 1only] */
540 	struct ia_css_anr_config  *anr_config; /** Advanced Noise Reduction */
541 	struct ia_css_3a_config   *s3a_config; /** 3A Statistics config */
542 	struct ia_css_xnr_config  *xnr_config; /** eXtra Noise Reduction */
543 	struct ia_css_dz_config   *dz_config;  /** Digital Zoom */
544 	struct ia_css_cc_config *yuv2rgb_cc_config; /** Color Correction
545 							[CCM2, 2only] */
546 	struct ia_css_cc_config *rgb2yuv_cc_config; /** Color Correction
547 							[CSC2, 2only] */
548 	struct ia_css_macc_table  *macc_table;	/** MACC
549 							[MACC1/MACC2, 1&2]*/
550 	struct ia_css_gamma_table *gamma_table;	/** Gamma Correction (for YUV)
551 							[GC1, 1only] */
552 	struct ia_css_ctc_table   *ctc_table;	/** Chroma Tone Control
553 							[CTC1, 1only] */
554 
555 	/* \deprecated */
556 	struct ia_css_xnr_table   *xnr_table;	/** eXtra Noise Reduction
557 							[XNR1, 1&2] */
558 	struct ia_css_rgb_gamma_table *r_gamma_table;/** sRGB Gamma Correction
559 							[GC2, 2only] */
560 	struct ia_css_rgb_gamma_table *g_gamma_table;/** sRGB Gamma Correction
561 							[GC2, 2only] */
562 	struct ia_css_rgb_gamma_table *b_gamma_table;/** sRGB Gamma Correction
563 							[GC2, 2only] */
564 	struct ia_css_vector      *motion_vector; /** For 2-axis DVS */
565 	struct ia_css_shading_table *shading_table;
566 	struct ia_css_morph_table   *morph_table;
567 	struct ia_css_dvs_coefficients *dvs_coefs; /** DVS 1.0 coefficients */
568 	struct ia_css_dvs2_coefficients *dvs2_coefs; /** DVS 2.0 coefficients */
569 	struct ia_css_capture_config   *capture_config;
570 	struct ia_css_anr_thres   *anr_thres;
571 	/* @deprecated{Old shading settings, see bugzilla bz675 for details} */
572 	struct ia_css_shading_settings *shading_settings;
573 	struct ia_css_xnr3_config *xnr3_config; /** eXtreme Noise Reduction v3 */
574 	/* comment from Lasse: Be aware how this feature will affect coordinate
575 	 *  normalization in different parts of the system. (e.g. face detection,
576 	 *  touch focus, 3A statistics and windows of interest, shading correction,
577 	 *  DVS, GDC) from IQ tool level and application level down-to ISP FW level.
578 	 *  the risk for regression is not in the individual blocks, but how they
579 	 *  integrate together. */
580 	struct ia_css_output_config
581 		*output_config;	/** Main Output Mirroring, flipping */
582 
583 	struct ia_css_scaler_config
584 		*scaler_config;         /** Skylake: scaler config (optional) */
585 	struct ia_css_formats_config
586 		*formats_config_display;/** Formats control for viewfinder/display output (optional)
587 										[OSYS, n/a] */
588 	struct ia_css_output_config
589 		*output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
590 
591 	struct ia_css_frame
592 		*output_frame;          /** Output frame the config is to be applied to (optional) */
593 	u32			isp_config_id;	/** Unique ID to track which config was actually applied to a particular frame */
594 };
595 
596 #endif /* _IA_CSS_TYPES_H */
597