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 #ifdef IA_CSS_INCLUDE_CONFIGURATIONS
17 #include "isp/kernels/crop/crop_1.0/ia_css_crop.host.h"
18 #include "isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.h"
19 #include "isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.h"
20 #include "isp/kernels/ob/ob_1.0/ia_css_ob.host.h"
21 #include "isp/kernels/output/output_1.0/ia_css_output.host.h"
22 #include "isp/kernels/qplane/qplane_2/ia_css_qplane.host.h"
23 #include "isp/kernels/raw/raw_1.0/ia_css_raw.host.h"
24 #include "isp/kernels/ref/ref_1.0/ia_css_ref.host.h"
25 #include "isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.h"
26 #include "isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.h"
27 #include "isp/kernels/vf/vf_1.0/ia_css_vf.host.h"
28 #include "isp/kernels/iterator/iterator_1.0/ia_css_iterator.host.h"
29 #include "isp/kernels/copy_output/copy_output_1.0/ia_css_copy_output.host.h"
30 #endif
31 
32 #ifndef _IA_CSS_ISP_CONFIG_H
33 #define _IA_CSS_ISP_CONFIG_H
34 
35 enum ia_css_configuration_ids {
36 	IA_CSS_ITERATOR_CONFIG_ID,
37 	IA_CSS_COPY_OUTPUT_CONFIG_ID,
38 	IA_CSS_CROP_CONFIG_ID,
39 	IA_CSS_FPN_CONFIG_ID,
40 	IA_CSS_DVS_CONFIG_ID,
41 	IA_CSS_QPLANE_CONFIG_ID,
42 	IA_CSS_OUTPUT0_CONFIG_ID,
43 	IA_CSS_OUTPUT1_CONFIG_ID,
44 	IA_CSS_OUTPUT_CONFIG_ID,
45 	IA_CSS_RAW_CONFIG_ID,
46 	IA_CSS_TNR_CONFIG_ID,
47 	IA_CSS_REF_CONFIG_ID,
48 	IA_CSS_VF_CONFIG_ID,
49 
50 	/* ISP 2401 */
51 	IA_CSS_SC_CONFIG_ID,
52 
53 	IA_CSS_NUM_CONFIGURATION_IDS
54 };
55 
56 struct ia_css_config_memory_offsets {
57 	struct {
58 		struct ia_css_isp_parameter iterator;
59 		struct ia_css_isp_parameter copy_output;
60 		struct ia_css_isp_parameter crop;
61 		struct ia_css_isp_parameter fpn;
62 		struct ia_css_isp_parameter dvs;
63 		struct ia_css_isp_parameter qplane;
64 		struct ia_css_isp_parameter output0;
65 		struct ia_css_isp_parameter output1;
66 		struct ia_css_isp_parameter output;
67 		struct ia_css_isp_parameter raw;
68 		struct ia_css_isp_parameter tnr;
69 		struct ia_css_isp_parameter ref;
70 		struct ia_css_isp_parameter vf;
71 	} dmem;
72 };
73 
74 #if defined(IA_CSS_INCLUDE_CONFIGURATIONS)
75 
76 #include "ia_css_stream.h"   /* struct ia_css_stream */
77 #include "ia_css_binary.h"   /* struct ia_css_binary */
78 
79 int ia_css_configure_iterator(const struct ia_css_binary *binary,
80 			      const struct ia_css_iterator_configuration *config_dmem);
81 
82 int ia_css_configure_copy_output(const struct ia_css_binary *binary,
83 				 const struct ia_css_copy_output_configuration *config_dmem);
84 
85 int ia_css_configure_crop(const struct ia_css_binary *binary,
86 			  const struct ia_css_crop_configuration *config_dmem);
87 
88 int ia_css_configure_fpn(const struct ia_css_binary *binary,
89 			 const struct ia_css_fpn_configuration *config_dmem);
90 
91 int ia_css_configure_dvs(const struct ia_css_binary *binary,
92 			 const struct ia_css_dvs_configuration *config_dmem);
93 
94 int ia_css_configure_qplane(const struct ia_css_binary *binary,
95 			    const struct ia_css_qplane_configuration *config_dmem);
96 int ia_css_configure_output0(const struct ia_css_binary *binary,
97 			     const struct ia_css_output0_configuration *config_dmem);
98 
99 int ia_css_configure_output1(const struct ia_css_binary *binary,
100 			     const struct ia_css_output1_configuration *config_dmem);
101 
102 int ia_css_configure_output(const struct ia_css_binary *binary,
103 			    const struct ia_css_output_configuration *config_dmem);
104 
105 int ia_css_configure_raw(const struct ia_css_binary *binary,
106 			 const struct ia_css_raw_configuration *config_dmem);
107 
108 int ia_css_configure_tnr(const struct ia_css_binary *binary,
109 			 const struct ia_css_tnr_configuration *config_dmem);
110 
111 int ia_css_configure_ref(const struct ia_css_binary *binary,
112 			 const struct ia_css_ref_configuration *config_dmem);
113 
114 int ia_css_configure_vf(const struct ia_css_binary *binary,
115 			const struct ia_css_vf_configuration *config_dmem);
116 
117 #endif /* IA_CSS_INCLUDE_CONFIGURATION */
118 
119 #endif /* _IA_CSS_ISP_CONFIG_H */
120