linux/drivers/gpu/drm/nouveau/include/nvif/vmm.h
<<
>>
Prefs
   1#ifndef __NVIF_VMM_H__
   2#define __NVIF_VMM_H__
   3#include <nvif/object.h>
   4struct nvif_mem;
   5struct nvif_mmu;
   6
   7enum nvif_vmm_get {
   8        ADDR,
   9        PTES,
  10        LAZY
  11};
  12
  13struct nvif_vma {
  14        u64 addr;
  15        u64 size;
  16};
  17
  18struct nvif_vmm {
  19        struct nvif_object object;
  20        u64 start;
  21        u64 limit;
  22
  23        struct {
  24                u8 shift;
  25                bool sparse:1;
  26                bool vram:1;
  27                bool host:1;
  28                bool comp:1;
  29        } *page;
  30        int page_nr;
  31};
  32
  33int nvif_vmm_init(struct nvif_mmu *, s32 oclass, bool managed, u64 addr,
  34                  u64 size, void *argv, u32 argc, struct nvif_vmm *);
  35void nvif_vmm_fini(struct nvif_vmm *);
  36int nvif_vmm_get(struct nvif_vmm *, enum nvif_vmm_get, bool sparse,
  37                 u8 page, u8 align, u64 size, struct nvif_vma *);
  38void nvif_vmm_put(struct nvif_vmm *, struct nvif_vma *);
  39int nvif_vmm_map(struct nvif_vmm *, u64 addr, u64 size, void *argv, u32 argc,
  40                 struct nvif_mem *, u64 offset);
  41int nvif_vmm_unmap(struct nvif_vmm *, u64);
  42#endif
  43