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