• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 _H_MSM_VPU_H_
20 #define _H_MSM_VPU_H_
21 #include <linux/videodev2.h>
22 #define V4L2_BUF_FLAG_CDS_ENABLE 0x10000000
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define V4L2_PLANE_MEM_OFFSET 0
25 enum vpu_colorspace {
26  VPU_CS_MIN = 0,
27  VPU_CS_RGB_FULL = 1,
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29  VPU_CS_RGB_LIMITED = 2,
30  VPU_CS_REC601_FULL = 3,
31  VPU_CS_REC601_LIMITED = 4,
32  VPU_CS_REC709_FULL = 5,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  VPU_CS_REC709_LIMITED = 6,
35  VPU_CS_SMPTE240_FULL = 7,
36  VPU_CS_SMPTE240_LIMITED = 8,
37  VPU_CS_MAX = 9,
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 };
40 #define VPU_FMT_EXT_FLAG_BT 1
41 #define VPU_FMT_EXT_FLAG_TB 2
42 #define VPU_FMT_EXT_FLAG_3D 4
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 struct v4l2_format_vpu_extension {
45  __u8 flag;
46  __u8 gap_in_lines;
47 };
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define V4L2_PIX_FMT_XRGB2 v4l2_fourcc('X', 'R', 'G', '2')
50 #define V4L2_PIX_FMT_XBGR2 v4l2_fourcc('X', 'B', 'G', '2')
51 #define V4L2_PIX_FMT_YUYV10 v4l2_fourcc('Y', 'U', 'Y', 'L')
52 #define V4L2_PIX_FMT_YUV8 v4l2_fourcc('Y', 'U', 'V', '8')
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define V4L2_PIX_FMT_YUV10 v4l2_fourcc('Y', 'U', 'V', 'L')
55 #define V4L2_PIX_FMT_YUYV10BWC v4l2_fourcc('Y', 'B', 'W', 'C')
56 #define VPU_INPUT_TYPE_HOST 0
57 #define VPU_INPUT_TYPE_VCAP 1
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define VPU_OUTPUT_TYPE_HOST 0
60 #define VPU_OUTPUT_TYPE_DISPLAY 1
61 #define VPU_PIPE_VCAP0 (1 << 16)
62 #define VPU_PIPE_VCAP1 (1 << 17)
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define VPU_PIPE_DISPLAY0 (1 << 18)
65 #define VPU_PIPE_DISPLAY1 (1 << 19)
66 #define VPU_PIPE_DISPLAY2 (1 << 20)
67 #define VPU_PIPE_DISPLAY3 (1 << 21)
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define VPU_PRIVATE_EVENT_BASE (V4L2_EVENT_PRIVATE_START + 6 * 1000)
70 enum VPU_PRIVATE_EVENT {
71  VPU_EVENT_START = VPU_PRIVATE_EVENT_BASE,
72  VPU_EVENT_FLUSH_DONE = VPU_EVENT_START + 1,
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  VPU_EVENT_ACTIVE_REGION_CHANGED = VPU_EVENT_START + 2,
75  VPU_EVENT_SESSION_TIMESTAMP = VPU_EVENT_START + 3,
76  VPU_EVENT_SESSION_CREATED = VPU_EVENT_START + 4,
77  VPU_EVENT_SESSION_FREED = VPU_EVENT_START + 5,
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  VPU_EVENT_SESSION_CLIENT_EXITED = VPU_EVENT_START + 6,
80  VPU_EVENT_HW_ERROR = VPU_EVENT_START + 11,
81  VPU_EVENT_INVALID_CONFIG = VPU_EVENT_START + 12,
82  VPU_EVENT_FAILED_SESSION_STREAMING = VPU_EVENT_START + 13,
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  VPU_EVENT_END
85 };
86 struct vpu_ctrl_standard {
87  __u32 enable;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  __s32 value;
90 };
91 struct vpu_ctrl_auto_manual {
92  __u32 enable;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  __u32 auto_mode;
95  __s32 value;
96 };
97 struct vpu_ctrl_range_mapping {
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  __u32 enable;
100  __u32 y_range;
101  __u32 uv_range;
102 };
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define VPU_ACTIVE_REGION_N_EXCLUSIONS 1
105 struct vpu_ctrl_active_region_param {
106  __u32 enable;
107  __u32 num_exclusions;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  struct v4l2_rect detection_region;
110  struct v4l2_rect excluded_regions[VPU_ACTIVE_REGION_N_EXCLUSIONS];
111 };
112 struct vpu_ctrl_deinterlacing_mode {
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  __u32 field_polarity;
115  __u32 mvp_mode;
116 };
117 struct vpu_ctrl_hqv {
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  __u32 enable;
120  __u32 sharpen_strength;
121  __u32 auto_nr_strength;
122 };
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 struct vpu_info_frame_timestamp {
125  __u32 pts_low;
126  __u32 pts_high;
127  __u32 qtime_low;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  __u32 qtime_high;
130 };
131 struct vpu_control {
132  __u32 control_id;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  union control_data {
135  __s32 value;
136  struct vpu_ctrl_standard standard;
137  struct vpu_ctrl_auto_manual auto_manual;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  struct vpu_ctrl_range_mapping range_mapping;
140  struct vpu_ctrl_active_region_param active_region_param;
141  struct v4l2_rect active_region_result;
142  struct vpu_ctrl_deinterlacing_mode deinterlacing_mode;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  struct vpu_ctrl_hqv hqv;
145  struct vpu_info_frame_timestamp timestamp;
146  __u8 reserved[124];
147  } data;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 };
150 #define VPU_CTRL_ID_MIN 0
151 #define VPU_CTRL_NOISE_REDUCTION 1
152 #define VPU_CTRL_IMAGE_ENHANCEMENT 2
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define VPU_CTRL_ANAMORPHIC_SCALING 3
155 #define VPU_CTRL_DIRECTIONAL_INTERPOLATION 4
156 #define VPU_CTRL_BACKGROUND_COLOR 5
157 #define VPU_CTRL_RANGE_MAPPING 6
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define VPU_CTRL_DEINTERLACING_MODE 7
160 #define VPU_CTRL_ACTIVE_REGION_PARAM 8
161 #define VPU_CTRL_ACTIVE_REGION_RESULT 9
162 #define VPU_CTRL_PRIORITY 10
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define VPU_CTRL_CONTENT_PROTECTION 11
165 #define VPU_CTRL_DISPLAY_REFRESH_RATE 12
166 #define VPU_CTRL_HQV 20
167 #define VPU_CTRL_HQV_SHARPEN 21
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 #define VPU_CTRL_HQV_AUTONR 22
170 #define VPU_CTRL_ACE 23
171 #define VPU_CTRL_ACE_BRIGHTNESS 24
172 #define VPU_CTRL_ACE_CONTRAST 25
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 #define VPU_CTRL_2D3D 26
175 #define VPU_CTRL_2D3D_DEPTH 27
176 #define VPU_CTRL_FRC 28
177 #define VPU_CTRL_FRC_MOTION_SMOOTHNESS 29
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 #define VPU_CTRL_FRC_MOTION_CLEAR 30
180 #define VPU_INFO_TIMESTAMP 35
181 #define VPU_CTRL_TIMESTAMP_INFO_MODE 36
182 #define VPU_INFO_STATISTICS 37
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #define VPU_CTRL_LATENCY 38
185 #define VPU_CTRL_LATENCY_MODE 39
186 #define VPU_CTRL_ID_MAX 40
187 #define VPU_MAX_EXT_DATA_SIZE 720
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 struct vpu_control_extended {
190  __u32 type;
191  __u32 data_len;
192  void __user *data_ptr;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  __u32 buf_size;
195  void __user *buf_ptr;
196 };
197 struct vpu_control_port {
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  __u32 control_id;
200  __u32 port;
201  union control_port_data {
202  __u32 framerate;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  } data;
205 };
206 #define VPU_CTRL_FPS 1000
207 #define VPU_ATTACH_TO_SESSION _IOW('V', (BASE_VIDIOC_PRIVATE + 1), int)
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define VPU_QUERY_SESSIONS _IOR('V', (BASE_VIDIOC_PRIVATE + 0), int)
210 #define VPU_CREATE_SESSION _IOR('V', (BASE_VIDIOC_PRIVATE + 2), int)
211 #define VPU_JOIN_SESSION _IOW('V', (BASE_VIDIOC_PRIVATE + 3), int)
212 #define VPU_CREATE_OUTPUT2 _IO('V', (BASE_VIDIOC_PRIVATE + 5))
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define VPU_COMMIT_CONFIGURATION _IO('V', (BASE_VIDIOC_PRIVATE + 10))
215 #define VPU_FLUSH_BUFS _IOW('V', (BASE_VIDIOC_PRIVATE + 15),   enum v4l2_buf_type)
216 #define VPU_G_CONTROL _IOWR('V', (BASE_VIDIOC_PRIVATE + 20),   struct vpu_control)
217 #define VPU_S_CONTROL _IOW('V', (BASE_VIDIOC_PRIVATE + 21),   struct vpu_control)
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define VPU_G_CONTROL_EXTENDED _IOWR('V', (BASE_VIDIOC_PRIVATE + 22),   struct vpu_control_extended)
220 #define VPU_S_CONTROL_EXTENDED _IOW('V', (BASE_VIDIOC_PRIVATE + 23),   struct vpu_control_extended)
221 #define VPU_G_CONTROL_PORT _IOWR('V', (BASE_VIDIOC_PRIVATE + 24),   struct vpu_control_port)
222 #define VPU_S_CONTROL_PORT _IOW('V', (BASE_VIDIOC_PRIVATE + 25),   struct vpu_control_port)
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #endif
225 
226