aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Chew2015-09-28 04:10:09 -0500
committerSean Paul2015-09-30 21:32:14 -0500
commit93b1c6466800f6b1b1621b12256913d615175d26 (patch)
treecfadc495e149396050f6a19550c361c2abd64619 /include/drm/nouveau_ioctl.h
parent33ecedf4dff805c749a8c014e6132e5e748c602d (diff)
downloadexternal-libgbm-93b1c6466800f6b1b1621b12256913d615175d26.tar.gz
external-libgbm-93b1c6466800f6b1b1621b12256913d615175d26.tar.xz
external-libgbm-93b1c6466800f6b1b1621b12256913d615175d26.zip
drm: add nouveau_{ioctl,class}.h for nvif
Import the new nvif class interface definitions from the kernel drm. These include the recently added channel priority and timeout methods, required for robust contexts. Change-Id: I11a4f834908d9892f68f72826856bfd3687ff04c Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Diffstat (limited to 'include/drm/nouveau_ioctl.h')
-rw-r--r--include/drm/nouveau_ioctl.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/include/drm/nouveau_ioctl.h b/include/drm/nouveau_ioctl.h
new file mode 100644
index 00000000..4cd8e323
--- /dev/null
+++ b/include/drm/nouveau_ioctl.h
@@ -0,0 +1,128 @@
1#ifndef __NVIF_IOCTL_H__
2#define __NVIF_IOCTL_H__
3
4struct nvif_ioctl_v0 {
5 __u8 version;
6#define NVIF_IOCTL_V0_OWNER_NVIF 0x00
7#define NVIF_IOCTL_V0_OWNER_ANY 0xff
8 __u8 owner;
9#define NVIF_IOCTL_V0_NOP 0x00
10#define NVIF_IOCTL_V0_SCLASS 0x01
11#define NVIF_IOCTL_V0_NEW 0x02
12#define NVIF_IOCTL_V0_DEL 0x03
13#define NVIF_IOCTL_V0_MTHD 0x04
14#define NVIF_IOCTL_V0_RD 0x05
15#define NVIF_IOCTL_V0_WR 0x06
16#define NVIF_IOCTL_V0_MAP 0x07
17#define NVIF_IOCTL_V0_UNMAP 0x08
18#define NVIF_IOCTL_V0_NTFY_NEW 0x09
19#define NVIF_IOCTL_V0_NTFY_DEL 0x0a
20#define NVIF_IOCTL_V0_NTFY_GET 0x0b
21#define NVIF_IOCTL_V0_NTFY_PUT 0x0c
22 __u8 type;
23 __u8 path_nr;
24#define NVIF_IOCTL_V0_ROUTE_NVIF 0x00
25#define NVIF_IOCTL_V0_ROUTE_HIDDEN 0xff
26 __u8 pad04[3];
27 __u8 route;
28 __u64 token;
29 __u32 path[8]; /* in reverse */
30 __u8 data[]; /* ioctl data (below) */
31};
32
33struct nvif_ioctl_nop {
34};
35
36struct nvif_ioctl_sclass_v0 {
37 /* nvif_ioctl ... */
38 __u8 version;
39 __u8 count;
40 __u8 pad02[6];
41 __u32 oclass[];
42};
43
44struct nvif_ioctl_new_v0 {
45 /* nvif_ioctl ... */
46 __u8 version;
47 __u8 pad01[6];
48 __u8 route;
49 __u64 token;
50 __u32 handle;
51/* these class numbers are made up by us, and not nvidia-assigned */
52#define NVIF_IOCTL_NEW_V0_PERFCTR 0x0000ffff
53#define NVIF_IOCTL_NEW_V0_CONTROL 0x0000fffe
54 __u32 oclass;
55 __u8 data[]; /* class data (class.h) */
56};
57
58struct nvif_ioctl_del {
59};
60
61struct nvif_ioctl_rd_v0 {
62 /* nvif_ioctl ... */
63 __u8 version;
64 __u8 size;
65 __u8 pad02[2];
66 __u32 data;
67 __u64 addr;
68};
69
70struct nvif_ioctl_wr_v0 {
71 /* nvif_ioctl ... */
72 __u8 version;
73 __u8 size;
74 __u8 pad02[2];
75 __u32 data;
76 __u64 addr;
77};
78
79struct nvif_ioctl_map_v0 {
80 /* nvif_ioctl ... */
81 __u8 version;
82 __u8 pad01[3];
83 __u32 length;
84 __u64 handle;
85};
86
87struct nvif_ioctl_unmap {
88};
89
90struct nvif_ioctl_ntfy_new_v0 {
91 /* nvif_ioctl ... */
92 __u8 version;
93 __u8 event;
94 __u8 index;
95 __u8 pad03[5];
96 __u8 data[]; /* event request data (event.h) */
97};
98
99struct nvif_ioctl_ntfy_del_v0 {
100 /* nvif_ioctl ... */
101 __u8 version;
102 __u8 index;
103 __u8 pad02[6];
104};
105
106struct nvif_ioctl_ntfy_get_v0 {
107 /* nvif_ioctl ... */
108 __u8 version;
109 __u8 index;
110 __u8 pad02[6];
111};
112
113struct nvif_ioctl_ntfy_put_v0 {
114 /* nvif_ioctl ... */
115 __u8 version;
116 __u8 index;
117 __u8 pad02[6];
118};
119
120struct nvif_ioctl_mthd_v0 {
121 /* nvif_ioctl ... */
122 __u8 version;
123 __u8 method;
124 __u8 pad02[6];
125 __u8 data[]; /* method data (class.h) */
126};
127
128#endif