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 MAX_NUM_CPP_STRIPS 8
31 #define MSM_CPP_MAX_NUM_PLANES 3
32 #define MSM_CPP_MAX_FRAME_LENGTH 1024
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define MSM_CPP_MAX_FW_NAME_LEN 32
35 #define MAX_FREQ_TBL 10
36 enum msm_cpp_frame_type {
37  MSM_CPP_OFFLINE_FRAME,
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  MSM_CPP_REALTIME_FRAME,
40 };
41 enum msm_vpe_frame_type {
42  MSM_VPE_OFFLINE_FRAME,
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  MSM_VPE_REALTIME_FRAME,
45 };
46 struct msm_cpp_frame_strip_info {
47  uint32_t scale_v_en;
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  uint32_t scale_h_en;
50  uint32_t upscale_v_en;
51  uint32_t upscale_h_en;
52  int32_t src_start_x;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  uint32_t src_end_x;
55  int32_t src_start_y;
56  uint32_t src_end_y;
57  int32_t temporal_src_start_x;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  uint32_t temporal_src_end_x;
60  int32_t temporal_src_start_y;
61  uint32_t temporal_src_end_y;
62  uint32_t pad_bottom;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  uint32_t pad_top;
65  uint32_t pad_right;
66  uint32_t pad_left;
67  uint32_t v_init_phase;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  uint32_t h_init_phase;
70  uint32_t h_phase_step;
71  uint32_t v_phase_step;
72  uint32_t spatial_denoise_crop_width_first_pixel;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  uint32_t spatial_denoise_crop_width_last_pixel;
75  uint32_t spatial_denoise_crop_height_first_line;
76  uint32_t spatial_denoise_crop_height_last_line;
77  uint32_t sharpen_crop_height_first_line;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  uint32_t sharpen_crop_height_last_line;
80  uint32_t sharpen_crop_width_first_pixel;
81  uint32_t sharpen_crop_width_last_pixel;
82  uint32_t temporal_denoise_crop_width_first_pixel;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  uint32_t temporal_denoise_crop_width_last_pixel;
85  uint32_t temporal_denoise_crop_height_first_line;
86  uint32_t temporal_denoise_crop_height_last_line;
87  uint32_t prescaler_spatial_denoise_crop_width_first_pixel;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  uint32_t prescaler_spatial_denoise_crop_width_last_pixel;
90  uint32_t prescaler_spatial_denoise_crop_height_first_line;
91  uint32_t prescaler_spatial_denoise_crop_height_last_line;
92  uint32_t state_crop_width_first_pixel;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  uint32_t state_crop_width_last_pixel;
95  uint32_t state_crop_height_first_line;
96  uint32_t state_crop_height_last_line;
97  int32_t dst_start_x;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  uint32_t dst_end_x;
100  int32_t dst_start_y;
101  uint32_t dst_end_y;
102  int32_t temporal_dst_start_x;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  uint32_t temporal_dst_end_x;
105  int32_t temporal_dst_start_y;
106  uint32_t temporal_dst_end_y;
107  uint32_t input_bytes_per_pixel;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  uint32_t output_bytes_per_pixel;
110  uint32_t temporal_bytes_per_pixel;
111  unsigned int source_address[2];
112  unsigned int destination_address[2];
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  unsigned int temporal_source_address[2];
115  unsigned int temporal_destination_address[2];
116  unsigned int src_stride;
117  unsigned int dst_stride;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  uint32_t rotate_270;
120  uint32_t horizontal_flip;
121  uint32_t vertical_flip;
122  uint32_t scale_output_width;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  uint32_t scale_output_height;
125  uint32_t spatial_denoise_crop_en;
126  uint32_t sharpen_crop_en;
127  uint32_t temporal_denoise_crop_en;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  uint32_t prescaler_spatial_denoise_crop_en;
130  uint32_t state_crop_en;
131 };
132 struct msm_cpp_buffer_info_t {
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  int fd;
135  uint32_t index;
136  uint32_t offset;
137  uint8_t native_buff;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  uint8_t processed_divert;
140  uint32_t identity;
141 };
142 struct msm_cpp_stream_buff_info_t {
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  uint32_t identity;
145  uint32_t num_buffs;
146  struct msm_cpp_buffer_info_t *buffer_info;
147 };
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 struct msm_cpp_frame_info_t {
150  int32_t frame_id;
151  struct timeval timestamp;
152  uint32_t inst_id;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  uint32_t identity;
155  uint32_t client_id;
156  enum msm_cpp_frame_type frame_type;
157  uint32_t num_strips;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  struct msm_cpp_frame_strip_info *strip_info;
160  uint32_t msg_len;
161  uint32_t *cpp_cmd_msg;
162  int src_fd;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  int dst_fd;
165  struct ion_handle *src_ion_handle;
166  struct ion_handle *dest_ion_handle;
167  struct timeval in_time, out_time;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  void *cookie;
170  int32_t *status;
171  int32_t duplicate_output;
172  uint32_t duplicate_identity;
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  struct msm_cpp_buffer_info_t input_buffer_info;
175  struct msm_cpp_buffer_info_t output_buffer_info[2];
176 };
177 struct cpp_hw_info {
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  uint32_t cpp_hw_version;
180  uint32_t cpp_hw_caps;
181  unsigned long freq_tbl[MAX_FREQ_TBL];
182  uint32_t freq_tbl_count;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 };
185 struct msm_vpe_frame_strip_info {
186  uint32_t src_w;
187  uint32_t src_h;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  uint32_t dst_w;
190  uint32_t dst_h;
191  uint32_t src_x;
192  uint32_t src_y;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  uint32_t phase_step_x;
195  uint32_t phase_step_y;
196  uint32_t phase_init_x;
197  uint32_t phase_init_y;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 };
200 struct msm_vpe_buffer_info_t {
201  int fd;
202  uint32_t index;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  uint32_t offset;
205  uint8_t native_buff;
206  uint8_t processed_divert;
207 };
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 struct msm_vpe_stream_buff_info_t {
210  uint32_t identity;
211  uint32_t num_buffs;
212  struct msm_vpe_buffer_info_t *buffer_info;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 };
215 struct msm_vpe_frame_info_t {
216  int32_t frame_id;
217  struct timeval timestamp;
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219  uint32_t inst_id;
220  uint32_t identity;
221  uint32_t client_id;
222  enum msm_vpe_frame_type frame_type;
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  struct msm_vpe_frame_strip_info strip_info;
225  int src_fd;
226  int dst_fd;
227  struct ion_handle *src_ion_handle;
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  struct ion_handle *dest_ion_handle;
230  unsigned long src_phyaddr;
231  unsigned long dest_phyaddr;
232  unsigned long src_chroma_plane_offset;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234  unsigned long dest_chroma_plane_offset;
235  struct timeval in_time, out_time;
236  void *cookie;
237  struct msm_vpe_buffer_info_t input_buffer_info;
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239  struct msm_vpe_buffer_info_t output_buffer_info;
240 };
241 struct msm_pproc_queue_buf_info {
242  struct msm_buf_mngr_info buff_mgr_info;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  uint8_t is_buf_dirty;
245 };
246 #define VIDIOC_MSM_CPP_CFG   _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t)
247 #define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD   _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 #define VIDIOC_MSM_CPP_GET_INST_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
250 #define VIDIOC_MSM_CPP_LOAD_FIRMWARE   _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t)
251 #define VIDIOC_MSM_CPP_GET_HW_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t)
252 #define VIDIOC_MSM_CPP_FLUSH_QUEUE   _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t)
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 #define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t)
255 #define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t)
256 #define VIDIOC_MSM_VPE_CFG   _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t)
257 #define VIDIOC_MSM_VPE_TRANSACTION_SETUP   _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t)
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 #define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD   _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t)
260 #define VIDIOC_MSM_VPE_GET_INST_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t)
261 #define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t)
262 #define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t)
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 #define VIDIOC_MSM_CPP_QUEUE_BUF   _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t)
265 #define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO   _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t)
266 #define VIDIOC_MSM_CPP_SET_CLOCK   _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t)
267 #define VIDIOC_MSM_CPP_POP_STREAM_BUFFER   _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t)
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 #define VIDIOC_MSM_CPP_IOMMU_ATTACH   _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t)
270 #define VIDIOC_MSM_CPP_IOMMU_DETACH   _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t)
271 #define VIDIOC_MSM_CPP_DELETE_STREAM_BUFF  _IOWR('V', BASE_VIDIOC_PRIVATE + 20, struct msm_camera_v4l2_ioctl_t)
272 #define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0)
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 #define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1)
275 struct msm_camera_v4l2_ioctl_t {
276  uint32_t id;
277  uint32_t len;
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279  int32_t trans_code;
280  void __user *ioctl_ptr;
281 };
282 #endif
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 
285