diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-10-22 16:34:11 +0900 |
---|---|---|
committer | Alexandre Courbot <acourbot@nvidia.com> | 2014-11-12 14:21:52 +0900 |
commit | e2a3ecada2e99678b7d8e090262639c91fccb3be (patch) | |
tree | fcdad3489ca02697a363bb27b4a5401182b4a705 | |
parent | 685479344a4e486098405fa97edcbe3384fe2d7c (diff) | |
download | nouveau-e2a3ecada2e99678b7d8e090262639c91fccb3be.tar.gz |
doc
-rw-r--r-- | nvkm/include/core/mm.h | 17 | ||||
-rw-r--r-- | nvkm/include/subdev/fb.h | 21 | ||||
-rw-r--r-- | nvkm/include/subdev/vm.h | 18 |
3 files changed, 56 insertions, 0 deletions
diff --git a/nvkm/include/core/mm.h b/nvkm/include/core/mm.h index bfe693154..49edf9b85 100644 --- a/nvkm/include/core/mm.h +++ b/nvkm/include/core/mm.h @@ -1,6 +1,15 @@ #ifndef __NOUVEAU_MM_H__ #define __NOUVEAU_MM_H__ +/** + * struct nouveau_mm_node - describes a range in a nouveau_mm + * + * @nl_entry: to link with nouveau_mm::nodes + * @fl_entry: to link with nouveau_mm::free + * @rl_entry: to link with nouveau_mem::regions + * @offset: offset of this range within the nouveau_mm it originates from + * @length: length of this range + */ struct nouveau_mm_node { struct list_head nl_entry; struct list_head fl_entry; @@ -15,6 +24,14 @@ struct nouveau_mm_node { u32 length; }; +/** + * struct nouveau_mm - address space from which ranges can be allocated + * + * @nodes: all ranges belonging to this memory manager + * @free: free ranges in this memory manager + * @block_size: boundary between which memories of different types cannot exist + * @heap_nodes: number of heaps being allocated from this space + */ struct nouveau_mm { struct list_head nodes; struct list_head free; diff --git a/nvkm/include/subdev/fb.h b/nvkm/include/subdev/fb.h index 8d0032f15..564cdc35b 100644 --- a/nvkm/include/subdev/fb.h +++ b/nvkm/include/subdev/fb.h @@ -24,6 +24,27 @@ #define NV_MEM_TYPE_VM 0x7f #define NV_MEM_COMP_VM 0x03 +/** + * struct nouveau_mem - allocated memory + * + * Memory can be provided through 3 different mechanisms: + * 1) as an array of pages, using the pages member + * 2) as a SG table, using the sg member + * 3) as a list of nouveau_mm_node, using the regions member + * + * One and only one of these backing mechanisms can be used at a given time. + * nouveau_vm_map() will use the correct mapping function according to which + * one is used. + * + * @dev: DRM device this memory is allocated for + * @bar_vma: + * @vma: + * @page_shift: size of allocated memory pages + * + * @tag: + * @regions: + * @pages: + */ struct nouveau_mem { struct drm_device *dev; diff --git a/nvkm/include/subdev/vm.h b/nvkm/include/subdev/vm.h index c9509039f..33ed71255 100644 --- a/nvkm/include/subdev/vm.h +++ b/nvkm/include/subdev/vm.h @@ -43,6 +43,15 @@ struct nouveau_vm_pgd { struct nouveau_gpuobj; struct nouveau_mem; +/** + * struct nouveau_vma - range in a virtual address space + * + * @head + * @refcount number of references to this VMA + * @vm VM this range originates from + * @node range within the VM's nouveau_mm + * @offset starting address (in bytes) of this VMA + */ struct nouveau_vma { struct list_head head; int refcount; @@ -52,6 +61,12 @@ struct nouveau_vma { u32 access; }; +/** + * struct nouveau_vm - virtual address space + * + * @vmm: mapping properties and operations + * @mm: space from which ranges can be allocated + */ struct nouveau_vm { struct nouveau_vmmgr *vmm; struct nouveau_mm mm; @@ -65,6 +80,9 @@ struct nouveau_vm { u32 lpde; }; +/** + * struct nouveau_vmmgr - mapping properties and operations + */ struct nouveau_vmmgr { struct nouveau_subdev base; |