1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  */
6 
7 #ifndef __IA_CSS_OB_PARAM_H
8 #define __IA_CSS_OB_PARAM_H
9 
10 #include "type_support.h"
11 #include "vmem.h"
12 
13 #define OBAREA_MASK_SIZE 64
14 #define OBAREA_LENGTHBQ_INVERSE_SHIFT     12
15 
16 /* AREA_LENGTH_UNIT is dependent on NWAY, requires rewrite */
17 #define AREA_LENGTH_UNIT BIT(12)
18 
19 /* OB (Optical Black) */
20 struct sh_css_isp_ob_stream_config {
21 	unsigned int isp_pipe_version;
22 	unsigned int raw_bit_depth;
23 };
24 
25 struct sh_css_isp_ob_params {
26 	s32 blacklevel_gr;
27 	s32 blacklevel_r;
28 	s32 blacklevel_b;
29 	s32 blacklevel_gb;
30 	s32 area_start_bq;
31 	s32 area_length_bq;
32 	s32 area_length_bq_inverse;
33 };
34 
35 struct sh_css_isp_ob_vmem_params {
36 	VMEM_ARRAY(vmask, OBAREA_MASK_SIZE);
37 };
38 
39 #endif /* __IA_CSS_OB_PARAM_H */
40