]>
Commit | Line | Data |
---|---|---|
9ce523cc BS |
1 | #ifndef __NOUVEAU_MEM_H__ |
2 | #define __NOUVEAU_MEM_H__ | |
3 | #include <subdev/fb.h> | |
4 | ||
5 | #include <drm/ttm/ttm_bo_api.h> | |
6 | struct ttm_dma_tt; | |
7 | ||
8 | static inline struct nouveau_mem * | |
9 | nouveau_mem(struct ttm_mem_reg *reg) | |
10 | { | |
11 | return reg->mm_node; | |
12 | } | |
13 | ||
14 | struct nouveau_mem { | |
15 | struct nouveau_cli *cli; | |
16 | u8 kind; | |
17 | u8 comp; | |
18 | struct { | |
19 | u8 page; | |
20 | } mem; | |
21 | struct nvkm_vma vma[2]; | |
22 | ||
23 | struct nvkm_mem __mem; | |
24 | struct nvkm_mem *_mem; | |
25 | struct nvkm_vma bar_vma; | |
bd275f1d BS |
26 | |
27 | struct nvkm_memory memory; | |
7b865663 | 28 | struct nvkm_tags *tags; |
bd275f1d BS |
29 | }; |
30 | ||
31 | enum nvif_vmm_get { | |
32 | PTES, | |
33 | LAZY, | |
9ce523cc BS |
34 | }; |
35 | ||
36 | int nouveau_mem_new(struct nouveau_cli *, u8 kind, u8 comp, | |
37 | struct ttm_mem_reg *); | |
38 | void nouveau_mem_del(struct ttm_mem_reg *); | |
39 | int nouveau_mem_vram(struct ttm_mem_reg *, bool contig, u8 page); | |
40 | int nouveau_mem_host(struct ttm_mem_reg *, struct ttm_dma_tt *); | |
41 | void nouveau_mem_fini(struct nouveau_mem *); | |
42 | int nouveau_mem_map(struct nouveau_mem *, struct nvkm_vmm *, struct nvkm_vma *); | |
43 | #endif |