gralloc: refcount private_module_t
[GitHub/LineageOS/android_hardware_samsung_slsi_exynos5.git] / include / fimg2d.h
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 __FIMG2D_H
20 #define __FIMG2D_H __FILE__
21 #define FIMG2D_MAX_PLANES 2
22 #define FIMG2D_IOCTL_MAGIC 'F'
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define FIMG2D_BITBLT_BLIT _IOWR(FIMG2D_IOCTL_MAGIC, 0, struct fimg2d_blit)
25 #define FIMG2D_BITBLT_SYNC _IOW(FIMG2D_IOCTL_MAGIC, 1, int)
26 #define FIMG2D_BITBLT_VERSION _IOR(FIMG2D_IOCTL_MAGIC, 2, struct fimg2d_version)
27 struct fimg2d_version {
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 unsigned int hw;
30 unsigned int sw;
31 };
32 enum blit_sync {
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 BLIT_SYNC,
35 BLIT_ASYNC,
36 };
37 enum addr_space {
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 ADDR_NONE = 0,
40 ADDR_DMA_BUF,
41 };
42 enum pixel_order {
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 AX_RGB = 0,
45 RGB_AX,
46 AX_BGR,
47 BGR_AX,
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 ARGB_ORDER_END,
50 P1_CRY1CBY0,
51 P1_CBY1CRY0,
52 P1_Y1CRY0CB,
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 P1_Y1CBY0CR,
55 P1_ORDER_END,
56 P2_CRCB,
57 P2_CBCR,
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 P2_ORDER_END,
60 };
61 enum color_format {
62 CF_XRGB_8888 = 0,
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 CF_ARGB_8888,
65 CF_RGB_565,
66 CF_XRGB_1555,
67 CF_ARGB_1555,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 CF_XRGB_4444,
70 CF_ARGB_4444,
71 CF_RGB_888,
72 CF_YCBCR_444,
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 CF_YCBCR_422,
75 CF_YCBCR_420,
76 CF_A8,
77 CF_L8,
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 SRC_DST_FORMAT_END,
80 CF_MSK_1BIT,
81 CF_MSK_4BIT,
82 CF_MSK_8BIT,
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 CF_MSK_16BIT_565,
85 CF_MSK_16BIT_1555,
86 CF_MSK_16BIT_4444,
87 CF_MSK_32BIT_8888,
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 MSK_FORMAT_END,
90 };
91 enum rotation {
92 ORIGIN,
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 ROT_90,
95 ROT_180,
96 ROT_270,
97 XFLIP,
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 YFLIP,
100 };
101 enum repeat {
102 NO_REPEAT = 0,
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 REPEAT_NORMAL,
105 REPEAT_PAD,
106 REPEAT_REFLECT, REPEAT_MIRROR = REPEAT_REFLECT,
107 REPEAT_CLAMP,
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 };
110 enum scaling {
111 NO_SCALING,
112 SCALING_NEAREST,
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 SCALING_BILINEAR,
115 };
116 enum scaling_factor {
117 SCALING_PIXELS,
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 SCALING_RATIO,
120 };
121 enum premultiplied {
122 PREMULTIPLIED,
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 NON_PREMULTIPLIED,
125 };
126 enum bluescreen {
127 OPAQUE,
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 TRANSP,
130 BLUSCR,
131 };
132 enum blit_op {
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 BLIT_OP_SOLID_FILL = 0,
135 BLIT_OP_CLR,
136 BLIT_OP_SRC, BLIT_OP_SRC_COPY = BLIT_OP_SRC,
137 BLIT_OP_DST,
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 BLIT_OP_SRC_OVER,
140 BLIT_OP_DST_OVER, BLIT_OP_OVER_REV = BLIT_OP_DST_OVER,
141 BLIT_OP_SRC_IN,
142 BLIT_OP_DST_IN, BLIT_OP_IN_REV = BLIT_OP_DST_IN,
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 BLIT_OP_SRC_OUT,
145 BLIT_OP_DST_OUT, BLIT_OP_OUT_REV = BLIT_OP_DST_OUT,
146 BLIT_OP_SRC_ATOP,
147 BLIT_OP_DST_ATOP, BLIT_OP_ATOP_REV = BLIT_OP_DST_ATOP,
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 BLIT_OP_XOR,
150 BLIT_OP_ADD,
151 BLIT_OP_MULTIPLY,
152 BLIT_OP_SCREEN,
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 BLIT_OP_DARKEN,
155 BLIT_OP_LIGHTEN,
156 BLIT_OP_DISJ_SRC_OVER,
157 BLIT_OP_DISJ_DST_OVER, BLIT_OP_SATURATE = BLIT_OP_DISJ_DST_OVER,
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 BLIT_OP_DISJ_SRC_IN,
160 BLIT_OP_DISJ_DST_IN, BLIT_OP_DISJ_IN_REV = BLIT_OP_DISJ_DST_IN,
161 BLIT_OP_DISJ_SRC_OUT,
162 BLIT_OP_DISJ_DST_OUT, BLIT_OP_DISJ_OUT_REV = BLIT_OP_DISJ_DST_OUT,
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 BLIT_OP_DISJ_SRC_ATOP,
165 BLIT_OP_DISJ_DST_ATOP, BLIT_OP_DISJ_ATOP_REV = BLIT_OP_DISJ_DST_ATOP,
166 BLIT_OP_DISJ_XOR,
167 BLIT_OP_CONJ_SRC_OVER,
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 BLIT_OP_CONJ_DST_OVER, BLIT_OP_CONJ_OVER_REV = BLIT_OP_CONJ_DST_OVER,
170 BLIT_OP_CONJ_SRC_IN,
171 BLIT_OP_CONJ_DST_IN, BLIT_OP_CONJ_IN_REV = BLIT_OP_CONJ_DST_IN,
172 BLIT_OP_CONJ_SRC_OUT,
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 BLIT_OP_CONJ_DST_OUT, BLIT_OP_CONJ_OUT_REV = BLIT_OP_CONJ_DST_OUT,
175 BLIT_OP_CONJ_SRC_ATOP,
176 BLIT_OP_CONJ_DST_ATOP, BLIT_OP_CONJ_ATOP_REV = BLIT_OP_CONJ_DST_ATOP,
177 BLIT_OP_CONJ_XOR,
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 BLIT_OP_USER_COEFF,
180 BLIT_OP_USER_SRC_GA,
181 BLIT_OP_END,
182 };
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 #define MAX_FIMG2D_BLIT_OP (int)BLIT_OP_END
185 struct fimg2d_addr {
186 enum addr_space type;
187 int fd[FIMG2D_MAX_PLANES];
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 };
190 struct fimg2d_rect {
191 int x1;
192 int y1;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 int x2;
195 int y2;
196 };
197 struct fimg2d_scale {
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 enum scaling mode;
200 int src_w, src_h;
201 int dst_w, dst_h;
202 };
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 struct fimg2d_clip {
205 __u32 enable;
206 int x1;
207 int y1;
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 int x2;
210 int y2;
211 };
212 struct fimg2d_repeat {
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 enum repeat mode;
215 unsigned long pad_color;
216 };
217 struct fimg2d_bluscr {
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 enum bluescreen mode;
220 unsigned long bs_color;
221 unsigned long bg_color;
222 };
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 struct fimg2d_image {
225 int width;
226 int height;
227 int stride;
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 enum pixel_order order;
230 enum color_format fmt;
231 struct fimg2d_addr addr;
232 struct fimg2d_rect rect;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 };
235 struct fimg2d_param {
236 unsigned long solid_color;
237 unsigned char g_alpha;
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 __u32 dither;
240 enum rotation rotate;
241 enum premultiplied premult;
242 struct fimg2d_scale scaling;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 struct fimg2d_repeat repeat;
245 struct fimg2d_bluscr bluscr;
246 struct fimg2d_clip clipping;
247 };
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 struct fimg2d_blit {
250 enum blit_op op;
251 struct fimg2d_param param;
252 struct fimg2d_image *src;
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 struct fimg2d_image *msk;
255 struct fimg2d_image *tmp;
256 struct fimg2d_image *dst;
257 enum blit_sync sync;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 unsigned int seq_no;
260 };
261 #endif
262