• 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 _MSM_MDP_EXT_H_
20 #define _MSM_MDP_EXT_H_
21 #include <linux/msm_mdp.h>
22 #define MDP_IOCTL_MAGIC 'S'
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define MSMFB_ATOMIC_COMMIT _IOWR(MDP_IOCTL_MAGIC, 128, void *)
25 #define MSMFB_ASYNC_POSITION_UPDATE _IOWR(MDP_IOCTL_MAGIC, 129, struct mdp_position_update)
26 #define MSMFB_MDP_SET_CFG _IOW(MDP_IOCTL_MAGIC, 130, struct mdp_set_cfg)
27 #define MSMFB_MDP_SET_PANEL_PPM _IOW(MDP_IOCTL_MAGIC, 131, int)
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #ifdef __LP64
30 #define MDP_LAYER_COMMIT_V1_PAD 2
31 #else
32 #define MDP_LAYER_COMMIT_V1_PAD 3
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #endif
35 #define MDP_LAYER_FLIP_LR 0x1
36 #define MDP_LAYER_FLIP_UD 0x2
37 #define MDP_LAYER_ENABLE_PIXEL_EXT 0x4
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define MDP_LAYER_FORGROUND 0x8
40 #define MDP_LAYER_SECURE_SESSION 0x10
41 #define MDP_LAYER_SOLID_FILL 0x20
42 #define MDP_LAYER_DEINTERLACE 0x40
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define MDP_LAYER_BWC 0x80
45 #define MDP_LAYER_ASYNC 0x100
46 #define MDP_LAYER_PP 0x200
47 #define MDP_LAYER_SECURE_DISPLAY_SESSION 0x400
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define MDP_LAYER_ENABLE_QSEED3_SCALE 0x800
50 #define MDP_LAYER_MULTIRECT_ENABLE 0x1000
51 #define MDP_LAYER_MULTIRECT_PARALLEL_MODE 0x2000
52 #define MDP_LAYER_SECURE_CAMERA_SESSION 0x4000
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define MDP_DESTSCALER_ENABLE 0x1
55 #define MDP_DESTSCALER_SCALE_UPDATE 0x2
56 #define MDP_DESTSCALER_ENHANCER_UPDATE 0x4
57 #define MDP_DESTSCALER_ROI_ENABLE 0x8
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define MDP_VALIDATE_LAYER 0x01
60 #define MDP_COMMIT_WAIT_FOR_FINISH 0x02
61 #define MDP_COMMIT_SYNC_FENCE_WAIT 0x04
62 #define MDP_COMMIT_AVR_EN 0x08
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define MDP_COMMIT_AVR_ONE_SHOT_MODE 0x10
65 #define MDP_COMMIT_PARTIAL_UPDATE_DUAL_ROI 0x20
66 #define MDP_COMMIT_UPDATE_BRIGHTNESS 0x40
67 #define MDP_COMMIT_CWB_EN 0x800
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define MDP_COMMIT_CWB_DSPP 0x1000
70 #define MDP_COMMIT_VERSION_1_0 0x00010000
71 #define OUT_LAYER_COLOR_SPACE
72 #define MDP_HDR_EOTF_SMTPE_ST2084 0x2
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define MDP_HDR_EOTF_HLG 0x3
75 #define MDP_PIXEL_ENCODING_RGB 0x0
76 #define MDP_PIXEL_ENCODING_YCBCR_444 0x1
77 #define MDP_PIXEL_ENCODING_YCBCR_422 0x2
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define MDP_PIXEL_ENCODING_YCBCR_420 0x3
80 #define MDP_PIXEL_ENCODING_Y_ONLY 0x4
81 #define MDP_PIXEL_ENCODING_RAW 0x5
82 #define MDP_COLORIMETRY_RGB_SRGB 0x0
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define MDP_COLORIMETRY_RGB_WIDE_FIXED_POINT 0x1
85 #define MDP_COLORIMETRY_RGB_WIDE_FLOAT_POINT 0x2
86 #define MDP_COLORIMETRY_RGB_ADOBE 0x3
87 #define MDP_COLORIMETRY_RGB_DPI_P3 0x4
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define MDP_COLORIMETRY_RGB_CUSTOM 0x5
90 #define MDP_COLORIMETRY_RGB_ITU_R_BT_2020 0x6
91 #define MDP_COLORIMETRY_YCBCR_ITU_R_BT_601 0x0
92 #define MDP_COLORIMETRY_YCBCR_ITU_R_BT_709 0x1
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define MDP_COLORIMETRY_YCBCR_XV_YCC_601 0x2
95 #define MDP_COLORIMETRY_YCBCR_XV_YCC_709 0x3
96 #define MDP_COLORIMETRY_YCBCR_S_YCC_601 0x4
97 #define MDP_COLORIMETRY_YCBCR_ADOBE_YCC_601 0x5
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define MDP_COLORIMETRY_YCBCR_ITU_R_BT_2020_YCBCR_CONST 0x6
100 #define MDP_COLORIMETRY_YCBCR_ITU_R_BT_2020_YCBCR 0x7
101 #define MDP_DYNAMIC_RANGE_VESA 0x0
102 #define MDP_DYNAMIC_RANGE_CEA 0x1
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define MDP_RGB_6_BPC 0x0
105 #define MDP_RGB_8_BPC 0x1
106 #define MDP_RGB_10_BPC 0x2
107 #define MDP_RGB_12_BPC 0x3
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define MDP_RGB_16_BPC 0x4
110 #define MDP_YUV_8_BPC 0x1
111 #define MDP_YUV_10_BPC 0x2
112 #define MDP_YUV_12_BPC 0x3
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define MDP_YUV_16_BPC 0x4
115 #define MDP_RAW_6_BPC 0x1
116 #define MDP_RAW_7_BPC 0x2
117 #define MDP_RAW_8_BPC 0x3
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define MDP_RAW_10_BPC 0x4
120 #define MDP_RAW_12_BPC 0x5
121 #define MDP_RAW_14_BPC 0x6
122 #define MDP_RAW16_BPC 0x7
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define MDP_CONTENT_TYPE_NOT_DEFINED 0x0
125 #define MDP_CONTENT_TYPE_GRAPHICS 0x1
126 #define MDP_CONTENT_TYPE_PHOTO 0x2
127 #define MDP_CONTENT_TYPE_VIDEO 0x3
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define MDP_CONTENT_TYPE_GAME 0x4
130 struct mdp_layer_plane {
131   int fd;
132   uint32_t offset;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134   uint32_t stride;
135 };
136 struct mdp_layer_buffer {
137   uint32_t width;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   uint32_t height;
140   uint32_t format;
141   struct mdp_layer_plane planes[MAX_PLANES];
142   uint32_t plane_count;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144   struct mult_factor comp_ratio;
145   int fence;
146   uint32_t reserved;
147 };
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 struct mdp_input_layer {
150   uint32_t flags;
151   uint32_t pipe_ndx;
152   uint8_t horz_deci;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   uint8_t vert_deci;
155   uint8_t alpha;
156   uint16_t z_order;
157   uint32_t transp_mask;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159   uint32_t bg_color;
160   enum mdss_mdp_blend_op blend_op;
161   enum mdp_color_space color_space;
162   struct mdp_rect src_rect;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164   struct mdp_rect dst_rect;
165   void * scale;
166   struct mdp_layer_buffer buffer;
167   void * pp_info;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   int error_code;
170   uint32_t reserved[6];
171 };
172 struct mdp_output_layer {
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174   uint32_t flags;
175   uint32_t writeback_ndx;
176   struct mdp_layer_buffer buffer;
177   enum mdp_color_space color_space;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179   uint32_t reserved[5];
180 };
181 struct mdp_destination_scaler_data {
182   uint32_t flags;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   uint32_t dest_scaler_ndx;
185   uint32_t lm_width;
186   uint32_t lm_height;
187   uint64_t scale;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189   struct mdp_rect panel_roi;
190 };
191 struct mdp_layer_commit_v1 {
192   uint32_t flags;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194   int release_fence;
195   struct mdp_rect left_roi;
196   struct mdp_rect right_roi;
197   struct mdp_input_layer * input_layers;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   uint32_t input_layer_cnt;
200   struct mdp_output_layer * output_layer;
201   int retire_fence;
202   void * dest_scaler;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   uint32_t dest_scaler_cnt;
205   uint32_t bl_level;
206   uint32_t reserved[MDP_LAYER_COMMIT_V1_PAD];
207 };
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 struct mdp_layer_commit {
210   uint32_t version;
211   union {
212     struct mdp_layer_commit_v1 commit_v1;
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214   };
215 };
216 struct mdp_point {
217   uint32_t x;
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219   uint32_t y;
220 };
221 struct mdp_async_layer {
222   uint32_t flags;
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224   uint32_t pipe_ndx;
225   struct mdp_point src;
226   struct mdp_point dst;
227   int error_code;
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229   uint32_t reserved[3];
230 };
231 struct mdp_position_update {
232   struct mdp_async_layer * input_layers;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234   uint32_t input_layer_cnt;
235 };
236 #define MAX_DET_CURVES 3
237 struct mdp_det_enhance_data {
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239   uint32_t enable;
240   int16_t sharpen_level1;
241   int16_t sharpen_level2;
242   uint16_t clip;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244   uint16_t limit;
245   uint16_t thr_quiet;
246   uint16_t thr_dieout;
247   uint16_t thr_low;
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249   uint16_t thr_high;
250   uint16_t prec_shift;
251   int16_t adjust_a[MAX_DET_CURVES];
252   int16_t adjust_b[MAX_DET_CURVES];
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254   int16_t adjust_c[MAX_DET_CURVES];
255 };
256 #define ENABLE_SCALE 0x1
257 #define ENABLE_DETAIL_ENHANCE 0x2
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 #define ENABLE_DIRECTION_DETECTION 0x4
260 #define SCALER_LUT_SWAP 0x1
261 #define SCALER_LUT_DIR_WR 0x2
262 #define SCALER_LUT_Y_CIR_WR 0x4
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 #define SCALER_LUT_UV_CIR_WR 0x8
265 #define SCALER_LUT_Y_SEP_WR 0x10
266 #define SCALER_LUT_UV_SEP_WR 0x20
267 #define FILTER_EDGE_DIRECTED_2D 0x0
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 #define FILTER_CIRCULAR_2D 0x1
270 #define FILTER_SEPARABLE_1D 0x2
271 #define FILTER_BILINEAR 0x3
272 #define FILTER_ALPHA_DROP_REPEAT 0x0
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 #define FILTER_ALPHA_BILINEAR 0x1
275 struct mdp_scale_data_v2 {
276   uint32_t enable;
277   int32_t init_phase_x[MAX_PLANES];
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279   int32_t phase_step_x[MAX_PLANES];
280   int32_t init_phase_y[MAX_PLANES];
281   int32_t phase_step_y[MAX_PLANES];
282   uint32_t num_ext_pxls_left[MAX_PLANES];
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284   uint32_t num_ext_pxls_right[MAX_PLANES];
285   uint32_t num_ext_pxls_top[MAX_PLANES];
286   uint32_t num_ext_pxls_btm[MAX_PLANES];
287   int32_t left_ftch[MAX_PLANES];
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289   int32_t left_rpt[MAX_PLANES];
290   int32_t right_ftch[MAX_PLANES];
291   int32_t right_rpt[MAX_PLANES];
292   uint32_t top_rpt[MAX_PLANES];
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294   uint32_t btm_rpt[MAX_PLANES];
295   uint32_t top_ftch[MAX_PLANES];
296   uint32_t btm_ftch[MAX_PLANES];
297   uint32_t roi_w[MAX_PLANES];
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299   uint32_t preload_x[MAX_PLANES];
300   uint32_t preload_y[MAX_PLANES];
301   uint32_t src_width[MAX_PLANES];
302   uint32_t src_height[MAX_PLANES];
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304   uint32_t dst_width;
305   uint32_t dst_height;
306   uint32_t y_rgb_filter_cfg;
307   uint32_t uv_filter_cfg;
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309   uint32_t alpha_filter_cfg;
310   uint32_t blend_cfg;
311   uint32_t lut_flag;
312   uint32_t dir_lut_idx;
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314   uint32_t y_rgb_cir_lut_idx;
315   uint32_t uv_cir_lut_idx;
316   uint32_t y_rgb_sep_lut_idx;
317   uint32_t uv_sep_lut_idx;
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319   struct mdp_det_enhance_data detail_enhance;
320   uint64_t reserved[8];
321 };
322 struct mdp_scale_luts_info {
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324   uint64_t dir_lut;
325   uint64_t cir_lut;
326   uint64_t sep_lut;
327   uint32_t dir_lut_size;
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329   uint32_t cir_lut_size;
330   uint32_t sep_lut_size;
331 };
332 #define MDP_QSEED3_LUT_CFG 0x1
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 struct mdp_set_cfg {
335   uint64_t flags;
336   uint32_t len;
337   uint64_t payload;
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339 };
340 #define HDR_PRIMARIES_COUNT 3
341 #define MDP_HDR_STREAM
342 struct mdp_hdr_stream {
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344   uint32_t eotf;
345   uint32_t display_primaries_x[HDR_PRIMARIES_COUNT];
346   uint32_t display_primaries_y[HDR_PRIMARIES_COUNT];
347   uint32_t white_point_x;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349   uint32_t white_point_y;
350   uint32_t max_luminance;
351   uint32_t min_luminance;
352   uint32_t max_content_light_level;
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354   uint32_t max_average_light_level;
355   uint32_t pixel_encoding;
356   uint32_t colorimetry;
357   uint32_t range;
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359   uint32_t bits_per_component;
360   uint32_t content_type;
361   uint32_t reserved[5];
362 };
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364 #endif
365 
366