File Index
Files and directories
Sign in
FILE

ioctl.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/nouveau/include/nvif/ioctl.h C
 1/* SPDX-License-Identifier: MIT */
 2#ifndef __NVIF_IOCTL_H__
 3#define __NVIF_IOCTL_H__
 4
 5struct nvif_ioctl_v0 {
 6	/* New members MUST be added within the struct_group() macro below. */
 7	struct_group_tagged(nvif_ioctl_v0_hdr, __hdr,
 8		__u8  version;
 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_MAP                                                  0x07
14#define NVIF_IOCTL_V0_UNMAP                                                0x08
15		__u8  type;
16		__u8  pad02[4];
17#define NVIF_IOCTL_V0_OWNER_NVIF                                           0x00
18#define NVIF_IOCTL_V0_OWNER_ANY                                            0xff
19		__u8  owner;
20#define NVIF_IOCTL_V0_ROUTE_NVIF                                           0x00
21#define NVIF_IOCTL_V0_ROUTE_HIDDEN                                         0xff
22		__u8  route;
23		__u64 token;
24		__u64 object;
25	);
26	__u8  data[];		/* ioctl data (below) */
27};
28static_assert(offsetof(struct nvif_ioctl_v0, data) == sizeof(struct nvif_ioctl_v0_hdr),
29	      "struct member likely outside of struct_group()");
30
31struct nvif_ioctl_sclass_v0 {
32	/* nvif_ioctl ... */
33	__u8  version;
34	__u8  count;
35	__u8  pad02[6];
36	struct nvif_ioctl_sclass_oclass_v0 {
37		__s32 oclass;
38		__s16 minver;
39		__s16 maxver;
40	} oclass[];
41};
42
43struct nvif_ioctl_new_v0 {
44	/* nvif_ioctl ... */
45	__u8  version;
46	__u8  pad01[6];
47	__u8  route;
48	__u64 token;
49	__u64 object;
50	__u32 handle;
51	__s32 oclass;
52	__u8  data[];		/* class data (class.h) */
53};
54
55struct nvif_ioctl_del {
56};
57
58struct nvif_ioctl_mthd_v0 {
59	/* New members MUST be added within the struct_group() macro below. */
60	struct_group_tagged(nvif_ioctl_mthd_v0_hdr, __hdr,
61		/* nvif_ioctl ... */
62		__u8  version;
63		__u8  method;
64		__u8  pad02[6];
65	);
66	__u8  data[];		/* method data (class.h) */
67};
68static_assert(offsetof(struct nvif_ioctl_mthd_v0, data) == sizeof(struct nvif_ioctl_mthd_v0_hdr),
69	      "struct member likely outside of struct_group()");
70
71struct nvif_ioctl_map_v0 {
72	/* nvif_ioctl ... */
73	__u8  version;
74#define NVIF_IOCTL_MAP_V0_IO                                               0x00
75#define NVIF_IOCTL_MAP_V0_VA                                               0x01
76	__u8  type;
77	__u8  pad02[6];
78	__u64 handle;
79	__u64 length;
80	__u8  data[];
81};
82
83struct nvif_ioctl_unmap {
84};
85#endif
~/ Read-only file preview.