]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/gpu/drm/nouveau/nouveau_vmm.h
UBUNTU: Ubuntu-4.15.0-96.97
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / nouveau / nouveau_vmm.h
CommitLineData
24e8375b
BS
1#ifndef __NOUVEAU_VMA_H__
2#define __NOUVEAU_VMA_H__
96da0bcd 3#include <nvif/vmm.h>
24e8375b
BS
4struct nouveau_bo;
5struct nouveau_mem;
6
7struct nouveau_vma {
8 struct nouveau_vmm *vmm;
9 int refs;
10 struct list_head head;
11 u64 addr;
12
13 struct nouveau_mem *mem;
24e8375b
BS
14};
15
16struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *);
17int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *,
18 struct nouveau_vma **);
19void nouveau_vma_del(struct nouveau_vma **);
20int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *);
21void nouveau_vma_unmap(struct nouveau_vma *);
22
23struct nouveau_vmm {
24 struct nouveau_cli *cli;
96da0bcd 25 struct nvif_vmm vmm;
24e8375b
BS
26 struct nvkm_vm *vm;
27};
28
29int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *);
30void nouveau_vmm_fini(struct nouveau_vmm *);
31#endif