Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / nouveau_mem.h
blob7df3848e85aaeb661defc24f66334780b4a276f7
1 #ifndef __NOUVEAU_MEM_H__
2 #define __NOUVEAU_MEM_H__
3 #include <drm/ttm/ttm_bo_api.h>
4 struct ttm_tt;
6 #include <nvif/mem.h>
7 #include <nvif/vmm.h>
9 static inline struct nouveau_mem *
10 nouveau_mem(struct ttm_resource *reg)
12 return reg->mm_node;
15 struct nouveau_mem {
16 struct nouveau_cli *cli;
17 u8 kind;
18 u8 comp;
19 struct nvif_mem mem;
20 struct nvif_vma vma[2];
23 int nouveau_mem_new(struct nouveau_cli *, u8 kind, u8 comp,
24 struct ttm_resource *);
25 void nouveau_mem_del(struct ttm_resource *);
26 int nouveau_mem_vram(struct ttm_resource *, bool contig, u8 page);
27 int nouveau_mem_host(struct ttm_resource *, struct ttm_tt *);
28 void nouveau_mem_fini(struct nouveau_mem *);
29 int nouveau_mem_map(struct nouveau_mem *, struct nvif_vmm *, struct nvif_vma *);
30 #endif