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