1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef _SH_CSS_SP_H_
17#define _SH_CSS_SP_H_
18
19#include <system_global.h>
20#include <type_support.h>
21#if !defined(ISP2401)
22#include "input_formatter.h"
23#endif
24
25#include "ia_css_binary.h"
26#include "ia_css_types.h"
27#include "ia_css_pipeline.h"
28
29
30void
31sh_css_sp_store_init_dmem(const struct ia_css_fw_info *fw);
32
33void
34store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num,
35 unsigned int stage);
36
37void
38sh_css_stage_write_binary_info(struct ia_css_binary_info *info);
39
40void
41store_sp_group_data(void);
42
43
44void
45sh_css_sp_start_binary_copy(unsigned int pipe_num,
46 struct ia_css_frame *out_frame,
47 unsigned int two_ppc);
48
49unsigned int
50sh_css_sp_get_binary_copy_size(void);
51
52
53unsigned int
54sh_css_sp_get_sw_interrupt_value(unsigned int irq);
55
56void
57sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
58 enum ia_css_pipe_id id,
59 u8 pipe_num,
60 bool xnr,
61 bool two_ppc,
62 bool continuous,
63 bool offline,
64 unsigned int required_bds_factor,
65 enum sh_css_pipe_config_override copy_ovrd,
66 enum ia_css_input_mode input_mode,
67 const struct ia_css_metadata_config *md_config,
68 const struct ia_css_metadata_info *md_info,
69 const enum mipi_port_id port_id,
70 const struct ia_css_coordinate
71 *internal_frame_origin_bqs_on_sctbl,
72
73 const struct ia_css_isp_parameters *params
74 );
75
76void
77sh_css_sp_uninit_pipeline(unsigned int pipe_num);
78
79bool sh_css_write_host2sp_command(enum host2sp_commands host2sp_command);
80
81enum host2sp_commands
82sh_css_read_host2sp_command(void);
83
84void
85sh_css_init_host2sp_frame_data(void);
86
87
88
89
90
91
92
93void
94sh_css_update_host2sp_offline_frame(
95 unsigned int frame_num,
96 struct ia_css_frame *frame,
97 struct ia_css_metadata *metadata);
98
99
100
101
102
103
104
105void
106sh_css_update_host2sp_mipi_frame(
107 unsigned int frame_num,
108 struct ia_css_frame *frame);
109
110
111
112
113
114
115
116void
117sh_css_update_host2sp_mipi_metadata(
118 unsigned int frame_num,
119 struct ia_css_metadata *metadata);
120
121
122
123
124
125
126void
127sh_css_update_host2sp_num_mipi_frames(unsigned int num_frames);
128
129
130
131
132
133
134void
135sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
136 bool set_avail);
137
138void
139sh_css_event_init_irq_mask(void);
140
141void
142sh_css_sp_start_isp(void);
143
144void
145sh_css_sp_set_sp_running(bool flag);
146
147bool
148sh_css_sp_is_running(void);
149
150#if SP_DEBUG != SP_DEBUG_NONE
151
152void
153sh_css_sp_get_debug_state(struct sh_css_sp_debug_state *state);
154
155#endif
156
157#if !defined(ISP2401)
158void
159sh_css_sp_set_if_configs(
160 const input_formatter_cfg_t *config_a,
161 const input_formatter_cfg_t *config_b,
162 const uint8_t if_config_index);
163#endif
164
165void
166sh_css_sp_program_input_circuit(int fmt_type,
167 int ch_id,
168 enum ia_css_input_mode input_mode);
169
170void
171sh_css_sp_configure_sync_gen(int width,
172 int height,
173 int hblank_cycles,
174 int vblank_cycles);
175
176void
177sh_css_sp_configure_tpg(int x_mask,
178 int y_mask,
179 int x_delta,
180 int y_delta,
181 int xy_mask);
182
183void
184sh_css_sp_configure_prbs(int seed);
185
186void
187sh_css_sp_configure_enable_raw_pool_locking(bool lock_all);
188
189void
190sh_css_sp_enable_isys_event_queue(bool enable);
191
192void
193sh_css_sp_set_disable_continuous_viewfinder(bool flag);
194
195void
196sh_css_sp_reset_global_vars(void);
197
198
199
200
201
202
203
204
205
206
207
208
209
210bool
211sh_css_sp_init_dma_sw_reg(int dma_id);
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235bool
236sh_css_sp_set_dma_sw_reg(int dma_id,
237 int channel_id,
238 int request_type,
239 bool enable);
240
241extern struct sh_css_sp_group sh_css_sp_group;
242extern struct sh_css_sp_stage sh_css_sp_stage;
243extern struct sh_css_isp_stage sh_css_isp_stage;
244
245#endif
246