1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef __MSMB_PPROC_H
20 #define __MSMB_PPROC_H
21 #ifdef MSM_CAMERA_BIONIC
22 #include <sys/types.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #endif
25 #include <linux/videodev2.h>
26 #include <linux/types.h>
27 #include <media/msmb_generic_buf_mgr.h>
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define MAX_PLANES VIDEO_MAX_PLANES
30 #define PARTIAL_FRAME_STRIPE_COUNT 4
31 #define MAX_NUM_CPP_STRIPS 8
32 #define MSM_CPP_MAX_NUM_PLANES 3
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define MSM_CPP_MIN_FRAME_LENGTH 13
35 #define MSM_CPP_MAX_FRAME_LENGTH 4096
36 #define MSM_CPP_MAX_FW_NAME_LEN 32
37 #define MAX_FREQ_TBL 10
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 enum msm_cpp_frame_type {
40   MSM_CPP_OFFLINE_FRAME,
41   MSM_CPP_REALTIME_FRAME,
42 };
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 enum msm_vpe_frame_type {
45   MSM_VPE_OFFLINE_FRAME,
46   MSM_VPE_REALTIME_FRAME,
47 };
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 struct msm_cpp_frame_strip_info {
50   uint32_t scale_v_en;
51   uint32_t scale_h_en;
52   uint32_t upscale_v_en;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54   uint32_t upscale_h_en;
55   int32_t src_start_x;
56   uint32_t src_end_x;
57   int32_t src_start_y;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   uint32_t src_end_y;
60   int32_t extra_src_start_x;
61   int32_t extra_src_end_x;
62   int32_t extra_src_start_y;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   int32_t extra_src_end_y;
65   int32_t extra_initial_vertical_count[2];
66   int32_t extra_initial_horizontal_count[2];
67   int32_t extra_left_crop;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   int32_t extra_top_crop;
70   int32_t extra_pad_bottom;
71   int32_t extra_pad_top;
72   int32_t extra_pad_right;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   int32_t extra_pad_left;
75   int32_t extra_upscale_width;
76   int32_t extra_upscale_height;
77   uint32_t temporal_pad_bottom;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79   uint32_t temporal_pad_top;
80   uint32_t temporal_pad_right;
81   uint32_t temporal_pad_left;
82   int32_t temporal_src_start_x;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   uint32_t temporal_src_end_x;
85   int32_t temporal_src_start_y;
86   uint32_t temporal_src_end_y;
87   uint32_t pad_bottom;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   uint32_t pad_top;
90   uint32_t pad_right;
91   uint32_t pad_left;
92   uint32_t v_init_phase;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   uint32_t h_init_phase;
95   uint32_t h_phase_step;
96   uint32_t v_phase_step;
97   uint32_t spatial_denoise_crop_width_first_pixel;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   uint32_t spatial_denoise_crop_width_last_pixel;
100   uint32_t spatial_denoise_crop_height_first_line;
101   uint32_t spatial_denoise_crop_height_last_line;
102   uint32_t sharpen_crop_height_first_line;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   uint32_t sharpen_crop_height_last_line;
105   uint32_t sharpen_crop_width_first_pixel;
106   uint32_t sharpen_crop_width_last_pixel;
107   uint32_t temporal_denoise_crop_width_first_pixel;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   uint32_t temporal_denoise_crop_width_last_pixel;
110   uint32_t temporal_denoise_crop_height_first_line;
111   uint32_t temporal_denoise_crop_height_last_line;
112   uint32_t prescaler_spatial_denoise_crop_width_first_pixel;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114   uint32_t prescaler_spatial_denoise_crop_width_last_pixel;
115   uint32_t prescaler_spatial_denoise_crop_height_first_line;
116   uint32_t prescaler_spatial_denoise_crop_height_last_line;
117   uint32_t state_crop_width_first_pixel;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   uint32_t state_crop_width_last_pixel;
120   uint32_t state_crop_height_first_line;
121   uint32_t state_crop_height_last_line;
122   int32_t dst_start_x;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124   uint32_t dst_end_x;
125   int32_t dst_start_y;
126   uint32_t dst_end_y;
127   int32_t temporal_dst_start_x;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129   uint32_t temporal_dst_end_x;
130   int32_t temporal_dst_start_y;
131   uint32_t temporal_dst_end_y;
132   uint32_t input_bytes_per_pixel;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134   uint32_t output_bytes_per_pixel;
135   uint32_t temporal_bytes_per_pixel;
136   uint32_t source_address[2];
137   uint32_t extra_source_address[2];
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   uint32_t destination_address[2];
140   uint32_t temporal_source_address[2];
141   uint32_t temporal_destination_address[2];
142   uint32_t src_stride;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144   uint32_t dst_stride;
145   uint32_t rotate_270;
146   uint32_t horizontal_flip;
147   uint32_t vertical_flip;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149   uint32_t scale_output_width;
150   uint32_t scale_output_height;
151   uint32_t spatial_denoise_crop_en;
152   uint32_t sharpen_crop_en;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   uint32_t temporal_denoise_crop_en;
155   uint32_t prescaler_spatial_denoise_crop_en;
156   uint32_t state_crop_en;
157   int32_t we_h_init;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159   int32_t we_v_init;
160   int32_t we_h_step;
161   int32_t we_v_step;
162 };
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 struct msm_cpp_buffer_info_t {
165   int32_t fd;
166   uint32_t index;
167   uint32_t offset;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   uint8_t native_buff;
170   uint8_t processed_divert;
171   uint32_t identity;
172 };
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 struct msm_cpp_stream_buff_info_t {
175   uint32_t identity;
176   uint32_t num_buffs;
177   struct msm_cpp_buffer_info_t * buffer_info;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 };
180 enum msm_cpp_batch_mode_t {
181   BATCH_MODE_NONE,
182   BATCH_MODE_VIDEO,
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   BATCH_MODE_PREVIEW
185 };
186 struct msm_cpp_batch_info_t {
187   enum msm_cpp_batch_mode_t batch_mode;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189   uint32_t batch_size;
190   uint32_t intra_plane_offset[MAX_PLANES];
191   uint32_t pick_preview_idx;
192   uint32_t cont_idx;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 };
195 struct msm_cpp_frame_info_t {
196   int32_t frame_id;
197   struct timeval timestamp;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   uint32_t inst_id;
200   uint32_t identity;
201   uint32_t client_id;
202   enum msm_cpp_frame_type frame_type;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   uint32_t num_strips;
205   struct msm_cpp_frame_strip_info __user * strip_info;
206   uint32_t msg_len;
207   uint32_t * cpp_cmd_msg;
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209   int src_fd;
210   int dst_fd;
211   struct timeval in_time, out_time;
212   void __user * cookie;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214   int32_t * status;
215   int32_t duplicate_output;
216   uint32_t duplicate_identity;
217   uint32_t feature_mask;
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219   uint8_t we_disable;
220   struct msm_cpp_buffer_info_t input_buffer_info;
221   struct msm_cpp_buffer_info_t output_buffer_info[8];
222   struct msm_cpp_buffer_info_t duplicate_buffer_info;
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224   struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2];
225   uint32_t reserved;
226   uint8_t partial_frame_indicator;
227   uint8_t first_payload;
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229   uint8_t last_payload;
230   uint32_t first_stripe_index;
231   uint32_t last_stripe_index;
232   uint32_t stripe_info_offset;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234   uint32_t stripe_info;
235   struct msm_cpp_batch_info_t batch_info;
236 };
237 struct msm_cpp_pop_stream_info_t {
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239   int32_t frame_id;
240   uint32_t identity;
241 };
242 struct cpp_hw_info {
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244   uint32_t cpp_hw_version;
245   uint32_t cpp_hw_caps;
246   unsigned long freq_tbl[MAX_FREQ_TBL];
247   uint32_t freq_tbl_count;
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 };
250 struct msm_vpe_frame_strip_info {
251   uint32_t src_w;
252   uint32_t src_h;
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254   uint32_t dst_w;
255   uint32_t dst_h;
256   uint32_t src_x;
257   uint32_t src_y;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259   uint32_t phase_step_x;
260   uint32_t phase_step_y;
261   uint32_t phase_init_x;
262   uint32_t phase_init_y;
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 };
265 struct msm_vpe_buffer_info_t {
266   int32_t fd;
267   uint32_t index;
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269   uint32_t offset;
270   uint8_t native_buff;
271   uint8_t processed_divert;
272 };
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 struct msm_vpe_stream_buff_info_t {
275   uint32_t identity;
276   uint32_t num_buffs;
277   struct msm_vpe_buffer_info_t * buffer_info;
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 };
280 struct msm_vpe_frame_info_t {
281   int32_t frame_id;
282   struct timeval timestamp;
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284   uint32_t inst_id;
285   uint32_t identity;
286   uint32_t client_id;
287   enum msm_vpe_frame_type frame_type;
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289   struct msm_vpe_frame_strip_info strip_info;
290   unsigned long src_fd;
291   unsigned long dst_fd;
292   struct ion_handle * src_ion_handle;
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294   struct ion_handle * dest_ion_handle;
295   unsigned long src_phyaddr;
296   unsigned long dest_phyaddr;
297   unsigned long src_chroma_plane_offset;
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299   unsigned long dest_chroma_plane_offset;
300   struct timeval in_time, out_time;
301   void * cookie;
302   struct msm_vpe_buffer_info_t input_buffer_info;
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304   struct msm_vpe_buffer_info_t output_buffer_info;
305 };
306 struct msm_pproc_queue_buf_info {
307   struct msm_buf_mngr_info buff_mgr_info;
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309   uint8_t is_buf_dirty;
310 };
311 struct msm_cpp_clock_settings_t {
312   unsigned long clock_rate;
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314   uint64_t avg;
315   uint64_t inst;
316 };
317 #define VIDIOC_MSM_CPP_CFG _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t)
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319 #define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
320 #define VIDIOC_MSM_CPP_GET_INST_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
321 #define VIDIOC_MSM_CPP_LOAD_FIRMWARE _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t)
322 #define VIDIOC_MSM_CPP_GET_HW_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t)
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324 #define VIDIOC_MSM_CPP_FLUSH_QUEUE _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t)
325 #define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t)
326 #define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t)
327 #define VIDIOC_MSM_VPE_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t)
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329 #define VIDIOC_MSM_VPE_TRANSACTION_SETUP _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t)
330 #define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t)
331 #define VIDIOC_MSM_VPE_GET_INST_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t)
332 #define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t)
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 #define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t)
335 #define VIDIOC_MSM_CPP_QUEUE_BUF _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t)
336 #define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t)
337 #define VIDIOC_MSM_CPP_SET_CLOCK _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t)
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339 #define VIDIOC_MSM_CPP_POP_STREAM_BUFFER _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t)
340 #define VIDIOC_MSM_CPP_IOMMU_ATTACH _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t)
341 #define VIDIOC_MSM_CPP_IOMMU_DETACH _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t)
342 #define VIDIOC_MSM_CPP_DELETE_STREAM_BUFF _IOWR('V', BASE_VIDIOC_PRIVATE + 20, struct msm_camera_v4l2_ioctl_t)
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344 #define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0)
345 #define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1)
346 struct msm_camera_v4l2_ioctl_t {
347   uint32_t id;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349   size_t len;
350   int32_t trans_code;
351   void __user * ioctl_ptr;
352 };
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354 #endif
355 
356