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