posix-clock: Fix return code on the poll method's error path
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / include / nvif / ioctl.h
blobb0ac0215ebf981b7a440c3ac43c5e2f80f2c2fd4
1 #ifndef __NVIF_IOCTL_H__
2 #define __NVIF_IOCTL_H__
4 #define NVIF_VERSION_LATEST 0x0000000000000000ULL
6 struct nvif_ioctl_v0 {
7 __u8 version;
8 #define NVIF_IOCTL_V0_NOP 0x00
9 #define NVIF_IOCTL_V0_SCLASS 0x01
10 #define NVIF_IOCTL_V0_NEW 0x02
11 #define NVIF_IOCTL_V0_DEL 0x03
12 #define NVIF_IOCTL_V0_MTHD 0x04
13 #define NVIF_IOCTL_V0_RD 0x05
14 #define NVIF_IOCTL_V0_WR 0x06
15 #define NVIF_IOCTL_V0_MAP 0x07
16 #define NVIF_IOCTL_V0_UNMAP 0x08
17 #define NVIF_IOCTL_V0_NTFY_NEW 0x09
18 #define NVIF_IOCTL_V0_NTFY_DEL 0x0a
19 #define NVIF_IOCTL_V0_NTFY_GET 0x0b
20 #define NVIF_IOCTL_V0_NTFY_PUT 0x0c
21 __u8 type;
22 __u8 pad02[4];
23 #define NVIF_IOCTL_V0_OWNER_NVIF 0x00
24 #define NVIF_IOCTL_V0_OWNER_ANY 0xff
25 __u8 owner;
26 #define NVIF_IOCTL_V0_ROUTE_NVIF 0x00
27 #define NVIF_IOCTL_V0_ROUTE_HIDDEN 0xff
28 __u8 route;
29 __u64 token;
30 __u64 object;
31 __u8 data[]; /* ioctl data (below) */
34 struct nvif_ioctl_nop_v0 {
35 __u64 version;
38 struct nvif_ioctl_sclass_v0 {
39 /* nvif_ioctl ... */
40 __u8 version;
41 __u8 count;
42 __u8 pad02[6];
43 struct nvif_ioctl_sclass_oclass_v0 {
44 __s32 oclass;
45 __s16 minver;
46 __s16 maxver;
47 } oclass[];
50 struct nvif_ioctl_new_v0 {
51 /* nvif_ioctl ... */
52 __u8 version;
53 __u8 pad01[6];
54 __u8 route;
55 __u64 token;
56 __u64 object;
57 __u32 handle;
58 /* these class numbers are made up by us, and not nvidia-assigned */
59 #define NVIF_IOCTL_NEW_V0_CONTROL -1
60 #define NVIF_IOCTL_NEW_V0_PERFMON -2
61 #define NVIF_IOCTL_NEW_V0_PERFDOM -3
62 #define NVIF_IOCTL_NEW_V0_SW_NV04 -4
63 #define NVIF_IOCTL_NEW_V0_SW_NV10 -5
64 #define NVIF_IOCTL_NEW_V0_SW_NV50 -6
65 #define NVIF_IOCTL_NEW_V0_SW_GF100 -7
66 __s32 oclass;
67 __u8 data[]; /* class data (class.h) */
70 struct nvif_ioctl_del {
73 struct nvif_ioctl_rd_v0 {
74 /* nvif_ioctl ... */
75 __u8 version;
76 __u8 size;
77 __u8 pad02[2];
78 __u32 data;
79 __u64 addr;
82 struct nvif_ioctl_wr_v0 {
83 /* nvif_ioctl ... */
84 __u8 version;
85 __u8 size;
86 __u8 pad02[2];
87 __u32 data;
88 __u64 addr;
91 struct nvif_ioctl_map_v0 {
92 /* nvif_ioctl ... */
93 __u8 version;
94 __u8 pad01[3];
95 __u32 length;
96 __u64 handle;
99 struct nvif_ioctl_unmap {
102 struct nvif_ioctl_ntfy_new_v0 {
103 /* nvif_ioctl ... */
104 __u8 version;
105 __u8 event;
106 __u8 index;
107 __u8 pad03[5];
108 __u8 data[]; /* event request data (event.h) */
111 struct nvif_ioctl_ntfy_del_v0 {
112 /* nvif_ioctl ... */
113 __u8 version;
114 __u8 index;
115 __u8 pad02[6];
118 struct nvif_ioctl_ntfy_get_v0 {
119 /* nvif_ioctl ... */
120 __u8 version;
121 __u8 index;
122 __u8 pad02[6];
125 struct nvif_ioctl_ntfy_put_v0 {
126 /* nvif_ioctl ... */
127 __u8 version;
128 __u8 index;
129 __u8 pad02[6];
132 struct nvif_ioctl_mthd_v0 {
133 /* nvif_ioctl ... */
134 __u8 version;
135 __u8 method;
136 __u8 pad02[6];
137 __u8 data[]; /* method data (class.h) */
140 #endif