1 #ifndef __NVIF_IOCTL_H__
2 #define __NVIF_IOCTL_H__
3 
4 struct 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 
33 struct nvif_ioctl_nop {
34 };
35 
36 struct nvif_ioctl_sclass_v0 {
37 	/* nvif_ioctl ... */
38 	__u8  version;
39 	__u8  count;
40 	__u8  pad02[6];
41 	__u32 oclass[];
42 };
43 
44 struct 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 
58 struct nvif_ioctl_del {
59 };
60 
61 struct 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 
70 struct 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 
79 struct nvif_ioctl_map_v0 {
80 	/* nvif_ioctl ... */
81 	__u8  version;
82 	__u8  pad01[3];
83 	__u32 length;
84 	__u64 handle;
85 };
86 
87 struct nvif_ioctl_unmap {
88 };
89 
90 struct 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 
99 struct nvif_ioctl_ntfy_del_v0 {
100 	/* nvif_ioctl ... */
101 	__u8  version;
102 	__u8  index;
103 	__u8  pad02[6];
104 };
105 
106 struct nvif_ioctl_ntfy_get_v0 {
107 	/* nvif_ioctl ... */
108 	__u8  version;
109 	__u8  index;
110 	__u8  pad02[6];
111 };
112 
113 struct nvif_ioctl_ntfy_put_v0 {
114 	/* nvif_ioctl ... */
115 	__u8  version;
116 	__u8  index;
117 	__u8  pad02[6];
118 };
119 
120 struct 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
129