1d722e3fbSopenharmony_ci#ifndef __NVIF_IOCTL_H__
2d722e3fbSopenharmony_ci#define __NVIF_IOCTL_H__
3d722e3fbSopenharmony_ci
4d722e3fbSopenharmony_ci#define NVIF_VERSION_LATEST                               0x0000000000000000ULL
5d722e3fbSopenharmony_ci
6d722e3fbSopenharmony_cistruct nvif_ioctl_v0 {
7d722e3fbSopenharmony_ci	__u8  version;
8d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NOP                                                  0x00
9d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_SCLASS                                               0x01
10d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NEW                                                  0x02
11d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_DEL                                                  0x03
12d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_MTHD                                                 0x04
13d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_RD                                                   0x05
14d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_WR                                                   0x06
15d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_MAP                                                  0x07
16d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_UNMAP                                                0x08
17d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NTFY_NEW                                             0x09
18d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NTFY_DEL                                             0x0a
19d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NTFY_GET                                             0x0b
20d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_NTFY_PUT                                             0x0c
21d722e3fbSopenharmony_ci	__u8  type;
22d722e3fbSopenharmony_ci	__u8  pad02[4];
23d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_OWNER_NVIF                                           0x00
24d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_OWNER_ANY                                            0xff
25d722e3fbSopenharmony_ci	__u8  owner;
26d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_ROUTE_NVIF                                           0x00
27d722e3fbSopenharmony_ci#define NVIF_IOCTL_V0_ROUTE_HIDDEN                                         0xff
28d722e3fbSopenharmony_ci	__u8  route;
29d722e3fbSopenharmony_ci	__u64 token;
30d722e3fbSopenharmony_ci	__u64 object;
31d722e3fbSopenharmony_ci	__u8  data[];		/* ioctl data (below) */
32d722e3fbSopenharmony_ci};
33d722e3fbSopenharmony_ci
34d722e3fbSopenharmony_cistruct nvif_ioctl_nop_v0 {
35d722e3fbSopenharmony_ci	__u64 version;
36d722e3fbSopenharmony_ci};
37d722e3fbSopenharmony_ci
38d722e3fbSopenharmony_cistruct nvif_ioctl_sclass_v0 {
39d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
40d722e3fbSopenharmony_ci	__u8  version;
41d722e3fbSopenharmony_ci	__u8  count;
42d722e3fbSopenharmony_ci	__u8  pad02[6];
43d722e3fbSopenharmony_ci	struct nvif_ioctl_sclass_oclass_v0 {
44d722e3fbSopenharmony_ci		__s32 oclass;
45d722e3fbSopenharmony_ci		__s16 minver;
46d722e3fbSopenharmony_ci		__s16 maxver;
47d722e3fbSopenharmony_ci	} oclass[];
48d722e3fbSopenharmony_ci};
49d722e3fbSopenharmony_ci
50d722e3fbSopenharmony_cistruct nvif_ioctl_new_v0 {
51d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
52d722e3fbSopenharmony_ci	__u8  version;
53d722e3fbSopenharmony_ci	__u8  pad01[6];
54d722e3fbSopenharmony_ci	__u8  route;
55d722e3fbSopenharmony_ci	__u64 token;
56d722e3fbSopenharmony_ci	__u64 object;
57d722e3fbSopenharmony_ci	__u32 handle;
58d722e3fbSopenharmony_ci	__s32 oclass;
59d722e3fbSopenharmony_ci	__u8  data[];		/* class data (class.h) */
60d722e3fbSopenharmony_ci};
61d722e3fbSopenharmony_ci
62d722e3fbSopenharmony_cistruct nvif_ioctl_del {
63d722e3fbSopenharmony_ci};
64d722e3fbSopenharmony_ci
65d722e3fbSopenharmony_cistruct nvif_ioctl_rd_v0 {
66d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
67d722e3fbSopenharmony_ci	__u8  version;
68d722e3fbSopenharmony_ci	__u8  size;
69d722e3fbSopenharmony_ci	__u8  pad02[2];
70d722e3fbSopenharmony_ci	__u32 data;
71d722e3fbSopenharmony_ci	__u64 addr;
72d722e3fbSopenharmony_ci};
73d722e3fbSopenharmony_ci
74d722e3fbSopenharmony_cistruct nvif_ioctl_wr_v0 {
75d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
76d722e3fbSopenharmony_ci	__u8  version;
77d722e3fbSopenharmony_ci	__u8  size;
78d722e3fbSopenharmony_ci	__u8  pad02[2];
79d722e3fbSopenharmony_ci	__u32 data;
80d722e3fbSopenharmony_ci	__u64 addr;
81d722e3fbSopenharmony_ci};
82d722e3fbSopenharmony_ci
83d722e3fbSopenharmony_cistruct nvif_ioctl_map_v0 {
84d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
85d722e3fbSopenharmony_ci	__u8  version;
86d722e3fbSopenharmony_ci	__u8  pad01[3];
87d722e3fbSopenharmony_ci	__u32 length;
88d722e3fbSopenharmony_ci	__u64 handle;
89d722e3fbSopenharmony_ci};
90d722e3fbSopenharmony_ci
91d722e3fbSopenharmony_cistruct nvif_ioctl_unmap {
92d722e3fbSopenharmony_ci};
93d722e3fbSopenharmony_ci
94d722e3fbSopenharmony_cistruct nvif_ioctl_ntfy_new_v0 {
95d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
96d722e3fbSopenharmony_ci	__u8  version;
97d722e3fbSopenharmony_ci	__u8  event;
98d722e3fbSopenharmony_ci	__u8  index;
99d722e3fbSopenharmony_ci	__u8  pad03[5];
100d722e3fbSopenharmony_ci	__u8  data[];		/* event request data (event.h) */
101d722e3fbSopenharmony_ci};
102d722e3fbSopenharmony_ci
103d722e3fbSopenharmony_cistruct nvif_ioctl_ntfy_del_v0 {
104d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
105d722e3fbSopenharmony_ci	__u8  version;
106d722e3fbSopenharmony_ci	__u8  index;
107d722e3fbSopenharmony_ci	__u8  pad02[6];
108d722e3fbSopenharmony_ci};
109d722e3fbSopenharmony_ci
110d722e3fbSopenharmony_cistruct nvif_ioctl_ntfy_get_v0 {
111d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
112d722e3fbSopenharmony_ci	__u8  version;
113d722e3fbSopenharmony_ci	__u8  index;
114d722e3fbSopenharmony_ci	__u8  pad02[6];
115d722e3fbSopenharmony_ci};
116d722e3fbSopenharmony_ci
117d722e3fbSopenharmony_cistruct nvif_ioctl_ntfy_put_v0 {
118d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
119d722e3fbSopenharmony_ci	__u8  version;
120d722e3fbSopenharmony_ci	__u8  index;
121d722e3fbSopenharmony_ci	__u8  pad02[6];
122d722e3fbSopenharmony_ci};
123d722e3fbSopenharmony_ci
124d722e3fbSopenharmony_cistruct nvif_ioctl_mthd_v0 {
125d722e3fbSopenharmony_ci	/* nvif_ioctl ... */
126d722e3fbSopenharmony_ci	__u8  version;
127d722e3fbSopenharmony_ci	__u8  method;
128d722e3fbSopenharmony_ci	__u8  pad02[6];
129d722e3fbSopenharmony_ci	__u8  data[];		/* method data (class.h) */
130d722e3fbSopenharmony_ci};
131d722e3fbSopenharmony_ci
132d722e3fbSopenharmony_ci#endif
133