xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.h (revision 8e07e0e3964ca4e23ce7b68e2096fe660a888942)
1 #ifndef __NVKM_UMEM_H__
2 #define __NVKM_UMEM_H__
3 #define nvkm_umem(p) container_of((p), struct nvkm_umem, object)
4 #include <core/object.h>
5 #include "mem.h"
6 
7 struct nvkm_umem {
8 	struct nvkm_object object;
9 	struct nvkm_mmu *mmu;
10 	u8 type:8;
11 	bool mappable:1;
12 	bool io:1;
13 
14 	struct nvkm_memory *memory;
15 	struct list_head head;
16 
17 	union {
18 		struct nvkm_vma *bar;
19 		void *map;
20 	};
21 };
22 
23 int nvkm_umem_new(const struct nvkm_oclass *, void *argv, u32 argc,
24 		  struct nvkm_object **);
25 #endif
26