1d722e3fbSopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2d722e3fbSopenharmony_ci/* 3d722e3fbSopenharmony_ci * Copyright (C) 2015 Etnaviv Project 4d722e3fbSopenharmony_ci * 5d722e3fbSopenharmony_ci * This program is free software; you can redistribute it and/or modify it 6d722e3fbSopenharmony_ci * under the terms of the GNU General Public License version 2 as published by 7d722e3fbSopenharmony_ci * the Free Software Foundation. 8d722e3fbSopenharmony_ci * 9d722e3fbSopenharmony_ci * This program is distributed in the hope that it will be useful, but WITHOUT 10d722e3fbSopenharmony_ci * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11d722e3fbSopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12d722e3fbSopenharmony_ci * more details. 13d722e3fbSopenharmony_ci * 14d722e3fbSopenharmony_ci * You should have received a copy of the GNU General Public License along with 15d722e3fbSopenharmony_ci * this program. If not, see <http://www.gnu.org/licenses/>. 16d722e3fbSopenharmony_ci */ 17d722e3fbSopenharmony_ci 18d722e3fbSopenharmony_ci#ifndef __ETNAVIV_DRM_H__ 19d722e3fbSopenharmony_ci#define __ETNAVIV_DRM_H__ 20d722e3fbSopenharmony_ci 21d722e3fbSopenharmony_ci#include "drm.h" 22d722e3fbSopenharmony_ci 23d722e3fbSopenharmony_ci#if defined(__cplusplus) 24d722e3fbSopenharmony_ciextern "C" { 25d722e3fbSopenharmony_ci#endif 26d722e3fbSopenharmony_ci 27d722e3fbSopenharmony_ci/* Please note that modifications to all structs defined here are 28d722e3fbSopenharmony_ci * subject to backwards-compatibility constraints: 29d722e3fbSopenharmony_ci * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit 30d722e3fbSopenharmony_ci * user/kernel compatibility 31d722e3fbSopenharmony_ci * 2) Keep fields aligned to their size 32d722e3fbSopenharmony_ci * 3) Because of how drm_ioctl() works, we can add new fields at 33d722e3fbSopenharmony_ci * the end of an ioctl if some care is taken: drm_ioctl() will 34d722e3fbSopenharmony_ci * zero out the new fields at the tail of the ioctl, so a zero 35d722e3fbSopenharmony_ci * value should have a backwards compatible meaning. And for 36d722e3fbSopenharmony_ci * output params, userspace won't see the newly added output 37d722e3fbSopenharmony_ci * fields.. so that has to be somehow ok. 38d722e3fbSopenharmony_ci */ 39d722e3fbSopenharmony_ci 40d722e3fbSopenharmony_ci/* timeouts are specified in clock-monotonic absolute times (to simplify 41d722e3fbSopenharmony_ci * restarting interrupted ioctls). The following struct is logically the 42d722e3fbSopenharmony_ci * same as 'struct timespec' but 32/64b ABI safe. 43d722e3fbSopenharmony_ci */ 44d722e3fbSopenharmony_cistruct drm_etnaviv_timespec { 45d722e3fbSopenharmony_ci __s64 tv_sec; /* seconds */ 46d722e3fbSopenharmony_ci __s64 tv_nsec; /* nanoseconds */ 47d722e3fbSopenharmony_ci}; 48d722e3fbSopenharmony_ci 49d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_MODEL 0x01 50d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_REVISION 0x02 51d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03 52d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04 53d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05 54d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06 55d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07 56d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08 57d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 58d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a 59d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b 60d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c 61d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d 62d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e 63d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f 64d722e3fbSopenharmony_ci 65d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10 66d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11 67d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12 68d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13 69d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14 70d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15 71d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16 72d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17 73d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18 74d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19 75d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a 76d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b 77d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_PRODUCT_ID 0x1c 78d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_CUSTOMER_ID 0x1d 79d722e3fbSopenharmony_ci#define ETNAVIV_PARAM_GPU_ECO_ID 0x1e 80d722e3fbSopenharmony_ci 81d722e3fbSopenharmony_ci#define ETNA_MAX_PIPES 4 82d722e3fbSopenharmony_ci 83d722e3fbSopenharmony_cistruct drm_etnaviv_param { 84d722e3fbSopenharmony_ci __u32 pipe; /* in */ 85d722e3fbSopenharmony_ci __u32 param; /* in, ETNAVIV_PARAM_x */ 86d722e3fbSopenharmony_ci __u64 value; /* out (get_param) or in (set_param) */ 87d722e3fbSopenharmony_ci}; 88d722e3fbSopenharmony_ci 89d722e3fbSopenharmony_ci/* 90d722e3fbSopenharmony_ci * GEM buffers: 91d722e3fbSopenharmony_ci */ 92d722e3fbSopenharmony_ci 93d722e3fbSopenharmony_ci#define ETNA_BO_CACHE_MASK 0x000f0000 94d722e3fbSopenharmony_ci/* cache modes */ 95d722e3fbSopenharmony_ci#define ETNA_BO_CACHED 0x00010000 96d722e3fbSopenharmony_ci#define ETNA_BO_WC 0x00020000 97d722e3fbSopenharmony_ci#define ETNA_BO_UNCACHED 0x00040000 98d722e3fbSopenharmony_ci/* map flags */ 99d722e3fbSopenharmony_ci#define ETNA_BO_FORCE_MMU 0x00100000 100d722e3fbSopenharmony_ci 101d722e3fbSopenharmony_cistruct drm_etnaviv_gem_new { 102d722e3fbSopenharmony_ci __u64 size; /* in */ 103d722e3fbSopenharmony_ci __u32 flags; /* in, mask of ETNA_BO_x */ 104d722e3fbSopenharmony_ci __u32 handle; /* out */ 105d722e3fbSopenharmony_ci}; 106d722e3fbSopenharmony_ci 107d722e3fbSopenharmony_cistruct drm_etnaviv_gem_info { 108d722e3fbSopenharmony_ci __u32 handle; /* in */ 109d722e3fbSopenharmony_ci __u32 pad; 110d722e3fbSopenharmony_ci __u64 offset; /* out, offset to pass to mmap() */ 111d722e3fbSopenharmony_ci}; 112d722e3fbSopenharmony_ci 113d722e3fbSopenharmony_ci#define ETNA_PREP_READ 0x01 114d722e3fbSopenharmony_ci#define ETNA_PREP_WRITE 0x02 115d722e3fbSopenharmony_ci#define ETNA_PREP_NOSYNC 0x04 116d722e3fbSopenharmony_ci 117d722e3fbSopenharmony_cistruct drm_etnaviv_gem_cpu_prep { 118d722e3fbSopenharmony_ci __u32 handle; /* in */ 119d722e3fbSopenharmony_ci __u32 op; /* in, mask of ETNA_PREP_x */ 120d722e3fbSopenharmony_ci struct drm_etnaviv_timespec timeout; /* in */ 121d722e3fbSopenharmony_ci}; 122d722e3fbSopenharmony_ci 123d722e3fbSopenharmony_cistruct drm_etnaviv_gem_cpu_fini { 124d722e3fbSopenharmony_ci __u32 handle; /* in */ 125d722e3fbSopenharmony_ci __u32 flags; /* in, placeholder for now, no defined values */ 126d722e3fbSopenharmony_ci}; 127d722e3fbSopenharmony_ci 128d722e3fbSopenharmony_ci/* 129d722e3fbSopenharmony_ci * Cmdstream Submission: 130d722e3fbSopenharmony_ci */ 131d722e3fbSopenharmony_ci 132d722e3fbSopenharmony_ci/* The value written into the cmdstream is logically: 133d722e3fbSopenharmony_ci * relocbuf->gpuaddr + reloc_offset 134d722e3fbSopenharmony_ci * 135d722e3fbSopenharmony_ci * NOTE that reloc's must be sorted by order of increasing submit_offset, 136d722e3fbSopenharmony_ci * otherwise EINVAL. 137d722e3fbSopenharmony_ci */ 138d722e3fbSopenharmony_cistruct drm_etnaviv_gem_submit_reloc { 139d722e3fbSopenharmony_ci __u32 submit_offset; /* in, offset from submit_bo */ 140d722e3fbSopenharmony_ci __u32 reloc_idx; /* in, index of reloc_bo buffer */ 141d722e3fbSopenharmony_ci __u64 reloc_offset; /* in, offset from start of reloc_bo */ 142d722e3fbSopenharmony_ci __u32 flags; /* in, placeholder for now, no defined values */ 143d722e3fbSopenharmony_ci}; 144d722e3fbSopenharmony_ci 145d722e3fbSopenharmony_ci/* Each buffer referenced elsewhere in the cmdstream submit (ie. the 146d722e3fbSopenharmony_ci * cmdstream buffer(s) themselves or reloc entries) has one (and only 147d722e3fbSopenharmony_ci * one) entry in the submit->bos[] table. 148d722e3fbSopenharmony_ci * 149d722e3fbSopenharmony_ci * As a optimization, the current buffer (gpu virtual address) can be 150d722e3fbSopenharmony_ci * passed back through the 'presumed' field. If on a subsequent reloc, 151d722e3fbSopenharmony_ci * userspace passes back a 'presumed' address that is still valid, 152d722e3fbSopenharmony_ci * then patching the cmdstream for this entry is skipped. This can 153d722e3fbSopenharmony_ci * avoid kernel needing to map/access the cmdstream bo in the common 154d722e3fbSopenharmony_ci * case. 155d722e3fbSopenharmony_ci * If the submit is a softpin submit (ETNA_SUBMIT_SOFTPIN) the 'presumed' 156d722e3fbSopenharmony_ci * field is interpreted as the fixed location to map the bo into the gpu 157d722e3fbSopenharmony_ci * virtual address space. If the kernel is unable to map the buffer at 158d722e3fbSopenharmony_ci * this location the submit will fail. This means userspace is responsible 159d722e3fbSopenharmony_ci * for the whole gpu virtual address management. 160d722e3fbSopenharmony_ci */ 161d722e3fbSopenharmony_ci#define ETNA_SUBMIT_BO_READ 0x0001 162d722e3fbSopenharmony_ci#define ETNA_SUBMIT_BO_WRITE 0x0002 163d722e3fbSopenharmony_cistruct drm_etnaviv_gem_submit_bo { 164d722e3fbSopenharmony_ci __u32 flags; /* in, mask of ETNA_SUBMIT_BO_x */ 165d722e3fbSopenharmony_ci __u32 handle; /* in, GEM handle */ 166d722e3fbSopenharmony_ci __u64 presumed; /* in/out, presumed buffer address */ 167d722e3fbSopenharmony_ci}; 168d722e3fbSopenharmony_ci 169d722e3fbSopenharmony_ci/* performance monitor request (pmr) */ 170d722e3fbSopenharmony_ci#define ETNA_PM_PROCESS_PRE 0x0001 171d722e3fbSopenharmony_ci#define ETNA_PM_PROCESS_POST 0x0002 172d722e3fbSopenharmony_cistruct drm_etnaviv_gem_submit_pmr { 173d722e3fbSopenharmony_ci __u32 flags; /* in, when to process request (ETNA_PM_PROCESS_x) */ 174d722e3fbSopenharmony_ci __u8 domain; /* in, pm domain */ 175d722e3fbSopenharmony_ci __u8 pad; 176d722e3fbSopenharmony_ci __u16 signal; /* in, pm signal */ 177d722e3fbSopenharmony_ci __u32 sequence; /* in, sequence number */ 178d722e3fbSopenharmony_ci __u32 read_offset; /* in, offset from read_bo */ 179d722e3fbSopenharmony_ci __u32 read_idx; /* in, index of read_bo buffer */ 180d722e3fbSopenharmony_ci}; 181d722e3fbSopenharmony_ci 182d722e3fbSopenharmony_ci/* Each cmdstream submit consists of a table of buffers involved, and 183d722e3fbSopenharmony_ci * one or more cmdstream buffers. This allows for conditional execution 184d722e3fbSopenharmony_ci * (context-restore), and IB buffers needed for per tile/bin draw cmds. 185d722e3fbSopenharmony_ci */ 186d722e3fbSopenharmony_ci#define ETNA_SUBMIT_NO_IMPLICIT 0x0001 187d722e3fbSopenharmony_ci#define ETNA_SUBMIT_FENCE_FD_IN 0x0002 188d722e3fbSopenharmony_ci#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 189d722e3fbSopenharmony_ci#define ETNA_SUBMIT_SOFTPIN 0x0008 190d722e3fbSopenharmony_ci#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \ 191d722e3fbSopenharmony_ci ETNA_SUBMIT_FENCE_FD_IN | \ 192d722e3fbSopenharmony_ci ETNA_SUBMIT_FENCE_FD_OUT| \ 193d722e3fbSopenharmony_ci ETNA_SUBMIT_SOFTPIN) 194d722e3fbSopenharmony_ci#define ETNA_PIPE_3D 0x00 195d722e3fbSopenharmony_ci#define ETNA_PIPE_2D 0x01 196d722e3fbSopenharmony_ci#define ETNA_PIPE_VG 0x02 197d722e3fbSopenharmony_cistruct drm_etnaviv_gem_submit { 198d722e3fbSopenharmony_ci __u32 fence; /* out */ 199d722e3fbSopenharmony_ci __u32 pipe; /* in */ 200d722e3fbSopenharmony_ci __u32 exec_state; /* in, initial execution state (ETNA_PIPE_x) */ 201d722e3fbSopenharmony_ci __u32 nr_bos; /* in, number of submit_bo's */ 202d722e3fbSopenharmony_ci __u32 nr_relocs; /* in, number of submit_reloc's */ 203d722e3fbSopenharmony_ci __u32 stream_size; /* in, cmdstream size */ 204d722e3fbSopenharmony_ci __u64 bos; /* in, ptr to array of submit_bo's */ 205d722e3fbSopenharmony_ci __u64 relocs; /* in, ptr to array of submit_reloc's */ 206d722e3fbSopenharmony_ci __u64 stream; /* in, ptr to cmdstream */ 207d722e3fbSopenharmony_ci __u32 flags; /* in, mask of ETNA_SUBMIT_x */ 208d722e3fbSopenharmony_ci __s32 fence_fd; /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */ 209d722e3fbSopenharmony_ci __u64 pmrs; /* in, ptr to array of submit_pmr's */ 210d722e3fbSopenharmony_ci __u32 nr_pmrs; /* in, number of submit_pmr's */ 211d722e3fbSopenharmony_ci __u32 pad; 212d722e3fbSopenharmony_ci}; 213d722e3fbSopenharmony_ci 214d722e3fbSopenharmony_ci/* The normal way to synchronize with the GPU is just to CPU_PREP on 215d722e3fbSopenharmony_ci * a buffer if you need to access it from the CPU (other cmdstream 216d722e3fbSopenharmony_ci * submission from same or other contexts, PAGE_FLIP ioctl, etc, all 217d722e3fbSopenharmony_ci * handle the required synchronization under the hood). This ioctl 218d722e3fbSopenharmony_ci * mainly just exists as a way to implement the gallium pipe_fence 219d722e3fbSopenharmony_ci * APIs without requiring a dummy bo to synchronize on. 220d722e3fbSopenharmony_ci */ 221d722e3fbSopenharmony_ci#define ETNA_WAIT_NONBLOCK 0x01 222d722e3fbSopenharmony_cistruct drm_etnaviv_wait_fence { 223d722e3fbSopenharmony_ci __u32 pipe; /* in */ 224d722e3fbSopenharmony_ci __u32 fence; /* in */ 225d722e3fbSopenharmony_ci __u32 flags; /* in, mask of ETNA_WAIT_x */ 226d722e3fbSopenharmony_ci __u32 pad; 227d722e3fbSopenharmony_ci struct drm_etnaviv_timespec timeout; /* in */ 228d722e3fbSopenharmony_ci}; 229d722e3fbSopenharmony_ci 230d722e3fbSopenharmony_ci#define ETNA_USERPTR_READ 0x01 231d722e3fbSopenharmony_ci#define ETNA_USERPTR_WRITE 0x02 232d722e3fbSopenharmony_cistruct drm_etnaviv_gem_userptr { 233d722e3fbSopenharmony_ci __u64 user_ptr; /* in, page aligned user pointer */ 234d722e3fbSopenharmony_ci __u64 user_size; /* in, page aligned user size */ 235d722e3fbSopenharmony_ci __u32 flags; /* in, flags */ 236d722e3fbSopenharmony_ci __u32 handle; /* out, non-zero handle */ 237d722e3fbSopenharmony_ci}; 238d722e3fbSopenharmony_ci 239d722e3fbSopenharmony_cistruct drm_etnaviv_gem_wait { 240d722e3fbSopenharmony_ci __u32 pipe; /* in */ 241d722e3fbSopenharmony_ci __u32 handle; /* in, bo to be waited for */ 242d722e3fbSopenharmony_ci __u32 flags; /* in, mask of ETNA_WAIT_x */ 243d722e3fbSopenharmony_ci __u32 pad; 244d722e3fbSopenharmony_ci struct drm_etnaviv_timespec timeout; /* in */ 245d722e3fbSopenharmony_ci}; 246d722e3fbSopenharmony_ci 247d722e3fbSopenharmony_ci/* 248d722e3fbSopenharmony_ci * Performance Monitor (PM): 249d722e3fbSopenharmony_ci */ 250d722e3fbSopenharmony_ci 251d722e3fbSopenharmony_cistruct drm_etnaviv_pm_domain { 252d722e3fbSopenharmony_ci __u32 pipe; /* in */ 253d722e3fbSopenharmony_ci __u8 iter; /* in/out, select pm domain at index iter */ 254d722e3fbSopenharmony_ci __u8 id; /* out, id of domain */ 255d722e3fbSopenharmony_ci __u16 nr_signals; /* out, how many signals does this domain provide */ 256d722e3fbSopenharmony_ci char name[64]; /* out, name of domain */ 257d722e3fbSopenharmony_ci}; 258d722e3fbSopenharmony_ci 259d722e3fbSopenharmony_cistruct drm_etnaviv_pm_signal { 260d722e3fbSopenharmony_ci __u32 pipe; /* in */ 261d722e3fbSopenharmony_ci __u8 domain; /* in, pm domain index */ 262d722e3fbSopenharmony_ci __u8 pad; 263d722e3fbSopenharmony_ci __u16 iter; /* in/out, select pm source at index iter */ 264d722e3fbSopenharmony_ci __u16 id; /* out, id of signal */ 265d722e3fbSopenharmony_ci char name[64]; /* out, name of domain */ 266d722e3fbSopenharmony_ci}; 267d722e3fbSopenharmony_ci 268d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GET_PARAM 0x00 269d722e3fbSopenharmony_ci/* placeholder: 270d722e3fbSopenharmony_ci#define DRM_ETNAVIV_SET_PARAM 0x01 271d722e3fbSopenharmony_ci */ 272d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_NEW 0x02 273d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_INFO 0x03 274d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_CPU_PREP 0x04 275d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_CPU_FINI 0x05 276d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_SUBMIT 0x06 277d722e3fbSopenharmony_ci#define DRM_ETNAVIV_WAIT_FENCE 0x07 278d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_USERPTR 0x08 279d722e3fbSopenharmony_ci#define DRM_ETNAVIV_GEM_WAIT 0x09 280d722e3fbSopenharmony_ci#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a 281d722e3fbSopenharmony_ci#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b 282d722e3fbSopenharmony_ci#define DRM_ETNAVIV_NUM_IOCTLS 0x0c 283d722e3fbSopenharmony_ci 284d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param) 285d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new) 286d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info) 287d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep) 288d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini) 289d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit) 290d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence) 291d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr) 292d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait) 293d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain) 294d722e3fbSopenharmony_ci#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal) 295d722e3fbSopenharmony_ci 296d722e3fbSopenharmony_ci#if defined(__cplusplus) 297d722e3fbSopenharmony_ci} 298d722e3fbSopenharmony_ci#endif 299d722e3fbSopenharmony_ci 300d722e3fbSopenharmony_ci#endif /* __ETNAVIV_DRM_H__ */ 301