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 #define KGSL_VERSION_MAJOR 3 22 #define KGSL_VERSION_MINOR 14 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #define KGSL_CONTEXT_SAVE_GMEM 0x00000001 25 #define KGSL_CONTEXT_NO_GMEM_ALLOC 0x00000002 26 #define KGSL_CONTEXT_SUBMIT_IB_LIST 0x00000004 27 #define KGSL_CONTEXT_CTX_SWITCH 0x00000008 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define KGSL_CONTEXT_PREAMBLE 0x00000010 30 #define KGSL_CONTEXT_TRASH_STATE 0x00000020 31 #define KGSL_CONTEXT_PER_CONTEXT_TS 0x00000040 32 #define KGSL_CONTEXT_USER_GENERATED_TS 0x00000080 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define KGSL_CONTEXT_END_OF_FRAME 0x00000100 35 #define KGSL_CONTEXT_NO_FAULT_TOLERANCE 0x00000200 36 #define KGSL_CONTEXT_SYNC 0x00000400 37 #define KGSL_CONTEXT_PWR_CONSTRAINT 0x00000800 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define KGSL_CONTEXT_PRIORITY_MASK 0x0000F000 40 #define KGSL_CONTEXT_PRIORITY_SHIFT 12 41 #define KGSL_CONTEXT_PRIORITY_UNDEF 0 42 #define KGSL_CONTEXT_IFH_NOP 0x00010000 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define KGSL_CONTEXT_SECURE 0x00020000 45 #define KGSL_CONTEXT_TYPE_MASK 0x01F00000 46 #define KGSL_CONTEXT_TYPE_SHIFT 20 47 #define KGSL_CONTEXT_TYPE_ANY 0 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define KGSL_CONTEXT_TYPE_GL 1 50 #define KGSL_CONTEXT_TYPE_CL 2 51 #define KGSL_CONTEXT_TYPE_C2D 3 52 #define KGSL_CONTEXT_TYPE_RS 4 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define KGSL_CONTEXT_TYPE_UNKNOWN 0x1E 55 #define KGSL_CONTEXT_INVALID 0xffffffff 56 #define KGSL_CMDBATCH_MEMLIST 0x00000001 57 #define KGSL_CMDBATCH_MARKER 0x00000002 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define KGSL_CMDBATCH_SUBMIT_IB_LIST KGSL_CONTEXT_SUBMIT_IB_LIST 60 #define KGSL_CMDBATCH_CTX_SWITCH KGSL_CONTEXT_CTX_SWITCH 61 #define KGSL_CMDBATCH_PROFILING 0x00000010 62 #define KGSL_CMDBATCH_END_OF_FRAME KGSL_CONTEXT_END_OF_FRAME 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define KGSL_CMDBATCH_SYNC KGSL_CONTEXT_SYNC 65 #define KGSL_CMDBATCH_PWR_CONSTRAINT KGSL_CONTEXT_PWR_CONSTRAINT 66 #define KGSL_MEMFLAGS_GPUREADONLY 0x01000000 67 #define KGSL_MEMFLAGS_USE_CPU_MAP 0x10000000 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define KGSL_MEMFLAGS_SECURE 0x00000008 70 #define KGSL_CACHEMODE_MASK 0x0C000000 71 #define KGSL_CACHEMODE_SHIFT 26 72 #define KGSL_CACHEMODE_WRITECOMBINE 0 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define KGSL_CACHEMODE_UNCACHED 1 75 #define KGSL_CACHEMODE_WRITETHROUGH 2 76 #define KGSL_CACHEMODE_WRITEBACK 3 77 #define KGSL_MEMTYPE_MASK 0x0000FF00 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define KGSL_MEMTYPE_SHIFT 8 80 #define KGSL_MEMTYPE_OBJECTANY 0 81 #define KGSL_MEMTYPE_FRAMEBUFFER 1 82 #define KGSL_MEMTYPE_RENDERBUFFER 2 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define KGSL_MEMTYPE_ARRAYBUFFER 3 85 #define KGSL_MEMTYPE_ELEMENTARRAYBUFFER 4 86 #define KGSL_MEMTYPE_VERTEXARRAYBUFFER 5 87 #define KGSL_MEMTYPE_TEXTURE 6 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 #define KGSL_MEMTYPE_SURFACE 7 90 #define KGSL_MEMTYPE_EGL_SURFACE 8 91 #define KGSL_MEMTYPE_GL 9 92 #define KGSL_MEMTYPE_CL 10 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 #define KGSL_MEMTYPE_CL_BUFFER_MAP 11 95 #define KGSL_MEMTYPE_CL_BUFFER_NOMAP 12 96 #define KGSL_MEMTYPE_CL_IMAGE_MAP 13 97 #define KGSL_MEMTYPE_CL_IMAGE_NOMAP 14 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define KGSL_MEMTYPE_CL_KERNEL_STACK 15 100 #define KGSL_MEMTYPE_COMMAND 16 101 #define KGSL_MEMTYPE_2D 17 102 #define KGSL_MEMTYPE_EGL_IMAGE 18 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #define KGSL_MEMTYPE_EGL_SHADOW 19 105 #define KGSL_MEMTYPE_MULTISAMPLE 20 106 #define KGSL_MEMTYPE_KERNEL 255 107 #define KGSL_MEMALIGN_MASK 0x00FF0000 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 #define KGSL_MEMALIGN_SHIFT 16 110 enum kgsl_user_mem_type { 111 KGSL_USER_MEM_TYPE_PMEM = 0x00000000, 112 KGSL_USER_MEM_TYPE_ASHMEM = 0x00000001, 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 KGSL_USER_MEM_TYPE_ADDR = 0x00000002, 115 KGSL_USER_MEM_TYPE_ION = 0x00000003, 116 KGSL_USER_MEM_TYPE_MAX = 0x00000007, 117 }; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define KGSL_MEMFLAGS_USERMEM_MASK 0x000000e0 120 #define KGSL_MEMFLAGS_USERMEM_SHIFT 5 121 #define KGSL_USERMEM_FLAG(x) (((x) + 1) << KGSL_MEMFLAGS_USERMEM_SHIFT) 122 #define KGSL_MEMFLAGS_NOT_USERMEM 0 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define KGSL_MEMFLAGS_USERMEM_PMEM KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_PMEM) 125 #define KGSL_MEMFLAGS_USERMEM_ASHMEM KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ASHMEM) 126 #define KGSL_MEMFLAGS_USERMEM_ADDR KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ADDR) 127 #define KGSL_MEMFLAGS_USERMEM_ION KGSL_USERMEM_FLAG(KGSL_USER_MEM_TYPE_ION) 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 #define KGSL_FLAGS_NORMALMODE 0x00000000 130 #define KGSL_FLAGS_SAFEMODE 0x00000001 131 #define KGSL_FLAGS_INITIALIZED0 0x00000002 132 #define KGSL_FLAGS_INITIALIZED 0x00000004 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #define KGSL_FLAGS_STARTED 0x00000008 135 #define KGSL_FLAGS_ACTIVE 0x00000010 136 #define KGSL_FLAGS_RESERVED0 0x00000020 137 #define KGSL_FLAGS_RESERVED1 0x00000040 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 #define KGSL_FLAGS_RESERVED2 0x00000080 140 #define KGSL_FLAGS_SOFT_RESET 0x00000100 141 #define KGSL_FLAGS_PER_CONTEXT_TIMESTAMPS 0x00000200 142 #define KGSL_CLK_SRC 0x00000001 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 #define KGSL_CLK_CORE 0x00000002 145 #define KGSL_CLK_IFACE 0x00000004 146 #define KGSL_CLK_MEM 0x00000008 147 #define KGSL_CLK_MEM_IFACE 0x00000010 148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 #define KGSL_CLK_AXI 0x00000020 150 #define KGSL_SYNCOBJ_SERVER_TIMEOUT 2000 151 enum kgsl_ctx_reset_stat { 152 KGSL_CTX_STAT_NO_ERROR = 0x00000000, 153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 KGSL_CTX_STAT_GUILTY_CONTEXT_RESET_EXT = 0x00000001, 155 KGSL_CTX_STAT_INNOCENT_CONTEXT_RESET_EXT = 0x00000002, 156 KGSL_CTX_STAT_UNKNOWN_CONTEXT_RESET_EXT = 0x00000003 157 }; 158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 #define KGSL_CONVERT_TO_MBPS(val) (val*1000*1000U) 160 enum kgsl_deviceid { 161 KGSL_DEVICE_3D0 = 0x00000000, 162 KGSL_DEVICE_2D0 = 0x00000001, 163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 KGSL_DEVICE_2D1 = 0x00000002, 165 KGSL_DEVICE_MAX = 0x00000003 166 }; 167 struct kgsl_devinfo { 168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 unsigned int device_id; 170 unsigned int chip_id; 171 unsigned int mmu_enabled; 172 unsigned long gmem_gpubaseaddr; 173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 unsigned int gpu_id; 175 size_t gmem_sizebytes; 176 }; 177 struct kgsl_devmemstore { 178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 volatile unsigned int soptimestamp; 180 unsigned int sbz; 181 volatile unsigned int eoptimestamp; 182 unsigned int sbz2; 183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 volatile unsigned int ts_cmp_enable; 185 unsigned int sbz3; 186 volatile unsigned int ref_wait_ts; 187 unsigned int sbz4; 188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 unsigned int current_context; 190 unsigned int sbz5; 191 }; 192 #define KGSL_MEMSTORE_OFFSET(ctxt_id, field) ((ctxt_id)*sizeof(struct kgsl_devmemstore) + offsetof(struct kgsl_devmemstore, field)) 193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 enum kgsl_timestamp_type { 195 KGSL_TIMESTAMP_CONSUMED = 0x00000001, 196 KGSL_TIMESTAMP_RETIRED = 0x00000002, 197 KGSL_TIMESTAMP_QUEUED = 0x00000003, 198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 }; 200 enum kgsl_property_type { 201 KGSL_PROP_DEVICE_INFO = 0x00000001, 202 KGSL_PROP_DEVICE_SHADOW = 0x00000002, 203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 KGSL_PROP_DEVICE_POWER = 0x00000003, 205 KGSL_PROP_SHMEM = 0x00000004, 206 KGSL_PROP_SHMEM_APERTURES = 0x00000005, 207 KGSL_PROP_MMU_ENABLE = 0x00000006, 208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 KGSL_PROP_INTERRUPT_WAITS = 0x00000007, 210 KGSL_PROP_VERSION = 0x00000008, 211 KGSL_PROP_GPU_RESET_STAT = 0x00000009, 212 KGSL_PROP_PWRCTRL = 0x0000000E, 213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 KGSL_PROP_PWR_CONSTRAINT = 0x00000012, 215 }; 216 struct kgsl_shadowprop { 217 unsigned long gpuaddr; 218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 size_t size; 220 unsigned int flags; 221 }; 222 struct kgsl_version { 223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 unsigned int drv_major; 225 unsigned int drv_minor; 226 unsigned int dev_major; 227 unsigned int dev_minor; 228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229 }; 230 #define KGSL_PERFCOUNTER_GROUP_CP 0x0 231 #define KGSL_PERFCOUNTER_GROUP_RBBM 0x1 232 #define KGSL_PERFCOUNTER_GROUP_PC 0x2 233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 #define KGSL_PERFCOUNTER_GROUP_VFD 0x3 235 #define KGSL_PERFCOUNTER_GROUP_HLSQ 0x4 236 #define KGSL_PERFCOUNTER_GROUP_VPC 0x5 237 #define KGSL_PERFCOUNTER_GROUP_TSE 0x6 238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 239 #define KGSL_PERFCOUNTER_GROUP_RAS 0x7 240 #define KGSL_PERFCOUNTER_GROUP_UCHE 0x8 241 #define KGSL_PERFCOUNTER_GROUP_TP 0x9 242 #define KGSL_PERFCOUNTER_GROUP_SP 0xA 243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 244 #define KGSL_PERFCOUNTER_GROUP_RB 0xB 245 #define KGSL_PERFCOUNTER_GROUP_PWR 0xC 246 #define KGSL_PERFCOUNTER_GROUP_VBIF 0xD 247 #define KGSL_PERFCOUNTER_GROUP_VBIF_PWR 0xE 248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 249 #define KGSL_PERFCOUNTER_GROUP_MH 0xF 250 #define KGSL_PERFCOUNTER_GROUP_PA_SU 0x10 251 #define KGSL_PERFCOUNTER_GROUP_SQ 0x11 252 #define KGSL_PERFCOUNTER_GROUP_SX 0x12 253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 254 #define KGSL_PERFCOUNTER_GROUP_TCF 0x13 255 #define KGSL_PERFCOUNTER_GROUP_TCM 0x14 256 #define KGSL_PERFCOUNTER_GROUP_TCR 0x15 257 #define KGSL_PERFCOUNTER_GROUP_L2 0x16 258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 259 #define KGSL_PERFCOUNTER_GROUP_VSC 0x17 260 #define KGSL_PERFCOUNTER_GROUP_CCU 0x18 261 #define KGSL_PERFCOUNTER_GROUP_ALWAYSON 0x1B 262 #define KGSL_PERFCOUNTER_GROUP_MAX 0x1C 263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 264 #define KGSL_PERFCOUNTER_NOT_USED 0xFFFFFFFF 265 #define KGSL_PERFCOUNTER_BROKEN 0xFFFFFFFE 266 struct kgsl_ibdesc { 267 unsigned long gpuaddr; 268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 269 unsigned long __pad; 270 size_t sizedwords; 271 unsigned int ctrl; 272 }; 273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 274 struct kgsl_cmdbatch_profiling_buffer { 275 uint64_t wall_clock_s; 276 uint64_t wall_clock_ns; 277 uint64_t gpu_ticks_queued; 278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 279 uint64_t gpu_ticks_submitted; 280 uint64_t gpu_ticks_retired; 281 }; 282 #define KGSL_IOC_TYPE 0x09 283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 284 struct kgsl_device_getproperty { 285 unsigned int type; 286 void __user *value; 287 size_t sizebytes; 288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 289 }; 290 #define IOCTL_KGSL_DEVICE_GETPROPERTY _IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty) 291 struct kgsl_device_waittimestamp { 292 unsigned int timestamp; 293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 294 unsigned int timeout; 295 }; 296 #define IOCTL_KGSL_DEVICE_WAITTIMESTAMP _IOW(KGSL_IOC_TYPE, 0x6, struct kgsl_device_waittimestamp) 297 struct kgsl_device_waittimestamp_ctxtid { 298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 299 unsigned int context_id; 300 unsigned int timestamp; 301 unsigned int timeout; 302 }; 303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 304 #define IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID _IOW(KGSL_IOC_TYPE, 0x7, struct kgsl_device_waittimestamp_ctxtid) 305 struct kgsl_ringbuffer_issueibcmds { 306 unsigned int drawctxt_id; 307 unsigned long ibdesc_addr; 308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 309 unsigned int numibs; 310 unsigned int timestamp; 311 unsigned int flags; 312 }; 313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 314 #define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS _IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds) 315 struct kgsl_cmdstream_readtimestamp { 316 unsigned int type; 317 unsigned int timestamp; 318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 319 }; 320 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_OLD _IOR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp) 321 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP _IOWR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp) 322 struct kgsl_cmdstream_freememontimestamp { 323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 324 unsigned long gpuaddr; 325 unsigned int type; 326 unsigned int timestamp; 327 }; 328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 329 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP _IOW(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp) 330 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_OLD _IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp) 331 struct kgsl_drawctxt_create { 332 unsigned int flags; 333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 334 unsigned int drawctxt_id; 335 }; 336 #define IOCTL_KGSL_DRAWCTXT_CREATE _IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create) 337 struct kgsl_drawctxt_destroy { 338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 339 unsigned int drawctxt_id; 340 }; 341 #define IOCTL_KGSL_DRAWCTXT_DESTROY _IOW(KGSL_IOC_TYPE, 0x14, struct kgsl_drawctxt_destroy) 342 struct kgsl_map_user_mem { 343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 344 int fd; 345 unsigned long gpuaddr; 346 size_t len; 347 size_t offset; 348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 349 unsigned long hostptr; 350 enum kgsl_user_mem_type memtype; 351 unsigned int flags; 352 }; 353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 354 #define IOCTL_KGSL_MAP_USER_MEM _IOWR(KGSL_IOC_TYPE, 0x15, struct kgsl_map_user_mem) 355 struct kgsl_cmdstream_readtimestamp_ctxtid { 356 unsigned int context_id; 357 unsigned int type; 358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 359 unsigned int timestamp; 360 }; 361 #define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_CTXTID _IOWR(KGSL_IOC_TYPE, 0x16, struct kgsl_cmdstream_readtimestamp_ctxtid) 362 struct kgsl_cmdstream_freememontimestamp_ctxtid { 363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 364 unsigned int context_id; 365 unsigned long gpuaddr; 366 unsigned int type; 367 unsigned int timestamp; 368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 369 }; 370 #define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID _IOW(KGSL_IOC_TYPE, 0x17, struct kgsl_cmdstream_freememontimestamp_ctxtid) 371 struct kgsl_sharedmem_from_pmem { 372 int pmem_fd; 373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 374 unsigned long gpuaddr; 375 unsigned int len; 376 unsigned int offset; 377 }; 378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 379 #define IOCTL_KGSL_SHAREDMEM_FROM_PMEM _IOWR(KGSL_IOC_TYPE, 0x20, struct kgsl_sharedmem_from_pmem) 380 struct kgsl_sharedmem_free { 381 unsigned long gpuaddr; 382 }; 383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 384 #define IOCTL_KGSL_SHAREDMEM_FREE _IOW(KGSL_IOC_TYPE, 0x21, struct kgsl_sharedmem_free) 385 struct kgsl_cff_user_event { 386 unsigned char cff_opcode; 387 unsigned int op1; 388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 389 unsigned int op2; 390 unsigned int op3; 391 unsigned int op4; 392 unsigned int op5; 393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 394 unsigned int __pad[2]; 395 }; 396 #define IOCTL_KGSL_CFF_USER_EVENT _IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_cff_user_event) 397 struct kgsl_gmem_desc { 398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 399 unsigned int x; 400 unsigned int y; 401 unsigned int width; 402 unsigned int height; 403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 404 unsigned int pitch; 405 }; 406 struct kgsl_buffer_desc { 407 void *hostptr; 408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 409 unsigned long gpuaddr; 410 int size; 411 unsigned int format; 412 unsigned int pitch; 413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 414 unsigned int enabled; 415 }; 416 struct kgsl_bind_gmem_shadow { 417 unsigned int drawctxt_id; 418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 419 struct kgsl_gmem_desc gmem_desc; 420 unsigned int shadow_x; 421 unsigned int shadow_y; 422 struct kgsl_buffer_desc shadow_buffer; 423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 424 unsigned int buffer_id; 425 }; 426 #define IOCTL_KGSL_DRAWCTXT_BIND_GMEM_SHADOW _IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow) 427 struct kgsl_sharedmem_from_vmalloc { 428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 429 unsigned long gpuaddr; 430 unsigned int hostptr; 431 unsigned int flags; 432 }; 433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 434 #define IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC _IOWR(KGSL_IOC_TYPE, 0x23, struct kgsl_sharedmem_from_vmalloc) 435 #define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE _IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free) 436 struct kgsl_drawctxt_set_bin_base_offset { 437 unsigned int drawctxt_id; 438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 439 unsigned int offset; 440 }; 441 #define IOCTL_KGSL_DRAWCTXT_SET_BIN_BASE_OFFSET _IOW(KGSL_IOC_TYPE, 0x25, struct kgsl_drawctxt_set_bin_base_offset) 442 enum kgsl_cmdwindow_type { 443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 444 KGSL_CMDWINDOW_MIN = 0x00000000, 445 KGSL_CMDWINDOW_2D = 0x00000000, 446 KGSL_CMDWINDOW_3D = 0x00000001, 447 KGSL_CMDWINDOW_MMU = 0x00000002, 448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 449 KGSL_CMDWINDOW_ARBITER = 0x000000FF, 450 KGSL_CMDWINDOW_MAX = 0x000000FF, 451 }; 452 struct kgsl_cmdwindow_write { 453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 454 enum kgsl_cmdwindow_type target; 455 unsigned int addr; 456 unsigned int data; 457 }; 458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 459 #define IOCTL_KGSL_CMDWINDOW_WRITE _IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write) 460 struct kgsl_gpumem_alloc { 461 unsigned long gpuaddr; 462 size_t size; 463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 464 unsigned int flags; 465 }; 466 #define IOCTL_KGSL_GPUMEM_ALLOC _IOWR(KGSL_IOC_TYPE, 0x2f, struct kgsl_gpumem_alloc) 467 struct kgsl_cff_syncmem { 468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 469 unsigned long gpuaddr; 470 size_t len; 471 unsigned int __pad[2]; 472 }; 473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 474 #define IOCTL_KGSL_CFF_SYNCMEM _IOW(KGSL_IOC_TYPE, 0x30, struct kgsl_cff_syncmem) 475 struct kgsl_timestamp_event { 476 int type; 477 unsigned int timestamp; 478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 479 unsigned int context_id; 480 void __user *priv; 481 size_t len; 482 }; 483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 484 #define IOCTL_KGSL_TIMESTAMP_EVENT_OLD _IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_timestamp_event) 485 #define KGSL_TIMESTAMP_EVENT_GENLOCK 1 486 struct kgsl_timestamp_event_genlock { 487 int handle; 488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 489 }; 490 #define KGSL_TIMESTAMP_EVENT_FENCE 2 491 struct kgsl_timestamp_event_fence { 492 int fence_fd; 493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 494 }; 495 #define IOCTL_KGSL_SETPROPERTY _IOW(KGSL_IOC_TYPE, 0x32, struct kgsl_device_getproperty) 496 #define IOCTL_KGSL_TIMESTAMP_EVENT _IOWR(KGSL_IOC_TYPE, 0x33, struct kgsl_timestamp_event) 497 struct kgsl_gpumem_alloc_id { 498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 499 unsigned int id; 500 unsigned int flags; 501 size_t size; 502 size_t mmapsize; 503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 504 unsigned long gpuaddr; 505 unsigned long __pad[2]; 506 }; 507 #define IOCTL_KGSL_GPUMEM_ALLOC_ID _IOWR(KGSL_IOC_TYPE, 0x34, struct kgsl_gpumem_alloc_id) 508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 509 struct kgsl_gpumem_free_id { 510 unsigned int id; 511 unsigned int __pad; 512 }; 513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 514 #define IOCTL_KGSL_GPUMEM_FREE_ID _IOWR(KGSL_IOC_TYPE, 0x35, struct kgsl_gpumem_free_id) 515 struct kgsl_gpumem_get_info { 516 unsigned long gpuaddr; 517 unsigned int id; 518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 519 unsigned int flags; 520 size_t size; 521 size_t mmapsize; 522 unsigned long useraddr; 523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 524 unsigned long __pad[4]; 525 }; 526 #define IOCTL_KGSL_GPUMEM_GET_INFO _IOWR(KGSL_IOC_TYPE, 0x36, struct kgsl_gpumem_get_info) 527 struct kgsl_gpumem_sync_cache { 528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 529 unsigned long gpuaddr; 530 unsigned int id; 531 unsigned int op; 532 size_t offset; 533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 534 size_t length; 535 }; 536 #define KGSL_GPUMEM_CACHE_CLEAN (1 << 0) 537 #define KGSL_GPUMEM_CACHE_TO_GPU KGSL_GPUMEM_CACHE_CLEAN 538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 539 #define KGSL_GPUMEM_CACHE_INV (1 << 1) 540 #define KGSL_GPUMEM_CACHE_FROM_GPU KGSL_GPUMEM_CACHE_INV 541 #define KGSL_GPUMEM_CACHE_FLUSH (KGSL_GPUMEM_CACHE_CLEAN | KGSL_GPUMEM_CACHE_INV) 542 #define KGSL_GPUMEM_CACHE_RANGE (1 << 31U) 543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 544 #define IOCTL_KGSL_GPUMEM_SYNC_CACHE _IOW(KGSL_IOC_TYPE, 0x37, struct kgsl_gpumem_sync_cache) 545 struct kgsl_perfcounter_get { 546 unsigned int groupid; 547 unsigned int countable; 548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 549 unsigned int offset; 550 unsigned int offset_hi; 551 unsigned int __pad; 552 }; 553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 554 #define IOCTL_KGSL_PERFCOUNTER_GET _IOWR(KGSL_IOC_TYPE, 0x38, struct kgsl_perfcounter_get) 555 struct kgsl_perfcounter_put { 556 unsigned int groupid; 557 unsigned int countable; 558 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 559 unsigned int __pad[2]; 560 }; 561 #define IOCTL_KGSL_PERFCOUNTER_PUT _IOW(KGSL_IOC_TYPE, 0x39, struct kgsl_perfcounter_put) 562 struct kgsl_perfcounter_query { 563 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 564 unsigned int groupid; 565 unsigned int __user *countables; 566 unsigned int count; 567 unsigned int max_counters; 568 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 569 unsigned int __pad[2]; 570 }; 571 #define IOCTL_KGSL_PERFCOUNTER_QUERY _IOWR(KGSL_IOC_TYPE, 0x3A, struct kgsl_perfcounter_query) 572 struct kgsl_perfcounter_read_group { 573 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 574 unsigned int groupid; 575 unsigned int countable; 576 unsigned long long value; 577 }; 578 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 579 struct kgsl_perfcounter_read { 580 struct kgsl_perfcounter_read_group __user *reads; 581 unsigned int count; 582 unsigned int __pad[2]; 583 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 584 }; 585 #define IOCTL_KGSL_PERFCOUNTER_READ _IOWR(KGSL_IOC_TYPE, 0x3B, struct kgsl_perfcounter_read) 586 struct kgsl_gpumem_sync_cache_bulk { 587 unsigned int __user *id_list; 588 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 589 unsigned int count; 590 unsigned int op; 591 unsigned int __pad[2]; 592 }; 593 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 594 #define IOCTL_KGSL_GPUMEM_SYNC_CACHE_BULK _IOWR(KGSL_IOC_TYPE, 0x3C, struct kgsl_gpumem_sync_cache_bulk) 595 struct kgsl_cmd_syncpoint_timestamp { 596 unsigned int context_id; 597 unsigned int timestamp; 598 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 599 }; 600 #define KGSL_CMD_SYNCPOINT_TYPE_TIMESTAMP 0 601 struct kgsl_cmd_syncpoint_fence { 602 int fd; 603 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 604 }; 605 #define KGSL_CMD_SYNCPOINT_TYPE_FENCE 1 606 struct kgsl_cmd_syncpoint { 607 int type; 608 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 609 void __user *priv; 610 size_t size; 611 }; 612 #define KGSL_IBDESC_MEMLIST 0x1 613 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 614 #define KGSL_IBDESC_PROFILING_BUFFER 0x2 615 struct kgsl_submit_commands { 616 unsigned int context_id; 617 unsigned int flags; 618 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 619 struct kgsl_ibdesc __user *cmdlist; 620 unsigned int numcmds; 621 struct kgsl_cmd_syncpoint __user *synclist; 622 unsigned int numsyncs; 623 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 624 unsigned int timestamp; 625 unsigned int __pad[4]; 626 }; 627 #define IOCTL_KGSL_SUBMIT_COMMANDS _IOWR(KGSL_IOC_TYPE, 0x3D, struct kgsl_submit_commands) 628 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 629 struct kgsl_device_constraint { 630 unsigned int type; 631 unsigned int context_id; 632 void __user *data; 633 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 634 size_t size; 635 }; 636 #define KGSL_CONSTRAINT_NONE 0 637 #define KGSL_CONSTRAINT_PWRLEVEL 1 638 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 639 #define KGSL_CONSTRAINT_PWR_MIN 0 640 #define KGSL_CONSTRAINT_PWR_MAX 1 641 struct kgsl_device_constraint_pwrlevel { 642 unsigned int level; 643 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 644 }; 645 struct kgsl_syncsource_create { 646 unsigned int id; 647 unsigned int __pad[3]; 648 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 649 }; 650 #define IOCTL_KGSL_SYNCSOURCE_CREATE _IOWR(KGSL_IOC_TYPE, 0x40, struct kgsl_syncsource_create) 651 struct kgsl_syncsource_destroy { 652 unsigned int id; 653 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 654 unsigned int __pad[3]; 655 }; 656 #define IOCTL_KGSL_SYNCSOURCE_DESTROY _IOWR(KGSL_IOC_TYPE, 0x41, struct kgsl_syncsource_destroy) 657 struct kgsl_syncsource_create_fence { 658 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 659 unsigned int id; 660 int fence_fd; 661 unsigned int __pad[4]; 662 }; 663 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 664 #define IOCTL_KGSL_SYNCSOURCE_CREATE_FENCE _IOWR(KGSL_IOC_TYPE, 0x42, struct kgsl_syncsource_create_fence) 665 struct kgsl_syncsource_signal_fence { 666 unsigned int id; 667 int fence_fd; 668 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 669 unsigned int __pad[4]; 670 }; 671 #define IOCTL_KGSL_SYNCSOURCE_SIGNAL_FENCE _IOWR(KGSL_IOC_TYPE, 0x43, struct kgsl_syncsource_signal_fence) 672 #endif 673 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 674 675