Merge tag 'for-4.15/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[sfrench/cifs-2.6.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / xnr / xnr_1.0 / ia_css_xnr_param.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #ifndef __IA_CSS_XNR_PARAM_H
16 #define __IA_CSS_XNR_PARAM_H
17
18 #include "type_support.h"
19 #include <system_global.h>
20
21 #ifndef PIPE_GENERATION
22 #if defined(HAS_VAMEM_VERSION_2)
23 #define SH_CSS_ISP_XNR_TABLE_SIZE_LOG2       IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2
24 #define SH_CSS_ISP_XNR_TABLE_SIZE            IA_CSS_VAMEM_2_XNR_TABLE_SIZE
25 #elif defined(HAS_VAMEM_VERSION_1)
26 #define SH_CSS_ISP_XNR_TABLE_SIZE_LOG2       IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2
27 #define SH_CSS_ISP_XNR_TABLE_SIZE            IA_CSS_VAMEM_1_XNR_TABLE_SIZE
28 #else
29 #error "Unknown vamem type"
30 #endif
31
32
33 #else
34 /* For pipe generation, the size is not relevant */
35 #define SH_CSS_ISP_XNR_TABLE_SIZE 0
36 #endif
37
38 /* This should be vamem_data_t, but that breaks the pipe generator */
39 struct sh_css_isp_xnr_vamem_params {
40         uint16_t xnr[SH_CSS_ISP_XNR_TABLE_SIZE];
41 };
42
43 struct sh_css_isp_xnr_params {
44         /* XNR threshold.
45          * type:u0.16 but actual valid range is:[0,255]
46          * valid range is dependent on SH_CSS_ISP_YUV_BITS (currently 8bits)
47          * default: 25 */
48         uint16_t threshold;
49 };
50
51 #endif /* __IA_CSS_XNR_PARAM_H */