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