2017-10-31 20:56:19 +03:00
|
|
|
#ifndef __NOUVEAU_VMA_H__
|
|
|
|
#define __NOUVEAU_VMA_H__
|
2017-10-31 20:56:20 +03:00
|
|
|
#include <nvif/vmm.h>
|
2017-10-31 20:56:19 +03:00
|
|
|
struct nouveau_bo;
|
|
|
|
struct nouveau_mem;
|
|
|
|
|
|
|
|
struct nouveau_vma {
|
|
|
|
struct nouveau_vmm *vmm;
|
|
|
|
int refs;
|
|
|
|
struct list_head head;
|
|
|
|
u64 addr;
|
|
|
|
|
|
|
|
struct nouveau_mem *mem;
|
2018-05-08 13:39:47 +03:00
|
|
|
|
|
|
|
struct nouveau_fence *fence;
|
2017-10-31 20:56:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct nouveau_vma *nouveau_vma_find(struct nouveau_bo *, struct nouveau_vmm *);
|
|
|
|
int nouveau_vma_new(struct nouveau_bo *, struct nouveau_vmm *,
|
|
|
|
struct nouveau_vma **);
|
|
|
|
void nouveau_vma_del(struct nouveau_vma **);
|
|
|
|
int nouveau_vma_map(struct nouveau_vma *, struct nouveau_mem *);
|
|
|
|
void nouveau_vma_unmap(struct nouveau_vma *);
|
|
|
|
|
|
|
|
struct nouveau_vmm {
|
|
|
|
struct nouveau_cli *cli;
|
2017-10-31 20:56:20 +03:00
|
|
|
struct nvif_vmm vmm;
|
2018-07-05 05:57:12 +03:00
|
|
|
struct nouveau_svmm *svmm;
|
2017-10-31 20:56:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
int nouveau_vmm_init(struct nouveau_cli *, s32 oclass, struct nouveau_vmm *);
|
|
|
|
void nouveau_vmm_fini(struct nouveau_vmm *);
|
|
|
|
#endif
|