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