1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NVIF_IOCTL_H__ 3 #define __NVIF_IOCTL_H__ 4 5 #define NVIF_VERSION_LATEST 0x0000000000000100ULL 6 7 struct nvif_ioctl_v0 { 8 __u8 version; 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 pad02[4]; 24 #define NVIF_IOCTL_V0_OWNER_NVIF 0x00 25 #define NVIF_IOCTL_V0_OWNER_ANY 0xff 26 __u8 owner; 27 #define NVIF_IOCTL_V0_ROUTE_NVIF 0x00 28 #define NVIF_IOCTL_V0_ROUTE_HIDDEN 0xff 29 __u8 route; 30 __u64 token; 31 __u64 object; 32 __u8 data[]; /* ioctl data (below) */ 33 }; 34 35 struct nvif_ioctl_nop_v0 { 36 __u64 version; 37 }; 38 39 struct nvif_ioctl_sclass_v0 { 40 /* nvif_ioctl ... */ 41 __u8 version; 42 __u8 count; 43 __u8 pad02[6]; 44 struct nvif_ioctl_sclass_oclass_v0 { 45 __s32 oclass; 46 __s16 minver; 47 __s16 maxver; 48 } oclass[]; 49 }; 50 51 struct nvif_ioctl_new_v0 { 52 /* nvif_ioctl ... */ 53 __u8 version; 54 __u8 pad01[6]; 55 __u8 route; 56 __u64 token; 57 __u64 object; 58 __u32 handle; 59 __s32 oclass; 60 __u8 data[]; /* class data (class.h) */ 61 }; 62 63 struct nvif_ioctl_del { 64 }; 65 66 struct 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 75 struct 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 84 struct nvif_ioctl_map_v0 { 85 /* nvif_ioctl ... */ 86 __u8 version; 87 #define NVIF_IOCTL_MAP_V0_IO 0x00 88 #define NVIF_IOCTL_MAP_V0_VA 0x01 89 __u8 type; 90 __u8 pad02[6]; 91 __u64 handle; 92 __u64 length; 93 __u8 data[]; 94 }; 95 96 struct nvif_ioctl_unmap { 97 }; 98 99 struct nvif_ioctl_ntfy_new_v0 { 100 /* nvif_ioctl ... */ 101 __u8 version; 102 __u8 event; 103 __u8 index; 104 __u8 pad03[5]; 105 __u8 data[]; /* event request data (event.h) */ 106 }; 107 108 struct nvif_ioctl_ntfy_del_v0 { 109 /* nvif_ioctl ... */ 110 __u8 version; 111 __u8 index; 112 __u8 pad02[6]; 113 }; 114 115 struct nvif_ioctl_ntfy_get_v0 { 116 /* nvif_ioctl ... */ 117 __u8 version; 118 __u8 index; 119 __u8 pad02[6]; 120 }; 121 122 struct nvif_ioctl_ntfy_put_v0 { 123 /* nvif_ioctl ... */ 124 __u8 version; 125 __u8 index; 126 __u8 pad02[6]; 127 }; 128 129 struct nvif_ioctl_mthd_v0 { 130 /* nvif_ioctl ... */ 131 __u8 version; 132 __u8 method; 133 __u8 pad02[6]; 134 __u8 data[]; /* method data (class.h) */ 135 }; 136 137 #endif 138