]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - drivers/gpu/drm/nouveau/include/nvif/ioctl.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / drivers / gpu / drm / nouveau / include / nvif / ioctl.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
8ec2a6ec
BS
2#ifndef __NVIF_IOCTL_H__
3#define __NVIF_IOCTL_H__
4
99d4d36a
BS
5#define NVIF_VERSION_LATEST 0x0000000000000000ULL
6
8ec2a6ec
BS
7struct nvif_ioctl_v0 {
8 __u8 version;
8ec2a6ec
BS
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;
bf81df9b
BS
23 __u8 pad02[4];
24#define NVIF_IOCTL_V0_OWNER_NVIF 0x00
25#define NVIF_IOCTL_V0_OWNER_ANY 0xff
26 __u8 owner;
8ec2a6ec
BS
27#define NVIF_IOCTL_V0_ROUTE_NVIF 0x00
28#define NVIF_IOCTL_V0_ROUTE_HIDDEN 0xff
8ec2a6ec
BS
29 __u8 route;
30 __u64 token;
bf81df9b 31 __u64 object;
8ec2a6ec
BS
32 __u8 data[]; /* ioctl data (below) */
33};
34
99d4d36a
BS
35struct nvif_ioctl_nop_v0 {
36 __u64 version;
8ec2a6ec
BS
37};
38
39struct nvif_ioctl_sclass_v0 {
40 /* nvif_ioctl ... */
41 __u8 version;
42 __u8 count;
43 __u8 pad02[6];
41a63406
BS
44 struct nvif_ioctl_sclass_oclass_v0 {
45 __s32 oclass;
46 __s16 minver;
47 __s16 maxver;
48 } oclass[];
8ec2a6ec
BS
49};
50
51struct nvif_ioctl_new_v0 {
52 /* nvif_ioctl ... */
53 __u8 version;
54 __u8 pad01[6];
55 __u8 route;
56 __u64 token;
bf81df9b 57 __u64 object;
8ec2a6ec 58 __u32 handle;
315a8b2e 59 __s32 oclass;
8ec2a6ec
BS
60 __u8 data[]; /* class data (class.h) */
61};
62
63struct nvif_ioctl_del {
64};
65
66struct nvif_ioctl_rd_v0 {
67 /* nvif_ioctl ... */
68 __u8 version;
69 __u8 size;
70 __u8 pad02[2];
71 __u32 data;
72 __u64 addr;
73};
74
75struct nvif_ioctl_wr_v0 {
76 /* nvif_ioctl ... */
77 __u8 version;
78 __u8 size;
79 __u8 pad02[2];
80 __u32 data;
81 __u64 addr;
82};
83
84struct nvif_ioctl_map_v0 {
85 /* nvif_ioctl ... */
86 __u8 version;
87 __u8 pad01[3];
88 __u32 length;
89 __u64 handle;
90};
91
92struct nvif_ioctl_unmap {
93};
94
95struct nvif_ioctl_ntfy_new_v0 {
96 /* nvif_ioctl ... */
97 __u8 version;
98 __u8 event;
99 __u8 index;
100 __u8 pad03[5];
101 __u8 data[]; /* event request data (event.h) */
102};
103
104struct nvif_ioctl_ntfy_del_v0 {
105 /* nvif_ioctl ... */
106 __u8 version;
107 __u8 index;
108 __u8 pad02[6];
109};
110
111struct nvif_ioctl_ntfy_get_v0 {
112 /* nvif_ioctl ... */
113 __u8 version;
114 __u8 index;
115 __u8 pad02[6];
116};
117
118struct nvif_ioctl_ntfy_put_v0 {
119 /* nvif_ioctl ... */
120 __u8 version;
121 __u8 index;
122 __u8 pad02[6];
123};
124
125struct nvif_ioctl_mthd_v0 {
126 /* nvif_ioctl ... */
127 __u8 version;
128 __u8 method;
129 __u8 pad02[6];
130 __u8 data[]; /* method data (class.h) */
131};
132
133#endif