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