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#ifdef __LP64
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define MDP_LAYER_COMMIT_V1_PAD 3
30#else
31#define MDP_LAYER_COMMIT_V1_PAD 4
32#endif
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define MDP_LAYER_FLIP_LR 0x1
35#define MDP_LAYER_FLIP_UD 0x2
36#define MDP_LAYER_ENABLE_PIXEL_EXT 0x4
37#define MDP_LAYER_FORGROUND 0x8
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define MDP_LAYER_SECURE_SESSION 0x10
40#define MDP_LAYER_SOLID_FILL 0x20
41#define MDP_LAYER_DEINTERLACE 0x40
42#define MDP_LAYER_BWC 0x80
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define MDP_LAYER_ASYNC 0x100
45#define MDP_LAYER_PP 0x200
46#define MDP_LAYER_SECURE_DISPLAY_SESSION 0x400
47#define MDP_LAYER_ENABLE_QSEED3_SCALE 0x800
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define MDP_DESTSCALER_ENABLE 0x1
50#define MDP_DESTSCALER_SCALE_UPDATE 0x2
51#define MDP_DESTSCALER_ENHANCER_UPDATE 0x4
52#define MDP_LAYER_MULTIRECT_ENABLE 0x1000
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define MDP_LAYER_MULTIRECT_PARALLEL_MODE 0x2000
55#define MDP_VALIDATE_LAYER 0x01
56#define MDP_COMMIT_WAIT_FOR_FINISH 0x02
57#define MDP_COMMIT_SYNC_FENCE_WAIT 0x04
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define MDP_COMMIT_VERSION_1_0 0x00010000
60#define OUT_LAYER_COLOR_SPACE
61struct mdp_layer_plane {
62  int fd;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  uint32_t offset;
65  uint32_t stride;
66};
67struct mdp_layer_buffer {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  uint32_t width;
70  uint32_t height;
71  uint32_t format;
72  struct mdp_layer_plane planes[MAX_PLANES];
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  uint32_t plane_count;
75  struct mult_factor comp_ratio;
76  int fence;
77  uint32_t reserved;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79};
80struct mdp_input_layer {
81  uint32_t flags;
82  uint32_t pipe_ndx;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  uint8_t horz_deci;
85  uint8_t vert_deci;
86  uint8_t alpha;
87  uint16_t z_order;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  uint32_t transp_mask;
90  uint32_t bg_color;
91  enum mdss_mdp_blend_op blend_op;
92  enum mdp_color_space color_space;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  struct mdp_rect src_rect;
95  struct mdp_rect dst_rect;
96  void __user * scale;
97  struct mdp_layer_buffer buffer;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  void __user * pp_info;
100  int error_code;
101  uint32_t reserved[6];
102};
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104struct mdp_output_layer {
105  uint32_t flags;
106  uint32_t writeback_ndx;
107  struct mdp_layer_buffer buffer;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  enum mdp_color_space color_space;
110  uint32_t reserved[5];
111};
112struct mdp_destination_scaler_data {
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  uint32_t flags;
115  uint32_t dest_scaler_ndx;
116  uint32_t lm_width;
117  uint32_t lm_height;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  uint64_t __user scale;
120};
121struct mdp_layer_commit_v1 {
122  uint32_t flags;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  int release_fence;
125  struct mdp_rect left_roi;
126  struct mdp_rect right_roi;
127  struct mdp_input_layer __user * input_layers;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  uint32_t input_layer_cnt;
130  struct mdp_output_layer __user * output_layer;
131  int retire_fence;
132  void __user * dest_scaler;
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  uint32_t dest_scaler_cnt;
135  uint32_t reserved[MDP_LAYER_COMMIT_V1_PAD];
136};
137struct mdp_layer_commit {
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  uint32_t version;
140  union {
141    struct mdp_layer_commit_v1 commit_v1;
142  };
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144};
145struct mdp_point {
146  uint32_t x;
147  uint32_t y;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149};
150struct mdp_async_layer {
151  uint32_t flags;
152  uint32_t pipe_ndx;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  struct mdp_point src;
155  struct mdp_point dst;
156  int error_code;
157  uint32_t reserved[3];
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159};
160struct mdp_position_update {
161  struct mdp_async_layer __user * input_layers;
162  uint32_t input_layer_cnt;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164};
165#define MAX_DET_CURVES 3
166struct mdp_det_enhance_data {
167  uint32_t enable;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  int16_t sharpen_level1;
170  int16_t sharpen_level2;
171  uint16_t clip;
172  uint16_t limit;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  uint16_t thr_quiet;
175  uint16_t thr_dieout;
176  uint16_t thr_low;
177  uint16_t thr_high;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  uint16_t prec_shift;
180  int16_t adjust_a[MAX_DET_CURVES];
181  int16_t adjust_b[MAX_DET_CURVES];
182  int16_t adjust_c[MAX_DET_CURVES];
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184};
185#define ENABLE_SCALE 0x1
186#define ENABLE_DETAIL_ENHANCE 0x2
187#define ENABLE_DIRECTION_DETECTION 0x4
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189#define SCALER_LUT_SWAP 0x1
190#define SCALER_LUT_DIR_WR 0x2
191#define SCALER_LUT_Y_CIR_WR 0x4
192#define SCALER_LUT_UV_CIR_WR 0x8
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194#define SCALER_LUT_Y_SEP_WR 0x10
195#define SCALER_LUT_UV_SEP_WR 0x20
196#define FILTER_EDGE_DIRECTED_2D 0x0
197#define FILTER_CIRCULAR_2D 0x1
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199#define FILTER_SEPARABLE_1D 0x2
200#define FILTER_BILINEAR 0x3
201#define FILTER_ALPHA_DROP_REPEAT 0x0
202#define FILTER_ALPHA_BILINEAR 0x1
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204struct mdp_scale_data_v2 {
205  uint32_t enable;
206  int32_t init_phase_x[MAX_PLANES];
207  int32_t phase_step_x[MAX_PLANES];
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209  int32_t init_phase_y[MAX_PLANES];
210  int32_t phase_step_y[MAX_PLANES];
211  uint32_t num_ext_pxls_left[MAX_PLANES];
212  uint32_t num_ext_pxls_right[MAX_PLANES];
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214  uint32_t num_ext_pxls_top[MAX_PLANES];
215  uint32_t num_ext_pxls_btm[MAX_PLANES];
216  int32_t left_ftch[MAX_PLANES];
217  int32_t left_rpt[MAX_PLANES];
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219  int32_t right_ftch[MAX_PLANES];
220  int32_t right_rpt[MAX_PLANES];
221  uint32_t top_rpt[MAX_PLANES];
222  uint32_t btm_rpt[MAX_PLANES];
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  uint32_t top_ftch[MAX_PLANES];
225  uint32_t btm_ftch[MAX_PLANES];
226  uint32_t roi_w[MAX_PLANES];
227  uint32_t preload_x[MAX_PLANES];
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  uint32_t preload_y[MAX_PLANES];
230  uint32_t src_width[MAX_PLANES];
231  uint32_t src_height[MAX_PLANES];
232  uint32_t dst_width;
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234  uint32_t dst_height;
235  uint32_t y_rgb_filter_cfg;
236  uint32_t uv_filter_cfg;
237  uint32_t alpha_filter_cfg;
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239  uint32_t blend_cfg;
240  uint32_t lut_flag;
241  uint32_t dir_lut_idx;
242  uint32_t y_rgb_cir_lut_idx;
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244  uint32_t uv_cir_lut_idx;
245  uint32_t y_rgb_sep_lut_idx;
246  uint32_t uv_sep_lut_idx;
247  struct mdp_det_enhance_data detail_enhance;
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249  uint64_t reserved[8];
250};
251struct mdp_scale_luts_info {
252  uint64_t __user dir_lut;
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254  uint64_t __user cir_lut;
255  uint64_t __user sep_lut;
256  uint32_t dir_lut_size;
257  uint32_t cir_lut_size;
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259  uint32_t sep_lut_size;
260};
261#define MDP_QSEED3_LUT_CFG 0x1
262struct mdp_set_cfg {
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264  uint64_t flags;
265  uint32_t len;
266  uint64_t __user payload;
267};
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269#endif
270
271