1d722e3fbSopenharmony_ci/* 2d722e3fbSopenharmony_ci * Copyright (C) 2013 Red Hat 3d722e3fbSopenharmony_ci * Author: Rob Clark <robdclark@gmail.com> 4d722e3fbSopenharmony_ci * 5d722e3fbSopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 6d722e3fbSopenharmony_ci * copy of this software and associated documentation files (the "Software"), 7d722e3fbSopenharmony_ci * to deal in the Software without restriction, including without limitation 8d722e3fbSopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9d722e3fbSopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 10d722e3fbSopenharmony_ci * Software is furnished to do so, subject to the following conditions: 11d722e3fbSopenharmony_ci * 12d722e3fbSopenharmony_ci * The above copyright notice and this permission notice (including the next 13d722e3fbSopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 14d722e3fbSopenharmony_ci * Software. 15d722e3fbSopenharmony_ci * 16d722e3fbSopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17d722e3fbSopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18d722e3fbSopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19d722e3fbSopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20d722e3fbSopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21d722e3fbSopenharmony_ci * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22d722e3fbSopenharmony_ci * SOFTWARE. 23d722e3fbSopenharmony_ci */ 24d722e3fbSopenharmony_ci 25d722e3fbSopenharmony_ci#ifndef __MSM_DRM_H__ 26d722e3fbSopenharmony_ci#define __MSM_DRM_H__ 27d722e3fbSopenharmony_ci 28d722e3fbSopenharmony_ci#include "drm.h" 29d722e3fbSopenharmony_ci 30d722e3fbSopenharmony_ci#if defined(__cplusplus) 31d722e3fbSopenharmony_ciextern "C" { 32d722e3fbSopenharmony_ci#endif 33d722e3fbSopenharmony_ci 34d722e3fbSopenharmony_ci/* Please note that modifications to all structs defined here are 35d722e3fbSopenharmony_ci * subject to backwards-compatibility constraints: 36d722e3fbSopenharmony_ci * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit 37d722e3fbSopenharmony_ci * user/kernel compatibility 38d722e3fbSopenharmony_ci * 2) Keep fields aligned to their size 39d722e3fbSopenharmony_ci * 3) Because of how drm_ioctl() works, we can add new fields at 40d722e3fbSopenharmony_ci * the end of an ioctl if some care is taken: drm_ioctl() will 41d722e3fbSopenharmony_ci * zero out the new fields at the tail of the ioctl, so a zero 42d722e3fbSopenharmony_ci * value should have a backwards compatible meaning. And for 43d722e3fbSopenharmony_ci * output params, userspace won't see the newly added output 44d722e3fbSopenharmony_ci * fields.. so that has to be somehow ok. 45d722e3fbSopenharmony_ci */ 46d722e3fbSopenharmony_ci 47d722e3fbSopenharmony_ci#define MSM_PIPE_NONE 0x00 48d722e3fbSopenharmony_ci#define MSM_PIPE_2D0 0x01 49d722e3fbSopenharmony_ci#define MSM_PIPE_2D1 0x02 50d722e3fbSopenharmony_ci#define MSM_PIPE_3D0 0x10 51d722e3fbSopenharmony_ci 52d722e3fbSopenharmony_ci/* The pipe-id just uses the lower bits, so can be OR'd with flags in 53d722e3fbSopenharmony_ci * the upper 16 bits (which could be extended further, if needed, maybe 54d722e3fbSopenharmony_ci * we extend/overload the pipe-id some day to deal with multiple rings, 55d722e3fbSopenharmony_ci * but even then I don't think we need the full lower 16 bits). 56d722e3fbSopenharmony_ci */ 57d722e3fbSopenharmony_ci#define MSM_PIPE_ID_MASK 0xffff 58d722e3fbSopenharmony_ci#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK) 59d722e3fbSopenharmony_ci#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK) 60d722e3fbSopenharmony_ci 61d722e3fbSopenharmony_ci/* timeouts are specified in clock-monotonic absolute times (to simplify 62d722e3fbSopenharmony_ci * restarting interrupted ioctls). The following struct is logically the 63d722e3fbSopenharmony_ci * same as 'struct timespec' but 32/64b ABI safe. 64d722e3fbSopenharmony_ci */ 65d722e3fbSopenharmony_cistruct drm_msm_timespec { 66d722e3fbSopenharmony_ci __s64 tv_sec; /* seconds */ 67d722e3fbSopenharmony_ci __s64 tv_nsec; /* nanoseconds */ 68d722e3fbSopenharmony_ci}; 69d722e3fbSopenharmony_ci 70d722e3fbSopenharmony_ci#define MSM_PARAM_GPU_ID 0x01 71d722e3fbSopenharmony_ci#define MSM_PARAM_GMEM_SIZE 0x02 72d722e3fbSopenharmony_ci#define MSM_PARAM_CHIP_ID 0x03 73d722e3fbSopenharmony_ci#define MSM_PARAM_MAX_FREQ 0x04 74d722e3fbSopenharmony_ci#define MSM_PARAM_TIMESTAMP 0x05 75d722e3fbSopenharmony_ci#define MSM_PARAM_GMEM_BASE 0x06 76d722e3fbSopenharmony_ci#define MSM_PARAM_NR_RINGS 0x07 77d722e3fbSopenharmony_ci 78d722e3fbSopenharmony_cistruct drm_msm_param { 79d722e3fbSopenharmony_ci __u32 pipe; /* in, MSM_PIPE_x */ 80d722e3fbSopenharmony_ci __u32 param; /* in, MSM_PARAM_x */ 81d722e3fbSopenharmony_ci __u64 value; /* out (get_param) or in (set_param) */ 82d722e3fbSopenharmony_ci}; 83d722e3fbSopenharmony_ci 84d722e3fbSopenharmony_ci/* 85d722e3fbSopenharmony_ci * GEM buffers: 86d722e3fbSopenharmony_ci */ 87d722e3fbSopenharmony_ci 88d722e3fbSopenharmony_ci#define MSM_BO_SCANOUT 0x00000001 /* scanout capable */ 89d722e3fbSopenharmony_ci#define MSM_BO_GPU_READONLY 0x00000002 90d722e3fbSopenharmony_ci#define MSM_BO_CACHE_MASK 0x000f0000 91d722e3fbSopenharmony_ci/* cache modes */ 92d722e3fbSopenharmony_ci#define MSM_BO_CACHED 0x00010000 93d722e3fbSopenharmony_ci#define MSM_BO_WC 0x00020000 94d722e3fbSopenharmony_ci#define MSM_BO_UNCACHED 0x00040000 95d722e3fbSopenharmony_ci 96d722e3fbSopenharmony_ci#define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ 97d722e3fbSopenharmony_ci MSM_BO_GPU_READONLY | \ 98d722e3fbSopenharmony_ci MSM_BO_CACHED | \ 99d722e3fbSopenharmony_ci MSM_BO_WC | \ 100d722e3fbSopenharmony_ci MSM_BO_UNCACHED) 101d722e3fbSopenharmony_ci 102d722e3fbSopenharmony_cistruct drm_msm_gem_new { 103d722e3fbSopenharmony_ci __u64 size; /* in */ 104d722e3fbSopenharmony_ci __u32 flags; /* in, mask of MSM_BO_x */ 105d722e3fbSopenharmony_ci __u32 handle; /* out */ 106d722e3fbSopenharmony_ci}; 107d722e3fbSopenharmony_ci 108d722e3fbSopenharmony_ci#define MSM_INFO_IOVA 0x01 109d722e3fbSopenharmony_ci 110d722e3fbSopenharmony_ci#define MSM_INFO_FLAGS (MSM_INFO_IOVA) 111d722e3fbSopenharmony_ci 112d722e3fbSopenharmony_cistruct drm_msm_gem_info { 113d722e3fbSopenharmony_ci __u32 handle; /* in */ 114d722e3fbSopenharmony_ci __u32 flags; /* in - combination of MSM_INFO_* flags */ 115d722e3fbSopenharmony_ci __u64 offset; /* out, mmap() offset or iova */ 116d722e3fbSopenharmony_ci}; 117d722e3fbSopenharmony_ci 118d722e3fbSopenharmony_ci#define MSM_PREP_READ 0x01 119d722e3fbSopenharmony_ci#define MSM_PREP_WRITE 0x02 120d722e3fbSopenharmony_ci#define MSM_PREP_NOSYNC 0x04 121d722e3fbSopenharmony_ci 122d722e3fbSopenharmony_ci#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC) 123d722e3fbSopenharmony_ci 124d722e3fbSopenharmony_cistruct drm_msm_gem_cpu_prep { 125d722e3fbSopenharmony_ci __u32 handle; /* in */ 126d722e3fbSopenharmony_ci __u32 op; /* in, mask of MSM_PREP_x */ 127d722e3fbSopenharmony_ci struct drm_msm_timespec timeout; /* in */ 128d722e3fbSopenharmony_ci}; 129d722e3fbSopenharmony_ci 130d722e3fbSopenharmony_cistruct drm_msm_gem_cpu_fini { 131d722e3fbSopenharmony_ci __u32 handle; /* in */ 132d722e3fbSopenharmony_ci}; 133d722e3fbSopenharmony_ci 134d722e3fbSopenharmony_ci/* 135d722e3fbSopenharmony_ci * Cmdstream Submission: 136d722e3fbSopenharmony_ci */ 137d722e3fbSopenharmony_ci 138d722e3fbSopenharmony_ci/* The value written into the cmdstream is logically: 139d722e3fbSopenharmony_ci * 140d722e3fbSopenharmony_ci * ((relocbuf->gpuaddr + reloc_offset) << shift) | or 141d722e3fbSopenharmony_ci * 142d722e3fbSopenharmony_ci * When we have GPU's w/ >32bit ptrs, it should be possible to deal 143d722e3fbSopenharmony_ci * with this by emit'ing two reloc entries with appropriate shift 144d722e3fbSopenharmony_ci * values. Or a new MSM_SUBMIT_CMD_x type would also be an option. 145d722e3fbSopenharmony_ci * 146d722e3fbSopenharmony_ci * NOTE that reloc's must be sorted by order of increasing submit_offset, 147d722e3fbSopenharmony_ci * otherwise EINVAL. 148d722e3fbSopenharmony_ci */ 149d722e3fbSopenharmony_cistruct drm_msm_gem_submit_reloc { 150d722e3fbSopenharmony_ci __u32 submit_offset; /* in, offset from submit_bo */ 151d722e3fbSopenharmony_ci __u32 or; /* in, value OR'd with result */ 152d722e3fbSopenharmony_ci __s32 shift; /* in, amount of left shift (can be negative) */ 153d722e3fbSopenharmony_ci __u32 reloc_idx; /* in, index of reloc_bo buffer */ 154d722e3fbSopenharmony_ci __u64 reloc_offset; /* in, offset from start of reloc_bo */ 155d722e3fbSopenharmony_ci}; 156d722e3fbSopenharmony_ci 157d722e3fbSopenharmony_ci/* submit-types: 158d722e3fbSopenharmony_ci * BUF - this cmd buffer is executed normally. 159d722e3fbSopenharmony_ci * IB_TARGET_BUF - this cmd buffer is an IB target. Reloc's are 160d722e3fbSopenharmony_ci * processed normally, but the kernel does not setup an IB to 161d722e3fbSopenharmony_ci * this buffer in the first-level ringbuffer 162d722e3fbSopenharmony_ci * CTX_RESTORE_BUF - only executed if there has been a GPU context 163d722e3fbSopenharmony_ci * switch since the last SUBMIT ioctl 164d722e3fbSopenharmony_ci */ 165d722e3fbSopenharmony_ci#define MSM_SUBMIT_CMD_BUF 0x0001 166d722e3fbSopenharmony_ci#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002 167d722e3fbSopenharmony_ci#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003 168d722e3fbSopenharmony_cistruct drm_msm_gem_submit_cmd { 169d722e3fbSopenharmony_ci __u32 type; /* in, one of MSM_SUBMIT_CMD_x */ 170d722e3fbSopenharmony_ci __u32 submit_idx; /* in, index of submit_bo cmdstream buffer */ 171d722e3fbSopenharmony_ci __u32 submit_offset; /* in, offset into submit_bo */ 172d722e3fbSopenharmony_ci __u32 size; /* in, cmdstream size */ 173d722e3fbSopenharmony_ci __u32 pad; 174d722e3fbSopenharmony_ci __u32 nr_relocs; /* in, number of submit_reloc's */ 175d722e3fbSopenharmony_ci __u64 relocs; /* in, ptr to array of submit_reloc's */ 176d722e3fbSopenharmony_ci}; 177d722e3fbSopenharmony_ci 178d722e3fbSopenharmony_ci/* Each buffer referenced elsewhere in the cmdstream submit (ie. the 179d722e3fbSopenharmony_ci * cmdstream buffer(s) themselves or reloc entries) has one (and only 180d722e3fbSopenharmony_ci * one) entry in the submit->bos[] table. 181d722e3fbSopenharmony_ci * 182d722e3fbSopenharmony_ci * As a optimization, the current buffer (gpu virtual address) can be 183d722e3fbSopenharmony_ci * passed back through the 'presumed' field. If on a subsequent reloc, 184d722e3fbSopenharmony_ci * userspace passes back a 'presumed' address that is still valid, 185d722e3fbSopenharmony_ci * then patching the cmdstream for this entry is skipped. This can 186d722e3fbSopenharmony_ci * avoid kernel needing to map/access the cmdstream bo in the common 187d722e3fbSopenharmony_ci * case. 188d722e3fbSopenharmony_ci */ 189d722e3fbSopenharmony_ci#define MSM_SUBMIT_BO_READ 0x0001 190d722e3fbSopenharmony_ci#define MSM_SUBMIT_BO_WRITE 0x0002 191d722e3fbSopenharmony_ci 192d722e3fbSopenharmony_ci#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE) 193d722e3fbSopenharmony_ci 194d722e3fbSopenharmony_cistruct drm_msm_gem_submit_bo { 195d722e3fbSopenharmony_ci __u32 flags; /* in, mask of MSM_SUBMIT_BO_x */ 196d722e3fbSopenharmony_ci __u32 handle; /* in, GEM handle */ 197d722e3fbSopenharmony_ci __u64 presumed; /* in/out, presumed buffer address */ 198d722e3fbSopenharmony_ci}; 199d722e3fbSopenharmony_ci 200d722e3fbSopenharmony_ci/* Valid submit ioctl flags: */ 201d722e3fbSopenharmony_ci#define MSM_SUBMIT_NO_IMPLICIT 0x80000000 /* disable implicit sync */ 202d722e3fbSopenharmony_ci#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 /* enable input fence_fd */ 203d722e3fbSopenharmony_ci#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 /* enable output fence_fd */ 204d722e3fbSopenharmony_ci#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */ 205d722e3fbSopenharmony_ci#define MSM_SUBMIT_FLAGS ( \ 206d722e3fbSopenharmony_ci MSM_SUBMIT_NO_IMPLICIT | \ 207d722e3fbSopenharmony_ci MSM_SUBMIT_FENCE_FD_IN | \ 208d722e3fbSopenharmony_ci MSM_SUBMIT_FENCE_FD_OUT | \ 209d722e3fbSopenharmony_ci MSM_SUBMIT_SUDO | \ 210d722e3fbSopenharmony_ci 0) 211d722e3fbSopenharmony_ci 212d722e3fbSopenharmony_ci/* Each cmdstream submit consists of a table of buffers involved, and 213d722e3fbSopenharmony_ci * one or more cmdstream buffers. This allows for conditional execution 214d722e3fbSopenharmony_ci * (context-restore), and IB buffers needed for per tile/bin draw cmds. 215d722e3fbSopenharmony_ci */ 216d722e3fbSopenharmony_cistruct drm_msm_gem_submit { 217d722e3fbSopenharmony_ci __u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */ 218d722e3fbSopenharmony_ci __u32 fence; /* out */ 219d722e3fbSopenharmony_ci __u32 nr_bos; /* in, number of submit_bo's */ 220d722e3fbSopenharmony_ci __u32 nr_cmds; /* in, number of submit_cmd's */ 221d722e3fbSopenharmony_ci __u64 bos; /* in, ptr to array of submit_bo's */ 222d722e3fbSopenharmony_ci __u64 cmds; /* in, ptr to array of submit_cmd's */ 223d722e3fbSopenharmony_ci __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */ 224d722e3fbSopenharmony_ci __u32 queueid; /* in, submitqueue id */ 225d722e3fbSopenharmony_ci}; 226d722e3fbSopenharmony_ci 227d722e3fbSopenharmony_ci/* The normal way to synchronize with the GPU is just to CPU_PREP on 228d722e3fbSopenharmony_ci * a buffer if you need to access it from the CPU (other cmdstream 229d722e3fbSopenharmony_ci * submission from same or other contexts, PAGE_FLIP ioctl, etc, all 230d722e3fbSopenharmony_ci * handle the required synchronization under the hood). This ioctl 231d722e3fbSopenharmony_ci * mainly just exists as a way to implement the gallium pipe_fence 232d722e3fbSopenharmony_ci * APIs without requiring a dummy bo to synchronize on. 233d722e3fbSopenharmony_ci */ 234d722e3fbSopenharmony_cistruct drm_msm_wait_fence { 235d722e3fbSopenharmony_ci __u32 fence; /* in */ 236d722e3fbSopenharmony_ci __u32 pad; 237d722e3fbSopenharmony_ci struct drm_msm_timespec timeout; /* in */ 238d722e3fbSopenharmony_ci __u32 queueid; /* in, submitqueue id */ 239d722e3fbSopenharmony_ci}; 240d722e3fbSopenharmony_ci 241d722e3fbSopenharmony_ci/* madvise provides a way to tell the kernel in case a buffers contents 242d722e3fbSopenharmony_ci * can be discarded under memory pressure, which is useful for userspace 243d722e3fbSopenharmony_ci * bo cache where we want to optimistically hold on to buffer allocate 244d722e3fbSopenharmony_ci * and potential mmap, but allow the pages to be discarded under memory 245d722e3fbSopenharmony_ci * pressure. 246d722e3fbSopenharmony_ci * 247d722e3fbSopenharmony_ci * Typical usage would involve madvise(DONTNEED) when buffer enters BO 248d722e3fbSopenharmony_ci * cache, and madvise(WILLNEED) if trying to recycle buffer from BO cache. 249d722e3fbSopenharmony_ci * In the WILLNEED case, 'retained' indicates to userspace whether the 250d722e3fbSopenharmony_ci * backing pages still exist. 251d722e3fbSopenharmony_ci */ 252d722e3fbSopenharmony_ci#define MSM_MADV_WILLNEED 0 /* backing pages are needed, status returned in 'retained' */ 253d722e3fbSopenharmony_ci#define MSM_MADV_DONTNEED 1 /* backing pages not needed */ 254d722e3fbSopenharmony_ci#define __MSM_MADV_PURGED 2 /* internal state */ 255d722e3fbSopenharmony_ci 256d722e3fbSopenharmony_cistruct drm_msm_gem_madvise { 257d722e3fbSopenharmony_ci __u32 handle; /* in, GEM handle */ 258d722e3fbSopenharmony_ci __u32 madv; /* in, MSM_MADV_x */ 259d722e3fbSopenharmony_ci __u32 retained; /* out, whether backing store still exists */ 260d722e3fbSopenharmony_ci}; 261d722e3fbSopenharmony_ci 262d722e3fbSopenharmony_ci/* 263d722e3fbSopenharmony_ci * Draw queues allow the user to set specific submission parameter. Command 264d722e3fbSopenharmony_ci * submissions specify a specific submitqueue to use. ID 0 is reserved for 265d722e3fbSopenharmony_ci * backwards compatibility as a "default" submitqueue 266d722e3fbSopenharmony_ci */ 267d722e3fbSopenharmony_ci 268d722e3fbSopenharmony_ci#define MSM_SUBMITQUEUE_FLAGS (0) 269d722e3fbSopenharmony_ci 270d722e3fbSopenharmony_cistruct drm_msm_submitqueue { 271d722e3fbSopenharmony_ci __u32 flags; /* in, MSM_SUBMITQUEUE_x */ 272d722e3fbSopenharmony_ci __u32 prio; /* in, Priority level */ 273d722e3fbSopenharmony_ci __u32 id; /* out, identifier */ 274d722e3fbSopenharmony_ci}; 275d722e3fbSopenharmony_ci 276d722e3fbSopenharmony_ci#define DRM_MSM_GET_PARAM 0x00 277d722e3fbSopenharmony_ci/* placeholder: 278d722e3fbSopenharmony_ci#define DRM_MSM_SET_PARAM 0x01 279d722e3fbSopenharmony_ci */ 280d722e3fbSopenharmony_ci#define DRM_MSM_GEM_NEW 0x02 281d722e3fbSopenharmony_ci#define DRM_MSM_GEM_INFO 0x03 282d722e3fbSopenharmony_ci#define DRM_MSM_GEM_CPU_PREP 0x04 283d722e3fbSopenharmony_ci#define DRM_MSM_GEM_CPU_FINI 0x05 284d722e3fbSopenharmony_ci#define DRM_MSM_GEM_SUBMIT 0x06 285d722e3fbSopenharmony_ci#define DRM_MSM_WAIT_FENCE 0x07 286d722e3fbSopenharmony_ci#define DRM_MSM_GEM_MADVISE 0x08 287d722e3fbSopenharmony_ci/* placeholder: 288d722e3fbSopenharmony_ci#define DRM_MSM_GEM_SVM_NEW 0x09 289d722e3fbSopenharmony_ci */ 290d722e3fbSopenharmony_ci#define DRM_MSM_SUBMITQUEUE_NEW 0x0A 291d722e3fbSopenharmony_ci#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B 292d722e3fbSopenharmony_ci 293d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) 294d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) 295d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info) 296d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep) 297d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini) 298d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit) 299d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence) 300d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise) 301d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) 302d722e3fbSopenharmony_ci#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) 303d722e3fbSopenharmony_ci 304d722e3fbSopenharmony_ci#if defined(__cplusplus) 305d722e3fbSopenharmony_ci} 306d722e3fbSopenharmony_ci#endif 307d722e3fbSopenharmony_ci 308d722e3fbSopenharmony_ci#endif /* __MSM_DRM_H__ */ 309