1 /* SPDX-License-Identifier: GPL-2.0 */
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_OB_TYPES_H
17 #define __IA_CSS_OB_TYPES_H
18 
19 /* @file
20 * CSS-API header file for Optical Black level parameters.
21 */
22 
23 #include "ia_css_frac.h"
24 
25 /* Optical black mode.
26  */
27 enum ia_css_ob_mode {
28 	IA_CSS_OB_MODE_NONE,	/** OB has no effect. */
29 	IA_CSS_OB_MODE_FIXED,	/** Fixed OB */
30 	IA_CSS_OB_MODE_RASTER	/** Raster OB */
31 };
32 
33 /* Optical Black level configuration.
34  *
35  *  ISP block: OB1
36  *  ISP1: OB1 is used.
37  *  ISP2: OB1 is used.
38  */
39 struct ia_css_ob_config {
40 	enum ia_css_ob_mode mode; /** Mode (None / Fixed / Raster).
41 					enum, [0,2],
42 					default 1, ineffective 0 */
43 	ia_css_u0_16 level_gr;    /** Black level for GR pixels
44 					(used for Fixed Mode only).
45 					u0.16, [0,65535],
46 					default/ineffective 0 */
47 	ia_css_u0_16 level_r;     /** Black level for R pixels
48 					(used for Fixed Mode only).
49 					u0.16, [0,65535],
50 					default/ineffective 0 */
51 	ia_css_u0_16 level_b;     /** Black level for B pixels
52 					(used for Fixed Mode only).
53 					u0.16, [0,65535],
54 					default/ineffective 0 */
55 	ia_css_u0_16 level_gb;    /** Black level for GB pixels
56 					(used for Fixed Mode only).
57 					u0.16, [0,65535],
58 					default/ineffective 0 */
59 	u16 start_position; /** Start position of OB area
60 					(used for Raster Mode only).
61 					u16.0, [0,63],
62 					default/ineffective 0 */
63 	u16 end_position;  /** End position of OB area
64 					(used for Raster Mode only).
65 					u16.0, [0,63],
66 					default/ineffective 0 */
67 };
68 
69 #endif /* __IA_CSS_OB_TYPES_H */
70