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 _UAPI_MSM_KGSL_H
20 #define _UAPI_MSM_KGSL_H
21 #include <linux/types.h>
22 #include <linux/ioctl.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define KGSL_VERSION_MAJOR 3
25 #define KGSL_VERSION_MINOR 14
26 #define KGSL_CONTEXT_SAVE_GMEM 0x00000001
27 #define KGSL_CONTEXT_NO_GMEM_ALLOC 0x00000002
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define KGSL_CONTEXT_SUBMIT_IB_LIST 0x00000004
30 #define KGSL_CONTEXT_CTX_SWITCH 0x00000008
31 #define KGSL_CONTEXT_PREAMBLE 0x00000010
32 #define KGSL_CONTEXT_TRASH_STATE 0x00000020
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define KGSL_CONTEXT_PER_CONTEXT_TS 0x00000040
35 #define KGSL_CONTEXT_USER_GENERATED_TS 0x00000080
36 #define KGSL_CONTEXT_END_OF_FRAME 0x00000100
37 #define KGSL_CONTEXT_NO_FAULT_TOLERANCE 0x00000200
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define KGSL_CONTEXT_SYNC 0x00000400
40 #define KGSL_CONTEXT_PWR_CONSTRAINT 0x00000800
41 #define KGSL_CONTEXT_PRIORITY_MASK 0x0000F000
42 #define KGSL_CONTEXT_PRIORITY_SHIFT 12
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define KGSL_CONTEXT_PRIORITY_UNDEF 0
45 #define KGSL_CONTEXT_IFH_NOP 0x00010000
46 #define KGSL_CONTEXT_SECURE 0x00020000
47 #define KGSL_CONTEXT_NO_SNAPSHOT 0x00040000
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define KGSL_CONTEXT_PREEMPT_STYLE_MASK 0x0E000000
50 #define KGSL_CONTEXT_PREEMPT_STYLE_SHIFT 25
51 #define KGSL_CONTEXT_PREEMPT_STYLE_DEFAULT 0x0
52 #define KGSL_CONTEXT_PREEMPT_STYLE_RINGBUFFER 0x1
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define KGSL_CONTEXT_PREEMPT_STYLE_FINEGRAIN 0x2
55 #define KGSL_CONTEXT_TYPE_MASK 0x01F00000
56 #define KGSL_CONTEXT_TYPE_SHIFT 20
57 #define KGSL_CONTEXT_TYPE_ANY 0
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define KGSL_CONTEXT_TYPE_GL 1
60 #define KGSL_CONTEXT_TYPE_CL 2
61 #define KGSL_CONTEXT_TYPE_C2D 3
62 #define KGSL_CONTEXT_TYPE_RS 4
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define KGSL_CONTEXT_TYPE_UNKNOWN 0x1E
65 #define KGSL_CONTEXT_INVALID 0xffffffff
66 #define KGSL_CMDBATCH_MEMLIST 0x00000001
67 #define KGSL_CMDBATCH_MARKER 0x00000002
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 #define KGSL_CMDBATCH_SUBMIT_IB_LIST KGSL_CONTEXT_SUBMIT_IB_LIST
70 #define KGSL_CMDBATCH_CTX_SWITCH KGSL_CONTEXT_CTX_SWITCH
71 #define KGSL_CMDBATCH_PROFILING 0x00000010
72 #define KGSL_CMDBATCH_PROFILING_KTIME 0x00000020
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 #define KGSL_CMDBATCH_END_OF_FRAME KGSL_CONTEXT_END_OF_FRAME
75 #define KGSL_CMDBATCH_SYNC KGSL_CONTEXT_SYNC
76 #define KGSL_CMDBATCH_PWR_CONSTRAINT KGSL_CONTEXT_PWR_CONSTRAINT
77 #define KGSL_CMDLIST_IB 0x00000001U
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define KGSL_CMDLIST_CTXTSWITCH_PREAMBLE 0x00000002U
80 #define KGSL_CMDLIST_IB_PREAMBLE 0x00000004U
81 #define KGSL_OBJLIST_MEMOBJ 0x00000008U
82 #define KGSL_OBJLIST_PROFILE 0x00000010U
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP 0
85 #define KGSL_CMD_SYNCPOINT_TYPE_FENCE 1
86 #define KGSL_MEMFLAGS_SECURE 0x00000008ULL
87 #define KGSL_MEMFLAGS_GPUREADONLY 0x01000000U
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define KGSL_MEMFLAGS_GPUWRITEONLY 0x02000000U
90 #define KGSL_MEMFLAGS_FORCE_32BIT 0x100000000ULL
91 #define KGSL_CACHEMODE_MASK 0x0C000000U
92 #define KGSL_CACHEMODE_SHIFT 26
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define KGSL_CACHEMODE_WRITECOMBINE 0
95 #define KGSL_CACHEMODE_UNCACHED 1
96 #define KGSL_CACHEMODE_WRITETHROUGH 2
97 #define KGSL_CACHEMODE_WRITEBACK 3
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define KGSL_MEMFLAGS_USE_CPU_MAP 0x10000000ULL
100 #define KGSL_MEMTYPE_MASK 0x0000FF00
101 #define KGSL_MEMTYPE_SHIFT 8
102 #define KGSL_MEMTYPE_OBJECTANY 0
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define KGSL_MEMTYPE_FRAMEBUFFER 1
105 #define KGSL_MEMTYPE_RENDERBUFFER 2
106 #define KGSL_MEMTYPE_ARRAYBUFFER 3
107 #define KGSL_MEMTYPE_ELEMENTARRAYBUFFER 4
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 #define KGSL_MEMTYPE_VERTEXARRAYBUFFER 5
110 #define KGSL_MEMTYPE_TEXTURE 6
111 #define KGSL_MEMTYPE_SURFACE 7
112 #define KGSL_MEMTYPE_EGL_SURFACE 8
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define KGSL_MEMTYPE_GL 9
115 #define KGSL_MEMTYPE_CL 10
116 #define KGSL_MEMTYPE_CL_BUFFER_MAP 11
117 #define KGSL_MEMTYPE_CL_BUFFER_NOMAP 12
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 #define KGSL_MEMTYPE_CL_IMAGE_MAP 13
120 #define KGSL_MEMTYPE_CL_IMAGE_NOMAP 14
121 #define KGSL_MEMTYPE_CL_KERNEL_STACK 15
122 #define KGSL_MEMTYPE_COMMAND 16
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 #define KGSL_MEMTYPE_2D 17
125 #define KGSL_MEMTYPE_EGL_IMAGE 18
126 #define KGSL_MEMTYPE_EGL_SHADOW 19
127 #define KGSL_MEMTYPE_MULTISAMPLE 20
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define KGSL_MEMTYPE_KERNEL 255
130 #define KGSL_MEMALIGN_MASK 0x00FF0000
131 #define KGSL_MEMALIGN_SHIFT 16
132 enum kgsl_user_mem_type {
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134   KGSL_USER_MEM_TYPE_PMEM = 0x00000000,
135   KGSL_USER_MEM_TYPE_ASHMEM = 0x00000001,
136   KGSL_USER_MEM_TYPE_ADDR = 0x00000002,
137   KGSL_USER_MEM_TYPE_ION = 0x00000003,
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   KGSL_USER_MEM_TYPE_DMABUF = 0x00000003,
140   KGSL_USER_MEM_TYPE_MAX = 0x00000007,
141 };
142 #define KGSL_MEMFLAGS_USERMEM_MASK 0x000000e0
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 #define KGSL_MEMFLAGS_USERMEM_SHIFT 5
145 #define KGSL_USERMEM_FLAG(x) (((x) + 1) << KGSL_MEMFLAGS_USERMEM_SHIFT)
146 #define KGSL_MEMFLAGS_NOT_USERMEM 0
147 #define KGSL_MEMFLAGS_USERMEM_PMEM KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_PMEM)
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 #define KGSL_MEMFLAGS_USERMEM_ASHMEM KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ASHMEM)
150 #define KGSL_MEMFLAGS_USERMEM_ADDR KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ADDR)
151 #define KGSL_MEMFLAGS_USERMEM_ION KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ION)
152 #define KGSL_FLAGS_NORMALMODE 0x00000000
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #define KGSL_FLAGS_SAFEMODE 0x00000001
155 #define KGSL_FLAGS_INITIALIZED0 0x00000002
156 #define KGSL_FLAGS_INITIALIZED 0x00000004
157 #define KGSL_FLAGS_STARTED 0x00000008
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define KGSL_FLAGS_ACTIVE 0x00000010
160 #define KGSL_FLAGS_RESERVED0 0x00000020
161 #define KGSL_FLAGS_RESERVED1 0x00000040
162 #define KGSL_FLAGS_RESERVED2 0x00000080
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define KGSL_FLAGS_SOFT_RESET 0x00000100
165 #define KGSL_FLAGS_PER_CONTEXT_TIMESTAMPS 0x00000200
166 #define KGSL_SYNCOBJ_SERVER_TIMEOUT 2000
167 enum kgsl_ctx_reset_stat {
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   KGSL_CTX_STAT_NO_ERROR = 0x00000000,
170   KGSL_CTX_STAT_GUILTY_CONTEXT_RESET_EXT = 0x00000001,
171   KGSL_CTX_STAT_INNOCENT_CONTEXT_RESET_EXT = 0x00000002,
172   KGSL_CTX_STAT_UNKNOWN_CONTEXT_RESET_EXT = 0x00000003
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 };
175 #define KGSL_CONVERT_TO_MBPS(val) (val * 1000 * 1000U)
176 enum kgsl_deviceid {
177   KGSL_DEVICE_3D0 = 0x00000000,
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179   KGSL_DEVICE_MAX
180 };
181 struct kgsl_devinfo {
182   unsigned int device_id;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   unsigned int chip_id;
185   unsigned int mmu_enabled;
186   unsigned long gmem_gpubaseaddr;
187   unsigned int gpu_id;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189   size_t gmem_sizebytes;
190 };
191 struct kgsl_devmemstore {
192   volatile unsigned int soptimestamp;
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194   unsigned int sbz;
195   volatile unsigned int eoptimestamp;
196   unsigned int sbz2;
197   volatile unsigned int preempted;
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   unsigned int sbz3;
200   volatile unsigned int ref_wait_ts;
201   unsigned int sbz4;
202   unsigned int current_context;
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   unsigned int sbz5;
205 };
206 #define KGSL_MEMSTORE_OFFSET(ctxt_id,field) ((ctxt_id) * sizeof(struct kgsl_devmemstore) + offsetof(struct kgsl_devmemstore, field))
207 enum kgsl_timestamp_type {
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209   KGSL_TIMESTAMP_CONSUMED = 0x00000001,
210   KGSL_TIMESTAMP_RETIRED = 0x00000002,
211   KGSL_TIMESTAMP_QUEUED = 0x00000003,
212 };
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define KGSL_PROP_DEVICE_INFO 0x1
215 #define KGSL_PROP_DEVICE_SHADOW 0x2
216 #define KGSL_PROP_DEVICE_POWER 0x3
217 #define KGSL_PROP_SHMEM 0x4
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define KGSL_PROP_SHMEM_APERTURES 0x5
220 #define KGSL_PROP_MMU_ENABLE 0x6
221 #define KGSL_PROP_INTERRUPT_WAITS 0x7
222 #define KGSL_PROP_VERSION 0x8
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224 #define KGSL_PROP_GPU_RESET_STAT 0x9
225 #define KGSL_PROP_PWRCTRL 0xE
226 #define KGSL_PROP_PWR_CONSTRAINT 0x12
227 #define KGSL_PROP_UCHE_GMEM_VADDR 0x13
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define KGSL_PROP_SP_GENERIC_MEM 0x14
230 #define KGSL_PROP_UCODE_VERSION 0x15
231 #define KGSL_PROP_GPMU_VERSION 0x16
232 #define KGSL_PROP_HIGHEST_BANK_BIT 0x17
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 #define KGSL_PROP_DEVICE_BITNESS 0x18
235 struct kgsl_shadowprop {
236   unsigned long gpuaddr;
237   size_t size;
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239   unsigned int flags;
240 };
241 struct kgsl_version {
242   unsigned int drv_major;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244   unsigned int drv_minor;
245   unsigned int dev_major;
246   unsigned int dev_minor;
247 };
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 struct kgsl_sp_generic_mem {
250   uint64_t local;
251   uint64_t pvt;
252 };
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 struct kgsl_ucode_version {
255   unsigned int pfp;
256   unsigned int pm4;
257 };
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 struct kgsl_gpmu_version {
260   unsigned int major;
261   unsigned int minor;
262   unsigned int features;
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 };
265 #define KGSL_PERFCOUNTER_GROUP_CP 0x0
266 #define KGSL_PERFCOUNTER_GROUP_RBBM 0x1
267 #define KGSL_PERFCOUNTER_GROUP_PC 0x2
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 #define KGSL_PERFCOUNTER_GROUP_VFD 0x3
270 #define KGSL_PERFCOUNTER_GROUP_HLSQ 0x4
271 #define KGSL_PERFCOUNTER_GROUP_VPC 0x5
272 #define KGSL_PERFCOUNTER_GROUP_TSE 0x6
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 #define KGSL_PERFCOUNTER_GROUP_RAS 0x7
275 #define KGSL_PERFCOUNTER_GROUP_UCHE 0x8
276 #define KGSL_PERFCOUNTER_GROUP_TP 0x9
277 #define KGSL_PERFCOUNTER_GROUP_SP 0xA
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 #define KGSL_PERFCOUNTER_GROUP_RB 0xB
280 #define KGSL_PERFCOUNTER_GROUP_PWR 0xC
281 #define KGSL_PERFCOUNTER_GROUP_VBIF 0xD
282 #define KGSL_PERFCOUNTER_GROUP_VBIF_PWR 0xE
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 #define KGSL_PERFCOUNTER_GROUP_MH 0xF
285 #define KGSL_PERFCOUNTER_GROUP_PA_SU 0x10
286 #define KGSL_PERFCOUNTER_GROUP_SQ 0x11
287 #define KGSL_PERFCOUNTER_GROUP_SX 0x12
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 #define KGSL_PERFCOUNTER_GROUP_TCF 0x13
290 #define KGSL_PERFCOUNTER_GROUP_TCM 0x14
291 #define KGSL_PERFCOUNTER_GROUP_TCR 0x15
292 #define KGSL_PERFCOUNTER_GROUP_L2 0x16
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294 #define KGSL_PERFCOUNTER_GROUP_VSC 0x17
295 #define KGSL_PERFCOUNTER_GROUP_CCU 0x18
296 #define KGSL_PERFCOUNTER_GROUP_LRZ 0x19
297 #define KGSL_PERFCOUNTER_GROUP_CMP 0x1A
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299 #define KGSL_PERFCOUNTER_GROUP_ALWAYSON 0x1B
300 #define KGSL_PERFCOUNTER_GROUP_SP_PWR 0x1C
301 #define KGSL_PERFCOUNTER_GROUP_TP_PWR 0x1D
302 #define KGSL_PERFCOUNTER_GROUP_RB_PWR 0x1E
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304 #define KGSL_PERFCOUNTER_GROUP_CCU_PWR 0x1F
305 #define KGSL_PERFCOUNTER_GROUP_UCHE_PWR 0x20
306 #define KGSL_PERFCOUNTER_GROUP_CP_PWR 0x21
307 #define KGSL_PERFCOUNTER_GROUP_GPMU_PWR 0x22
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309 #define KGSL_PERFCOUNTER_GROUP_ALWAYSON_PWR 0x23
310 #define KGSL_PERFCOUNTER_GROUP_MAX 0x24
311 #define KGSL_PERFCOUNTER_NOT_USED 0xFFFFFFFF
312 #define KGSL_PERFCOUNTER_BROKEN 0xFFFFFFFE
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 struct kgsl_ibdesc {
315   unsigned long gpuaddr;
316   unsigned long __pad;
317   size_t sizedwords;
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319   unsigned int ctrl;
320 };
321 struct kgsl_cmdbatch_profiling_buffer {
322   uint64_t wall_clock_s;
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324   uint64_t wall_clock_ns;
325   uint64_t gpu_ticks_queued;
326   uint64_t gpu_ticks_submitted;
327   uint64_t gpu_ticks_retired;
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329 };
330 #define KGSL_IOC_TYPE 0x09
331 struct kgsl_device_getproperty {
332   unsigned int type;
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334   void __user * value;
335   size_t sizebytes;
336 };
337 #define IOCTL_KGSL_DEVICE_GETPROPERTY _IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty)
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339 struct kgsl_device_waittimestamp {
340   unsigned int timestamp;
341   unsigned int timeout;
342 };
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344 #define IOCTL_KGSL_DEVICE_WAITTIMESTAMP _IOW(KGSL_IOC_TYPE, 0x6, struct kgsl_device_waittimestamp)
345 struct kgsl_device_waittimestamp_ctxtid {
346   unsigned int context_id;
347   unsigned int timestamp;
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349   unsigned int timeout;
350 };
351 #define IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID _IOW(KGSL_IOC_TYPE, 0x7, struct kgsl_device_waittimestamp_ctxtid)
352 struct kgsl_ringbuffer_issueibcmds {
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354   unsigned int drawctxt_id;
355   unsigned long ibdesc_addr;
356   unsigned int numibs;
357   unsigned int timestamp;
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359   unsigned int flags;
360 };
361 #define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS _IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds)
362 struct kgsl_cmdstream_readtimestamp {
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364   unsigned int type;
365   unsigned int timestamp;
366 };
367 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_OLD _IOR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP _IOWR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
370 struct kgsl_cmdstream_freememontimestamp {
371   unsigned long gpuaddr;
372   unsigned int type;
373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374   unsigned int timestamp;
375 };
376 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP _IOW(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
377 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_OLD _IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379 struct kgsl_drawctxt_create {
380   unsigned int flags;
381   unsigned int drawctxt_id;
382 };
383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384 #define IOCTL_KGSL_DRAWCTXT_CREATE _IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create)
385 struct kgsl_drawctxt_destroy {
386   unsigned int drawctxt_id;
387 };
388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389 #define IOCTL_KGSL_DRAWCTXT_DESTROY _IOW(KGSL_IOC_TYPE, 0x14, struct kgsl_drawctxt_destroy)
390 struct kgsl_map_user_mem {
391   int fd;
392   unsigned long gpuaddr;
393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394   size_t len;
395   size_t offset;
396   unsigned long hostptr;
397   enum kgsl_user_mem_type memtype;
398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399   unsigned int flags;
400 };
401 #define IOCTL_KGSL_MAP_USER_MEM _IOWR(KGSL_IOC_TYPE, 0x15, struct kgsl_map_user_mem)
402 struct kgsl_cmdstream_readtimestamp_ctxtid {
403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404   unsigned int context_id;
405   unsigned int type;
406   unsigned int timestamp;
407 };
408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_CTXTID _IOWR(KGSL_IOC_TYPE, 0x16, struct kgsl_cmdstream_readtimestamp_ctxtid)
410 struct kgsl_cmdstream_freememontimestamp_ctxtid {
411   unsigned int context_id;
412   unsigned long gpuaddr;
413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414   unsigned int type;
415   unsigned int timestamp;
416 };
417 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID _IOW(KGSL_IOC_TYPE, 0x17, struct kgsl_cmdstream_freememontimestamp_ctxtid)
418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419 struct kgsl_sharedmem_from_pmem {
420   int pmem_fd;
421   unsigned long gpuaddr;
422   unsigned int len;
423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424   unsigned int offset;
425 };
426 #define IOCTL_KGSL_SHAREDMEM_FROM_PMEM _IOWR(KGSL_IOC_TYPE, 0x20, struct kgsl_sharedmem_from_pmem)
427 struct kgsl_sharedmem_free {
428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429   unsigned long gpuaddr;
430 };
431 #define IOCTL_KGSL_SHAREDMEM_FREE _IOW(KGSL_IOC_TYPE, 0x21, struct kgsl_sharedmem_free)
432 struct kgsl_cff_user_event {
433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434   unsigned char cff_opcode;
435   unsigned int op1;
436   unsigned int op2;
437   unsigned int op3;
438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439   unsigned int op4;
440   unsigned int op5;
441   unsigned int __pad[2];
442 };
443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444 #define IOCTL_KGSL_CFF_USER_EVENT _IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_cff_user_event)
445 struct kgsl_gmem_desc {
446   unsigned int x;
447   unsigned int y;
448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449   unsigned int width;
450   unsigned int height;
451   unsigned int pitch;
452 };
453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454 struct kgsl_buffer_desc {
455   void * hostptr;
456   unsigned long gpuaddr;
457   int size;
458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459   unsigned int format;
460   unsigned int pitch;
461   unsigned int enabled;
462 };
463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
464 struct kgsl_bind_gmem_shadow {
465   unsigned int drawctxt_id;
466   struct kgsl_gmem_desc gmem_desc;
467   unsigned int shadow_x;
468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
469   unsigned int shadow_y;
470   struct kgsl_buffer_desc shadow_buffer;
471   unsigned int buffer_id;
472 };
473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
474 #define IOCTL_KGSL_DRAWCTXT_BIND_GMEM_SHADOW _IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow)
475 struct kgsl_sharedmem_from_vmalloc {
476   unsigned long gpuaddr;
477   unsigned int hostptr;
478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
479   unsigned int flags;
480 };
481 #define IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC _IOWR(KGSL_IOC_TYPE, 0x23, struct kgsl_sharedmem_from_vmalloc)
482 #define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE _IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free)
483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
484 struct kgsl_drawctxt_set_bin_base_offset {
485   unsigned int drawctxt_id;
486   unsigned int offset;
487 };
488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
489 #define IOCTL_KGSL_DRAWCTXT_SET_BIN_BASE_OFFSET _IOW(KGSL_IOC_TYPE, 0x25, struct kgsl_drawctxt_set_bin_base_offset)
490 enum kgsl_cmdwindow_type {
491   KGSL_CMDWINDOW_MIN = 0x00000000,
492   KGSL_CMDWINDOW_2D = 0x00000000,
493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
494   KGSL_CMDWINDOW_3D = 0x00000001,
495   KGSL_CMDWINDOW_MMU = 0x00000002,
496   KGSL_CMDWINDOW_ARBITER = 0x000000FF,
497   KGSL_CMDWINDOW_MAX = 0x000000FF,
498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
499 };
500 struct kgsl_cmdwindow_write {
501   enum kgsl_cmdwindow_type target;
502   unsigned int addr;
503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
504   unsigned int data;
505 };
506 #define IOCTL_KGSL_CMDWINDOW_WRITE _IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write)
507 struct kgsl_gpumem_alloc {
508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
509   unsigned long gpuaddr;
510   size_t size;
511   unsigned int flags;
512 };
513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
514 #define IOCTL_KGSL_GPUMEM_ALLOC _IOWR(KGSL_IOC_TYPE, 0x2f, struct kgsl_gpumem_alloc)
515 struct kgsl_cff_syncmem {
516   unsigned long gpuaddr;
517   size_t len;
518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
519   unsigned int __pad[2];
520 };
521 #define IOCTL_KGSL_CFF_SYNCMEM _IOW(KGSL_IOC_TYPE, 0x30, struct kgsl_cff_syncmem)
522 struct kgsl_timestamp_event {
523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
524   int type;
525   unsigned int timestamp;
526   unsigned int context_id;
527   void __user * priv;
528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
529   size_t len;
530 };
531 #define IOCTL_KGSL_TIMESTAMP_EVENT_OLD _IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_timestamp_event)
532 #define KGSL_TIMESTAMP_EVENT_GENLOCK 1
533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
534 struct kgsl_timestamp_event_genlock {
535   int handle;
536 };
537 #define KGSL_TIMESTAMP_EVENT_FENCE 2
538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
539 struct kgsl_timestamp_event_fence {
540   int fence_fd;
541 };
542 #define IOCTL_KGSL_SETPROPERTY _IOW(KGSL_IOC_TYPE, 0x32, struct kgsl_device_getproperty)
543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
544 #define IOCTL_KGSL_TIMESTAMP_EVENT _IOWR(KGSL_IOC_TYPE, 0x33, struct kgsl_timestamp_event)
545 struct kgsl_gpumem_alloc_id {
546   unsigned int id;
547   unsigned int flags;
548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
549   size_t size;
550   size_t mmapsize;
551   unsigned long gpuaddr;
552   unsigned long __pad[2];
553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
554 };
555 #define IOCTL_KGSL_GPUMEM_ALLOC_ID _IOWR(KGSL_IOC_TYPE, 0x34, struct kgsl_gpumem_alloc_id)
556 struct kgsl_gpumem_free_id {
557   unsigned int id;
558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
559   unsigned int __pad;
560 };
561 #define IOCTL_KGSL_GPUMEM_FREE_ID _IOWR(KGSL_IOC_TYPE, 0x35, struct kgsl_gpumem_free_id)
562 struct kgsl_gpumem_get_info {
563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
564   unsigned long gpuaddr;
565   unsigned int id;
566   unsigned int flags;
567   size_t size;
568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
569   size_t mmapsize;
570   unsigned long useraddr;
571   unsigned long __pad[4];
572 };
573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
574 #define IOCTL_KGSL_GPUMEM_GET_INFO _IOWR(KGSL_IOC_TYPE, 0x36, struct kgsl_gpumem_get_info)
575 struct kgsl_gpumem_sync_cache {
576   unsigned long gpuaddr;
577   unsigned int id;
578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
579   unsigned int op;
580   size_t offset;
581   size_t length;
582 };
583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
584 #define KGSL_GPUMEM_CACHE_CLEAN (1 << 0)
585 #define KGSL_GPUMEM_CACHE_TO_GPU KGSL_GPUMEM_CACHE_CLEAN
586 #define KGSL_GPUMEM_CACHE_INV (1 << 1)
587 #define KGSL_GPUMEM_CACHE_FROM_GPU KGSL_GPUMEM_CACHE_INV
588 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
589 #define KGSL_GPUMEM_CACHE_FLUSH (KGSL_GPUMEM_CACHE_CLEAN | KGSL_GPUMEM_CACHE_INV)
590 #define KGSL_GPUMEM_CACHE_RANGE (1 << 31U)
591 #define IOCTL_KGSL_GPUMEM_SYNC_CACHE _IOW(KGSL_IOC_TYPE, 0x37, struct kgsl_gpumem_sync_cache)
592 struct kgsl_perfcounter_get {
593 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
594   unsigned int groupid;
595   unsigned int countable;
596   unsigned int offset;
597   unsigned int offset_hi;
598 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
599   unsigned int __pad;
600 };
601 #define IOCTL_KGSL_PERFCOUNTER_GET _IOWR(KGSL_IOC_TYPE, 0x38, struct kgsl_perfcounter_get)
602 struct kgsl_perfcounter_put {
603 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
604   unsigned int groupid;
605   unsigned int countable;
606   unsigned int __pad[2];
607 };
608 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
609 #define IOCTL_KGSL_PERFCOUNTER_PUT _IOW(KGSL_IOC_TYPE, 0x39, struct kgsl_perfcounter_put)
610 struct kgsl_perfcounter_query {
611   unsigned int groupid;
612   unsigned int __user * countables;
613 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
614   unsigned int count;
615   unsigned int max_counters;
616   unsigned int __pad[2];
617 };
618 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
619 #define IOCTL_KGSL_PERFCOUNTER_QUERY _IOWR(KGSL_IOC_TYPE, 0x3A, struct kgsl_perfcounter_query)
620 struct kgsl_perfcounter_read_group {
621   unsigned int groupid;
622   unsigned int countable;
623 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
624   unsigned long long value;
625 };
626 struct kgsl_perfcounter_read {
627   struct kgsl_perfcounter_read_group __user * reads;
628 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
629   unsigned int count;
630   unsigned int __pad[2];
631 };
632 #define IOCTL_KGSL_PERFCOUNTER_READ _IOWR(KGSL_IOC_TYPE, 0x3B, struct kgsl_perfcounter_read)
633 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
634 struct kgsl_gpumem_sync_cache_bulk {
635   unsigned int __user * id_list;
636   unsigned int count;
637   unsigned int op;
638 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
639   unsigned int __pad[2];
640 };
641 #define IOCTL_KGSL_GPUMEM_SYNC_CACHE_BULK _IOWR(KGSL_IOC_TYPE, 0x3C, struct kgsl_gpumem_sync_cache_bulk)
642 struct kgsl_cmd_syncpoint_timestamp {
643 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
644   unsigned int context_id;
645   unsigned int timestamp;
646 };
647 struct kgsl_cmd_syncpoint_fence {
648 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
649   int fd;
650 };
651 struct kgsl_cmd_syncpoint {
652   int type;
653 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
654   void __user * priv;
655   size_t size;
656 };
657 #define KGSL_IBDESC_MEMLIST 0x1
658 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
659 #define KGSL_IBDESC_PROFILING_BUFFER 0x2
660 struct kgsl_submit_commands {
661   unsigned int context_id;
662   unsigned int flags;
663 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
664   struct kgsl_ibdesc __user * cmdlist;
665   unsigned int numcmds;
666   struct kgsl_cmd_syncpoint __user * synclist;
667   unsigned int numsyncs;
668 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
669   unsigned int timestamp;
670   unsigned int __pad[4];
671 };
672 #define IOCTL_KGSL_SUBMIT_COMMANDS _IOWR(KGSL_IOC_TYPE, 0x3D, struct kgsl_submit_commands)
673 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
674 struct kgsl_device_constraint {
675   unsigned int type;
676   unsigned int context_id;
677   void __user * data;
678 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
679   size_t size;
680 };
681 #define KGSL_CONSTRAINT_NONE 0
682 #define KGSL_CONSTRAINT_PWRLEVEL 1
683 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
684 #define KGSL_CONSTRAINT_PWR_MIN 0
685 #define KGSL_CONSTRAINT_PWR_MAX 1
686 struct kgsl_device_constraint_pwrlevel {
687   unsigned int level;
688 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
689 };
690 struct kgsl_syncsource_create {
691   unsigned int id;
692   unsigned int __pad[3];
693 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
694 };
695 #define IOCTL_KGSL_SYNCSOURCE_CREATE _IOWR(KGSL_IOC_TYPE, 0x40, struct kgsl_syncsource_create)
696 struct kgsl_syncsource_destroy {
697   unsigned int id;
698 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
699   unsigned int __pad[3];
700 };
701 #define IOCTL_KGSL_SYNCSOURCE_DESTROY _IOWR(KGSL_IOC_TYPE, 0x41, struct kgsl_syncsource_destroy)
702 struct kgsl_syncsource_create_fence {
703 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
704   unsigned int id;
705   int fence_fd;
706   unsigned int __pad[4];
707 };
708 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
709 #define IOCTL_KGSL_SYNCSOURCE_CREATE_FENCE _IOWR(KGSL_IOC_TYPE, 0x42, struct kgsl_syncsource_create_fence)
710 struct kgsl_syncsource_signal_fence {
711   unsigned int id;
712   int fence_fd;
713 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
714   unsigned int __pad[4];
715 };
716 #define IOCTL_KGSL_SYNCSOURCE_SIGNAL_FENCE _IOWR(KGSL_IOC_TYPE, 0x43, struct kgsl_syncsource_signal_fence)
717 struct kgsl_cff_sync_gpuobj {
718 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
719   uint64_t offset;
720   uint64_t length;
721   unsigned int id;
722 };
723 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
724 #define IOCTL_KGSL_CFF_SYNC_GPUOBJ _IOW(KGSL_IOC_TYPE, 0x44, struct kgsl_cff_sync_gpuobj)
725 struct kgsl_gpuobj_alloc {
726   uint64_t size;
727   uint64_t flags;
728 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
729   uint64_t va_len;
730   uint64_t mmapsize;
731   unsigned int id;
732   unsigned int metadata_len;
733 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
734   uint64_t metadata;
735 };
736 #define KGSL_GPUOBJ_ALLOC_METADATA_MAX 64
737 #define IOCTL_KGSL_GPUOBJ_ALLOC _IOWR(KGSL_IOC_TYPE, 0x45, struct kgsl_gpuobj_alloc)
738 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
739 struct kgsl_gpuobj_free {
740   uint64_t flags;
741   uint64_t __user priv;
742   unsigned int id;
743 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
744   unsigned int type;
745   unsigned int len;
746 };
747 #define KGSL_GPUOBJ_FREE_ON_EVENT 1
748 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
749 #define KGSL_GPU_EVENT_TIMESTAMP 1
750 #define KGSL_GPU_EVENT_FENCE 2
751 struct kgsl_gpu_event_timestamp {
752   unsigned int context_id;
753 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
754   unsigned int timestamp;
755 };
756 struct kgsl_gpu_event_fence {
757   int fd;
758 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
759 };
760 #define IOCTL_KGSL_GPUOBJ_FREE _IOW(KGSL_IOC_TYPE, 0x46, struct kgsl_gpuobj_free)
761 struct kgsl_gpuobj_info {
762   uint64_t gpuaddr;
763 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
764   uint64_t flags;
765   uint64_t size;
766   uint64_t va_len;
767   uint64_t va_addr;
768 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
769   unsigned int id;
770 };
771 #define IOCTL_KGSL_GPUOBJ_INFO _IOWR(KGSL_IOC_TYPE, 0x47, struct kgsl_gpuobj_info)
772 struct kgsl_gpuobj_import {
773 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
774   uint64_t __user priv;
775   uint64_t priv_len;
776   uint64_t flags;
777   unsigned int type;
778 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
779   unsigned int id;
780 };
781 struct kgsl_gpuobj_import_dma_buf {
782   int fd;
783 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
784 };
785 struct kgsl_gpuobj_import_useraddr {
786   uint64_t virtaddr;
787 };
788 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
789 #define IOCTL_KGSL_GPUOBJ_IMPORT _IOWR(KGSL_IOC_TYPE, 0x48, struct kgsl_gpuobj_import)
790 struct kgsl_gpuobj_sync_obj {
791   uint64_t offset;
792   uint64_t length;
793 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
794   unsigned int id;
795   unsigned int op;
796 };
797 struct kgsl_gpuobj_sync {
798 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
799   uint64_t __user objs;
800   unsigned int obj_len;
801   unsigned int count;
802 };
803 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
804 #define IOCTL_KGSL_GPUOBJ_SYNC _IOW(KGSL_IOC_TYPE, 0x49, struct kgsl_gpuobj_sync)
805 struct kgsl_command_object {
806   uint64_t offset;
807   uint64_t gpuaddr;
808 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
809   uint64_t size;
810   unsigned int flags;
811   unsigned int id;
812 };
813 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
814 struct kgsl_command_syncpoint {
815   uint64_t __user priv;
816   uint64_t size;
817   unsigned int type;
818 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
819 };
820 struct kgsl_gpu_command {
821   uint64_t flags;
822   uint64_t __user cmdlist;
823 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
824   unsigned int cmdsize;
825   unsigned int numcmds;
826   uint64_t __user objlist;
827   unsigned int objsize;
828 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
829   unsigned int numobjs;
830   uint64_t __user synclist;
831   unsigned int syncsize;
832   unsigned int numsyncs;
833 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
834   unsigned int context_id;
835   unsigned int timestamp;
836 };
837 #define IOCTL_KGSL_GPU_COMMAND _IOWR(KGSL_IOC_TYPE, 0x4A, struct kgsl_gpu_command)
838 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
839 struct kgsl_preemption_counters_query {
840   uint64_t __user counters;
841   unsigned int size_user;
842   unsigned int size_priority_level;
843 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
844   unsigned int max_priority_level;
845 };
846 #define IOCTL_KGSL_PREEMPTIONCOUNTER_QUERY _IOWR(KGSL_IOC_TYPE, 0x4B, struct kgsl_preemption_counters_query)
847 #define KGSL_GPUOBJ_SET_INFO_METADATA (1 << 0)
848 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
849 #define KGSL_GPUOBJ_SET_INFO_TYPE (1 << 1)
850 struct kgsl_gpuobj_set_info {
851   uint64_t flags;
852   uint64_t metadata;
853 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
854   unsigned int id;
855   unsigned int metadata_len;
856   unsigned int type;
857 };
858 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
859 #define IOCTL_KGSL_GPUOBJ_SET_INFO _IOW(KGSL_IOC_TYPE, 0x4C, struct kgsl_gpuobj_set_info)
860 #endif
861 
862