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_buffer_info_t {
50   int32_t fd;
51   uint32_t index;
52   uint32_t offset;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54   uint8_t native_buff;
55   uint8_t processed_divert;
56   uint32_t identity;
57 };
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 struct msm_cpp_stream_buff_info_t {
60   uint32_t identity;
61   uint32_t num_buffs;
62   struct msm_cpp_buffer_info_t * buffer_info;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 };
65 enum msm_cpp_batch_mode_t {
66   BATCH_MODE_NONE,
67   BATCH_MODE_VIDEO,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   BATCH_MODE_PREVIEW
70 };
71 struct msm_cpp_batch_info_t {
72   enum msm_cpp_batch_mode_t batch_mode;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   uint32_t batch_size;
75   uint32_t intra_plane_offset[MAX_PLANES];
76   uint32_t pick_preview_idx;
77   uint32_t cont_idx;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 };
80 struct msm_cpp_frame_info_t {
81   int32_t frame_id;
82   struct timeval timestamp;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   uint32_t inst_id;
85   uint32_t identity;
86   uint32_t client_id;
87   enum msm_cpp_frame_type frame_type;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   uint32_t num_strips;
90   uint32_t msg_len;
91   uint32_t * cpp_cmd_msg;
92   int src_fd;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   int dst_fd;
95   struct timeval in_time, out_time;
96   void __user * cookie;
97   int32_t * status;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   int32_t duplicate_output;
100   uint32_t duplicate_identity;
101   uint32_t feature_mask;
102   uint8_t we_disable;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   struct msm_cpp_buffer_info_t input_buffer_info;
105   struct msm_cpp_buffer_info_t output_buffer_info[8];
106   struct msm_cpp_buffer_info_t duplicate_buffer_info;
107   struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2];
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   uint32_t reserved;
110   uint8_t partial_frame_indicator;
111   uint8_t first_payload;
112   uint8_t last_payload;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114   uint32_t first_stripe_index;
115   uint32_t last_stripe_index;
116   uint32_t stripe_info_offset;
117   uint32_t stripe_info;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   struct msm_cpp_batch_info_t batch_info;
120 };
121 struct msm_cpp_pop_stream_info_t {
122   int32_t frame_id;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124   uint32_t identity;
125 };
126 struct cpp_hw_info {
127   uint32_t cpp_hw_version;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129   uint32_t cpp_hw_caps;
130   unsigned long freq_tbl[MAX_FREQ_TBL];
131   uint32_t freq_tbl_count;
132 };
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 struct msm_vpe_frame_strip_info {
135   uint32_t src_w;
136   uint32_t src_h;
137   uint32_t dst_w;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   uint32_t dst_h;
140   uint32_t src_x;
141   uint32_t src_y;
142   uint32_t phase_step_x;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144   uint32_t phase_step_y;
145   uint32_t phase_init_x;
146   uint32_t phase_init_y;
147 };
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 struct msm_vpe_buffer_info_t {
150   int32_t fd;
151   uint32_t index;
152   uint32_t offset;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   uint8_t native_buff;
155   uint8_t processed_divert;
156 };
157 struct msm_vpe_stream_buff_info_t {
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159   uint32_t identity;
160   uint32_t num_buffs;
161   struct msm_vpe_buffer_info_t * buffer_info;
162 };
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 struct msm_vpe_frame_info_t {
165   int32_t frame_id;
166   struct timeval timestamp;
167   uint32_t inst_id;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   uint32_t identity;
170   uint32_t client_id;
171   enum msm_vpe_frame_type frame_type;
172   struct msm_vpe_frame_strip_info strip_info;
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174   unsigned long src_fd;
175   unsigned long dst_fd;
176   struct ion_handle * src_ion_handle;
177   struct ion_handle * dest_ion_handle;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179   unsigned long src_phyaddr;
180   unsigned long dest_phyaddr;
181   unsigned long src_chroma_plane_offset;
182   unsigned long dest_chroma_plane_offset;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   struct timeval in_time, out_time;
185   void * cookie;
186   struct msm_vpe_buffer_info_t input_buffer_info;
187   struct msm_vpe_buffer_info_t output_buffer_info;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 };
190 struct msm_pproc_queue_buf_info {
191   struct msm_buf_mngr_info buff_mgr_info;
192   uint8_t is_buf_dirty;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 };
195 struct msm_cpp_clock_settings_t {
196   unsigned long clock_rate;
197   uint64_t avg;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   uint64_t inst;
200 };
201 #define VIDIOC_MSM_CPP_CFG _IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t)
202 #define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 #define VIDIOC_MSM_CPP_GET_INST_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
205 #define VIDIOC_MSM_CPP_LOAD_FIRMWARE _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t)
206 #define VIDIOC_MSM_CPP_GET_HW_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t)
207 #define VIDIOC_MSM_CPP_FLUSH_QUEUE _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t)
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t)
210 #define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t)
211 #define VIDIOC_MSM_VPE_CFG _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t)
212 #define VIDIOC_MSM_VPE_TRANSACTION_SETUP _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t)
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t)
215 #define VIDIOC_MSM_VPE_GET_INST_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t)
216 #define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t)
217 #define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t)
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define VIDIOC_MSM_CPP_QUEUE_BUF _IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t)
220 #define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO _IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t)
221 #define VIDIOC_MSM_CPP_SET_CLOCK _IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t)
222 #define VIDIOC_MSM_CPP_POP_STREAM_BUFFER _IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t)
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define VIDIOC_MSM_CPP_IOMMU_ATTACH _IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t)
225 #define VIDIOC_MSM_CPP_IOMMU_DETACH _IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t)
226 #define VIDIOC_MSM_CPP_DELETE_STREAM_BUFF _IOWR('V', BASE_VIDIOC_PRIVATE + 20, struct msm_camera_v4l2_ioctl_t)
227 #define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0)
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1)
230 struct msm_camera_v4l2_ioctl_t {
231   uint32_t id;
232   size_t len;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234   int32_t trans_code;
235   void __user * ioctl_ptr;
236 };
237 #endif
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 
240