xref: /linux/drivers/staging/media/atomisp/pci/isp/kernels/ctc/ctc_1.0/ia_css_ctc_param.h (revision 3503d56cc7233ced602e38a4c13caa64f00ab2aa)
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_CTC_PARAM_H
17 #define __IA_CSS_CTC_PARAM_H
18 
19 #include "type_support.h"
20 #include <system_global.h>
21 
22 #include "ia_css_ctc_types.h"
23 
24 #ifndef PIPE_GENERATION
25 #if defined(HAS_VAMEM_VERSION_2)
26 #define SH_CSS_ISP_CTC_TABLE_SIZE_LOG2       IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2
27 #define SH_CSS_ISP_CTC_TABLE_SIZE            IA_CSS_VAMEM_2_CTC_TABLE_SIZE
28 #elif defined(HAS_VAMEM_VERSION_1)
29 #define SH_CSS_ISP_CTC_TABLE_SIZE_LOG2       IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2
30 #define SH_CSS_ISP_CTC_TABLE_SIZE            IA_CSS_VAMEM_1_CTC_TABLE_SIZE
31 #else
32 #error "VAMEM should be {VERSION1, VERSION2}"
33 #endif
34 
35 #else
36 /* For pipe generation, the size is not relevant */
37 #define SH_CSS_ISP_CTC_TABLE_SIZE 0
38 #endif
39 
40 /* This should be vamem_data_t, but that breaks the pipe generator */
41 struct sh_css_isp_ctc_vamem_params {
42 	u16 ctc[SH_CSS_ISP_CTC_TABLE_SIZE];
43 };
44 
45 #endif /* __IA_CSS_CTC_PARAM_H */
46