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