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