xref: /linux/drivers/staging/media/atomisp/pci/ia_css_isp_states.c (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
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 /* Generated code: do not edit or commmit. */
16 
17 #include "ia_css_pipeline.h"
18 #include "ia_css_isp_states.h"
19 #include "ia_css_debug.h"
20 #include "assert_support.h"
21 
22 /* Code generated by genparam/genstate.c:gen_init_function() */
23 
24 static void
ia_css_initialize_aa_state(const struct ia_css_binary * binary)25 ia_css_initialize_aa_state(
26     const struct ia_css_binary *binary)
27 {
28 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
29 			    "ia_css_initialize_aa_state() enter:\n");
30 
31 	{
32 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
33 
34 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
35 
36 		if (size)
37 			memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
38 			       0, size);
39 	}
40 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
41 			    "ia_css_initialize_aa_state() leave:\n");
42 }
43 
44 /* Code generated by genparam/genstate.c:gen_init_function() */
45 
46 static void
ia_css_initialize_cnr_state(const struct ia_css_binary * binary)47 ia_css_initialize_cnr_state(
48     const struct ia_css_binary *binary)
49 {
50 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
51 			    "ia_css_initialize_cnr_state() enter:\n");
52 
53 	{
54 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
55 
56 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
57 
58 		if (size) {
59 			ia_css_init_cnr_state(
60 			    &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
61 			    size);
62 		}
63 	}
64 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
65 			    "ia_css_initialize_cnr_state() leave:\n");
66 }
67 
68 /* Code generated by genparam/genstate.c:gen_init_function() */
69 
70 static void
ia_css_initialize_cnr2_state(const struct ia_css_binary * binary)71 ia_css_initialize_cnr2_state(
72     const struct ia_css_binary *binary)
73 {
74 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
75 			    "ia_css_initialize_cnr2_state() enter:\n");
76 
77 	{
78 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
79 
80 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
81 
82 		if (size) {
83 			ia_css_init_cnr2_state(
84 			    &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
85 			    size);
86 		}
87 	}
88 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
89 			    "ia_css_initialize_cnr2_state() leave:\n");
90 }
91 
92 /* Code generated by genparam/genstate.c:gen_init_function() */
93 
94 static void
ia_css_initialize_dp_state(const struct ia_css_binary * binary)95 ia_css_initialize_dp_state(
96     const struct ia_css_binary *binary)
97 {
98 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
99 			    "ia_css_initialize_dp_state() enter:\n");
100 
101 	{
102 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
103 
104 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
105 
106 		if (size) {
107 			ia_css_init_dp_state(
108 			    &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
109 			    size);
110 		}
111 	}
112 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
113 			    "ia_css_initialize_dp_state() leave:\n");
114 }
115 
116 /* Code generated by genparam/genstate.c:gen_init_function() */
117 
118 static void
ia_css_initialize_de_state(const struct ia_css_binary * binary)119 ia_css_initialize_de_state(
120     const struct ia_css_binary *binary)
121 {
122 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
123 			    "ia_css_initialize_de_state() enter:\n");
124 
125 	{
126 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
127 
128 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
129 
130 		if (size) {
131 			ia_css_init_de_state(
132 			    &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
133 			    size);
134 		}
135 	}
136 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
137 			    "ia_css_initialize_de_state() leave:\n");
138 }
139 
140 /* Code generated by genparam/genstate.c:gen_init_function() */
141 
142 static void
ia_css_initialize_tnr_state(const struct ia_css_binary * binary)143 ia_css_initialize_tnr_state(
144     const struct ia_css_binary *binary)
145 {
146 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
147 			    "ia_css_initialize_tnr_state() enter:\n");
148 
149 	{
150 		unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
151 
152 		unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
153 
154 		if (size) {
155 			ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
156 					      &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
157 					      size);
158 		}
159 	}
160 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
161 			    "ia_css_initialize_tnr_state() leave:\n");
162 }
163 
164 /* Code generated by genparam/genstate.c:gen_init_function() */
165 
166 static void
ia_css_initialize_ref_state(const struct ia_css_binary * binary)167 ia_css_initialize_ref_state(
168     const struct ia_css_binary *binary)
169 {
170 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
171 			    "ia_css_initialize_ref_state() enter:\n");
172 
173 	{
174 		unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
175 
176 		unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
177 
178 		if (size) {
179 			ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
180 					      &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
181 					      size);
182 		}
183 	}
184 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
185 			    "ia_css_initialize_ref_state() leave:\n");
186 }
187 
188 /* Code generated by genparam/genstate.c:gen_init_function() */
189 
190 static void
ia_css_initialize_ynr_state(const struct ia_css_binary * binary)191 ia_css_initialize_ynr_state(
192     const struct ia_css_binary *binary)
193 {
194 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
195 			    "ia_css_initialize_ynr_state() enter:\n");
196 
197 	{
198 		unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
199 
200 		unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
201 
202 		if (size) {
203 			ia_css_init_ynr_state(
204 			    &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
205 			    size);
206 		}
207 	}
208 	ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
209 			    "ia_css_initialize_ynr_state() leave:\n");
210 }
211 
212 /* Code generated by genparam/genstate.c:gen_state_init_table() */
213 
214 void (*ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
215     const struct ia_css_binary *binary) = {
216 	ia_css_initialize_aa_state,
217 	ia_css_initialize_cnr_state,
218 	ia_css_initialize_cnr2_state,
219 	ia_css_initialize_dp_state,
220 	ia_css_initialize_de_state,
221 	ia_css_initialize_tnr_state,
222 	ia_css_initialize_ref_state,
223 	ia_css_initialize_ynr_state,
224 };
225