xref: /linux/drivers/staging/media/atomisp/pci/ia_css_types.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
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 #define SIZE_OF_IA_CSS_PTR		sizeof(uint32_t)
88 
89 /* Generic resolution structure.
90  */
91 struct ia_css_resolution {
92 	u32 width;  /** Width */
93 	u32 height; /** Height */
94 };
95 
96 /* Generic coordinate structure.
97  */
98 struct ia_css_coordinate {
99 	s32 x;	/** Value of a coordinate on the horizontal axis */
100 	s32 y;	/** Value of a coordinate on the vertical axis */
101 };
102 
103 /* Vector with signed values. This is used to indicate motion for
104  * Digital Image Stabilization.
105  */
106 struct ia_css_vector {
107 	s32 x; /** horizontal motion (in pixels) */
108 	s32 y; /** vertical motion (in pixels) */
109 };
110 
111 /* Short hands */
112 #define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0
113 #define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0
114 
115 /* CSS data descriptor */
116 struct ia_css_data {
117 	ia_css_ptr address; /** CSS virtual address */
118 	u32   size;    /** Disabled if 0 */
119 };
120 
121 /* Host data descriptor */
122 struct ia_css_host_data {
123 	char      *address; /** Host address */
124 	u32   size;    /** Disabled if 0 */
125 };
126 
127 /* ISP data descriptor */
128 struct ia_css_isp_data {
129 	u32   address; /** ISP address */
130 	u32   size;    /** Disabled if 0 */
131 };
132 
133 /* Shading Correction types. */
134 enum ia_css_shading_correction_type {
135 	IA_CSS_SHADING_CORRECTION_NONE,	 /** Shading Correction is not processed in the pipe. */
136 	IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */
137 
138 	/** More shading correction types can be added in the future. */
139 };
140 
141 /* Shading Correction information. */
142 struct ia_css_shading_info {
143 	enum ia_css_shading_correction_type type; /** Shading Correction type. */
144 
145 	union {	/* Shading Correction information of each Shading Correction types. */
146 
147 		/* Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1.
148 		 *
149 		 *  This structure contains the information necessary to generate
150 		 *  the shading table required in the isp.
151 		 *  This structure is filled in the css,
152 		 *  and the driver needs to get it to generate the shading table.
153 		 *
154 		 *  Before the shading correction is applied, NxN-filter and/or scaling
155 		 *  are applied in the isp, depending on the isp binaries.
156 		 *  Then, these should be considered in generating the shading table.
157 		 *    - Bad pixels on left/top sides generated by NxN-filter
158 		 *      (Bad pixels are NOT considered currently,
159 		 *      because they are subtle.)
160 		 *    - Down-scaling/Up-scaling factor
161 		 *
162 		 *  Shading correction is applied to the area
163 		 *  which has real sensor data and margin.
164 		 *  Then, the shading table should cover the area including margin.
165 		 *  This structure has this information.
166 		 *    - Origin coordinate of bayer (real sensor data)
167 		 *      on the shading table
168 		 *
169 		 * ------------------------ISP 2401-----------------------
170 		 *
171 		 *  the shading table directly required from ISP.
172 		 *  This structure is filled in CSS, and the driver needs to get it to generate the shading table.
173 		 *
174 		 *  The shading correction is applied to the bayer area which contains sensor data and padding data.
175 		 *  The shading table should cover this bayer area.
176 		 *
177 		 *  The shading table size directly required from ISP is expressed by these parameters.
178 		 *    1. uint32_t num_hor_grids;
179 		 *    2. uint32_t num_ver_grids;
180 		 *    3. uint32_t bqs_per_grid_cell;
181 		 *
182 		 *  In some isp binaries, the bayer scaling is applied before the shading correction is applied.
183 		 *  Then, this scaling factor should be considered in generating the shading table.
184 		 *  The scaling factor is expressed by these parameters.
185 		 *    4. uint32_t bayer_scale_hor_ratio_in;
186 		 *    5. uint32_t bayer_scale_hor_ratio_out;
187 		 *    6. uint32_t bayer_scale_ver_ratio_in;
188 		 *    7. uint32_t bayer_scale_ver_ratio_out;
189 		 *
190 		 *  The sensor data size inputted to ISP is expressed by this parameter.
191 		 *  This is the size BEFORE the bayer scaling is applied.
192 		 *    8. struct ia_css_resolution isp_input_sensor_data_res_bqs;
193 		 *
194 		 *  The origin of the sensor data area positioned on the shading table at the shading correction
195 		 *  is expressed by this parameter.
196 		 *  The size of this area assumes the size AFTER the bayer scaling is applied
197 		 *  to the isp_input_sensor_data_resolution_bqs.
198 		 *    9. struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
199 		 *
200 		 *  ****** Definitions of the shading table and the sensor data at the shading correction ******
201 		 *
202 		 * (0,0)--------------------- TW -------------------------------
203 		 *   |                                            shading table |
204 		 *   |      (ox,oy)---------- W --------------------------      |
205 		 *   |        |                               sensor data |     |
206 		 *   |        |                                           |     |
207 		 *  TH        H             sensor data center            |     |
208 		 *   |        |                  (cx,cy)                  |     |
209 		 *   |        |                                           |     |
210 		 *   |        |                                           |     |
211 		 *   |        |                                           |     |
212 		 *   |         -------------------------------------------      |
213 		 *   |                                                          |
214 		 *    ----------------------------------------------------------
215 		 *
216 		 *    Example of still mode for output 1080p:
217 		 *
218 		 *    num_hor_grids = 66
219 		 *    num_ver_grids = 37
220 		 *    bqs_per_grid_cell = 16
221 		 *    bayer_scale_hor_ratio_in = 1
222 		 *    bayer_scale_hor_ratio_out = 1
223 		 *    bayer_scale_ver_ratio_in = 1
224 		 *    bayer_scale_ver_ratio_out = 1
225 		 *    isp_input_sensor_data_resolution_bqs = {966, 546}
226 		 *    sensor_data_origin_bqs_on_sctbl = {61, 15}
227 		 *
228 		 *    TW, TH [bqs]: width and height of shading table
229 		 *        TW = (num_hor_grids - 1) * bqs_per_grid_cell = (66 - 1) * 16 = 1040
230 		 *        TH = (num_ver_grids - 1) * bqs_per_grid_cell = (37 - 1) * 16 = 576
231 		 *
232 		 *    W, H [bqs]: width and height of sensor data at shading correction
233 		 *        W = sensor_data_res_bqs.width
234 		 *          = isp_input_sensor_data_res_bqs.width
235 		 *              * bayer_scale_hor_ratio_out / bayer_scale_hor_ratio_in + 0.5 = 966
236 		 *        H = sensor_data_res_bqs.height
237 		 *          = isp_input_sensor_data_res_bqs.height
238 		 *               * bayer_scale_ver_ratio_out / bayer_scale_ver_ratio_in + 0.5 = 546
239 		 *
240 		 *    (ox, oy) [bqs]: origin of sensor data positioned on shading table at shading correction
241 		 *        ox = sensor_data_origin_bqs_on_sctbl.x = 61
242 		 *        oy = sensor_data_origin_bqs_on_sctbl.y = 15
243 		 *
244 		 *    (cx, cy) [bqs]: center of sensor data positioned on shading table at shading correction
245 		 *        cx = ox + W/2 = 61 + 966/2 = 544
246 		 *        cy = oy + H/2 = 15 + 546/2 = 288
247 		 *
248 		 *  ****** Relation between the shading table and the sensor data ******
249 		 *
250 		 *    The origin of the sensor data should be on the shading table.
251 		 *        0 <= ox < TW,  0 <= oy < TH
252 		 *
253 		 *  ****** How to center the shading table on the sensor data ******
254 		 *
255 		 *    To center the shading table on the sensor data,
256 		 *    CSS decides the shading table size so that a certain grid point is positioned
257 		 *    on the center of the sensor data at the shading correction.
258 		 *    CSS expects the shading center is set on this grid point
259 		 *    when the shading table data is calculated in AIC.
260 		 *
261 		 *    W, H [bqs]: width and height of sensor data at shading correction
262 		 *	W = sensor_data_res_bqs.width
263 		 *	H = sensor_data_res_bqs.height
264 		 *
265 		 *    (cx, cy) [bqs]: center of sensor data positioned on shading table at shading correction
266 		 *	cx = sensor_data_origin_bqs_on_sctbl.x + W/2
267 		 *	cy = sensor_data_origin_bqs_on_sctbl.y + H/2
268 		 *
269 		 *    CSS decides the shading table size and the sensor data position
270 		 *    so that the (cx, cy) satisfies this condition.
271 		 *	mod(cx, bqs_per_grid_cell) = 0
272 		 *	mod(cy, bqs_per_grid_cell) = 0
273 		 *
274 		 *  ****** How to change the sensor data size by processes in the driver and ISP ******
275 		 *
276 		 *    1. sensor data size: Physical sensor size
277 		 *			   (The struct ia_css_shading_info does not have this information.)
278 		 *    2. process:          Driver applies the sensor cropping/binning/scaling to physical sensor size.
279 		 *    3. sensor data size: ISP input size (== shading_info.isp_input_sensor_data_res_bqs)
280 		 *			   (ISP assumes the ISP input sensor data is centered on the physical sensor.)
281 		 *    4. process:          ISP applies the bayer scaling by the factor of shading_info.bayer_scale_*.
282 		 *    5. sensor data size: Scaling factor * ISP input size (== shading_info.sensor_data_res_bqs)
283 		 *    6. process:          ISP applies the shading correction.
284 		 *
285 		 *  ISP block: SC1
286 		 *  ISP1: SC1 is used.
287 		 *  ISP2: SC1 is used.
288 		 */
289 		struct {
290 			/* ISP2400 */
291 			u32 enable;	/** Shading correction enabled.
292 						     0:disabled, 1:enabled */
293 
294 			/* ISP2401 */
295 			u32 num_hor_grids;	/** Number of data points per line per color on shading table. */
296 			u32 num_ver_grids;	/** Number of lines of data points per color on shading table. */
297 			u32 bqs_per_grid_cell; /** Grid cell size in BQ unit.
298 							 NOTE: bqs = size in BQ(Bayer Quad) unit.
299 							       1BQ means {Gr,R,B,Gb} (2x2 pixels).
300 							       Horizontal 1 bqs corresponds to horizontal 2 pixels.
301 							       Vertical 1 bqs corresponds to vertical 2 pixels. */
302 			u32 bayer_scale_hor_ratio_in;
303 			u32 bayer_scale_hor_ratio_out;
304 
305 			/** Horizontal ratio of bayer scaling between input width and output width,
306 			     for the scaling which should be done before shading correction.
307 				output_width = input_width * bayer_scale_hor_ratio_out
308 								/ bayer_scale_hor_ratio_in + 0.5 */
309 			u32 bayer_scale_ver_ratio_in;
310 			u32 bayer_scale_ver_ratio_out;
311 
312 			/** Vertical ratio of bayer scaling
313 			between input height and output height, for the scaling
314 			which should be done before shading correction.
315 			  output_height = input_height * bayer_scale_ver_ratio_out
316 						/ bayer_scale_ver_ratio_in */
317 			/* ISP2400 */
318 			u32 sc_bayer_origin_x_bqs_on_shading_table;
319 			/** X coordinate (in bqs) of bayer origin on shading table.
320 			This indicates the left-most pixel of bayer
321 			(not include margin) inputted to the shading correction.
322 			This corresponds to the left-most pixel of bayer
323 			inputted to isp from sensor. */
324 			/* ISP2400 */
325 			u32 sc_bayer_origin_y_bqs_on_shading_table;
326 			/** Y coordinate (in bqs) of bayer origin on shading table.
327 			This indicates the top pixel of bayer
328 			(not include margin) inputted to the shading correction.
329 			This corresponds to the top pixel of bayer
330 			inputted to isp from sensor. */
331 
332 			/** Vertical ratio of bayer scaling between input height and output height,
333 			     for the scaling which should be done before shading correction.
334 				output_height = input_height * bayer_scale_ver_ratio_out
335 								/ bayer_scale_ver_ratio_in + 0.5 */
336 			/* ISP2401 */
337 			struct ia_css_resolution isp_input_sensor_data_res_bqs;
338 			/** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
339 			     NOTE: This is NOT the size of the physical sensor size.
340 				   CSS requests the driver that ISP inputs sensor data
341 				   by the size of isp_input_sensor_data_res_bqs.
342 				   The driver sends the sensor data to ISP,
343 				   after the adequate cropping/binning/scaling
344 				   are applied to the physical sensor data area.
345 				   ISP assumes the area of isp_input_sensor_data_res_bqs
346 				   is centered on the physical sensor. */
347 			/* ISP2401 */
348 			struct ia_css_resolution sensor_data_res_bqs;
349 			/** Sensor data size (in bqs) at shading correction.
350 			     This is the size AFTER bayer scaling. */
351 			/* ISP2401 */
352 			struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
353 			/** Origin of sensor data area positioned on shading table at shading correction.
354 			     The coordinate x,y should be positive values. */
355 		} type_1;
356 
357 		/** More structures can be added here when more shading correction types will be added
358 		     in the future. */
359 	} info;
360 };
361 
362 /* Default Shading Correction information of Shading Correction Type 1. */
363 #define DEFAULT_SHADING_INFO_TYPE_1 \
364 (struct ia_css_shading_info) { \
365 	.type = IA_CSS_SHADING_CORRECTION_TYPE_1, \
366 	.info = { \
367 		.type_1 = { \
368 			.bayer_scale_hor_ratio_in	= 1, \
369 			.bayer_scale_hor_ratio_out	= 1, \
370 			.bayer_scale_ver_ratio_in	= 1, \
371 			.bayer_scale_ver_ratio_out	= 1, \
372 		} \
373 	} \
374 }
375 
376 /* Default Shading Correction information. */
377 #define DEFAULT_SHADING_INFO	DEFAULT_SHADING_INFO_TYPE_1
378 
379 /* structure that describes the 3A and DIS grids */
380 struct ia_css_grid_info {
381 	/* \name ISP input size
382 	  * that is visible for user
383 	  * @{
384 	  */
385 	u32 isp_in_width;
386 	u32 isp_in_height;
387 	/* @}*/
388 
389 	struct ia_css_3a_grid_info  s3a_grid; /** 3A grid info */
390 	union ia_css_dvs_grid_u dvs_grid;
391 	/** All types of DVS statistics grid info union */
392 
393 	enum ia_css_vamem_type vamem_type;
394 };
395 
396 /* defaults for ia_css_grid_info structs */
397 #define DEFAULT_GRID_INFO { \
398 	.dvs_grid	= DEFAULT_DVS_GRID_INFO, \
399 	.vamem_type	= IA_CSS_VAMEM_TYPE_1 \
400 }
401 
402 /* Morphing table, used for geometric distortion and chromatic abberration
403  *  correction (GDCAC, also called GDC).
404  *  This table describes the imperfections introduced by the lens, the
405  *  advanced ISP can correct for these imperfections using this table.
406  */
407 struct ia_css_morph_table {
408 	u32 enable; /** To disable GDC, set this field to false. The
409 			  coordinates fields can be set to NULL in this case. */
410 	u32 height; /** Table height */
411 	u32 width;  /** Table width */
412 	u16 *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES];
413 	/** X coordinates that describe the sensor imperfection */
414 	u16 *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES];
415 	/** Y coordinates that describe the sensor imperfection */
416 };
417 
418 struct ia_css_dvs_6axis_config {
419 	unsigned int exp_id;
420 	/** Exposure ID, see ia_css_event_public.h for more detail */
421 	u32 width_y;
422 	u32 height_y;
423 	u32 width_uv;
424 	u32 height_uv;
425 	u32 *xcoords_y;
426 	u32 *ycoords_y;
427 	u32 *xcoords_uv;
428 	u32 *ycoords_uv;
429 };
430 
431 /**
432  * This specifies the coordinates (x,y)
433  */
434 struct ia_css_point {
435 	s32 x; /** x coordinate */
436 	s32 y; /** y coordinate */
437 };
438 
439 /**
440  * This specifies the region
441  */
442 struct ia_css_region {
443 	struct ia_css_point origin; /** Starting point coordinates for the region */
444 	struct ia_css_resolution resolution; /** Region resolution */
445 };
446 
447 /**
448  * Digital zoom:
449  * This feature is currently available only for video, but will become
450  * available for preview and capture as well.
451  * Set the digital zoom factor, this is a logarithmic scale. The actual zoom
452  * factor will be 64/x.
453  * Setting dx or dy to 0 disables digital zoom for that direction.
454  * New API change for Digital zoom:(added struct ia_css_region zoom_region)
455  * zoom_region specifies the origin of the zoom region and width and
456  * height of that region.
457  * origin : This is the coordinate (x,y) within the effective input resolution
458  * of the stream. where, x >= 0 and y >= 0. (0,0) maps to the upper left of the
459  * effective input resolution.
460  * resolution : This is resolution of zoom region.
461  * where, x + width <= effective input width
462  * y + height <= effective input height
463  */
464 struct ia_css_dz_config {
465 	u32 dx; /** Horizontal zoom factor */
466 	u32 dy; /** Vertical zoom factor */
467 	struct ia_css_region zoom_region; /** region for zoom */
468 };
469 
470 /* The still capture mode, this can be RAW (simply copy sensor input to DDR),
471  *  Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR).
472  */
473 enum ia_css_capture_mode {
474 	IA_CSS_CAPTURE_MODE_RAW,      /** no processing, copy data only */
475 	IA_CSS_CAPTURE_MODE_BAYER,    /** bayer processing, up to demosaic */
476 	IA_CSS_CAPTURE_MODE_PRIMARY,  /** primary ISP */
477 	IA_CSS_CAPTURE_MODE_ADVANCED, /** advanced ISP (GDC) */
478 	IA_CSS_CAPTURE_MODE_LOW_LIGHT /** low light ISP (ANR) */
479 };
480 
481 struct ia_css_capture_config {
482 	enum ia_css_capture_mode mode; /** Still capture mode */
483 	u32 enable_xnr;	       /** Enable/disable XNR */
484 	u32 enable_raw_output;
485 	bool enable_capture_pp_bli;    /** Enable capture_pp_bli mode */
486 };
487 
488 /* default settings for ia_css_capture_config structs */
489 #define DEFAULT_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