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