summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/include/nvif/if000c.h
blob: 2928ecd989ad54ea2dd04151606520993b58c7a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __NVIF_IF000C_H__
#define __NVIF_IF000C_H__
struct nvif_vmm_v0 {
	__u8  version;
	__u8  page_nr;
	__u8  pad02[6];
	__u64 addr;
	__u64 size;
	__u8  data[];
};

#define NVIF_VMM_V0_PAGE                                                   0x00
#define NVIF_VMM_V0_GET                                                    0x01
#define NVIF_VMM_V0_PUT                                                    0x02
#define NVIF_VMM_V0_MAP                                                    0x03
#define NVIF_VMM_V0_UNMAP                                                  0x04

struct nvif_vmm_page_v0 {
	__u8  version;
	__u8  index;
	__u8  shift;
	__u8  sparse;
	__u8  vram;
	__u8  host;
	__u8  comp;
	__u8  pad07[1];
};

struct nvif_vmm_get_v0 {
	__u8  version;
#define NVIF_VMM_GET_V0_ADDR                                               0x00
#define NVIF_VMM_GET_V0_PTES                                               0x01
#define NVIF_VMM_GET_V0_LAZY	                                           0x02
	__u8  type;
	__u8  sparse;
	__u8  page;
	__u8  align;
	__u8  pad05[3];
	__u64 size;
	__u64 addr;
};

struct nvif_vmm_put_v0 {
	__u8  version;
	__u8  pad01[7];
	__u64 addr;
};

struct nvif_vmm_map_v0 {
	__u8  version;
	__u8  pad01[7];
	__u64 addr;
	__u64 size;
	__u64 memory;
	__u64 offset;
	__u8  data[];
};

struct nvif_vmm_unmap_v0 {
	__u8  version;
	__u8  pad01[7];
	__u64 addr;
};
#endif