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