diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2022-05-24 21:16:30 -0400 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2022-05-24 21:16:30 -0400 |
commit | 2c076a01e5bd0949032ef81cd0e2d37bdecafba5 (patch) | |
tree | 12cc1d66b55a6a72ecdd40a416a86b117f04641a /include/linux/nvmap.h | |
parent | 70c252977fc080c829b195fece6f46f73586f1e4 (diff) |
gpu-paging: Functions to support initial working versionrtss22-aegpu-paging
- Buffer deallocation (+IOCTL)
- Buffer reallocation
- Private dmabuf user list and accessor
Diffstat (limited to 'include/linux/nvmap.h')
-rw-r--r-- | include/linux/nvmap.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index b8d267691..7a8181ca5 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h | |||
@@ -65,6 +65,24 @@ ulong nvmap_iovmm_get_used_pages(void); | |||
65 | int nvmap_register_vidmem_carveout(struct device *dma_dev, | 65 | int nvmap_register_vidmem_carveout(struct device *dma_dev, |
66 | phys_addr_t base, size_t size); | 66 | phys_addr_t base, size_t size); |
67 | 67 | ||
68 | /* The following two functions are to help enable DRAM | ||
69 | * overprovising via paging. These functions allow the | ||
70 | * physical frames backing an nvmap dma_buf to be freed | ||
71 | * (for example, after their contents has been saved | ||
72 | * elsewhere by paging logic), and to be reallocated | ||
73 | * (such as when other code is ready to repopulate them). | ||
74 | * Both functions preserve any open nvmap handles. | ||
75 | */ | ||
76 | int nvmap_dealloc_dmabuf(struct dma_buf *dmabuf); | ||
77 | int nvmap_realloc_dmabuf(struct dma_buf *dmabuf); | ||
78 | |||
79 | /* Some drivers (such as nvgpu) store parallel structures | ||
80 | * for each dmabuf to track internal state. To allow these | ||
81 | * drivers to quickly access their state from a *dmabuf or | ||
82 | * FD, we allow them access to a per-dmabuf list_head. | ||
83 | */ | ||
84 | struct list_head* nvmap_get_priv_list(struct dma_buf *dmabuf); | ||
85 | |||
68 | /* | 86 | /* |
69 | * A heap can be mapped to memory other than DRAM. | 87 | * A heap can be mapped to memory other than DRAM. |
70 | * The HW, controls the memory, can be power gated/ungated | 88 | * The HW, controls the memory, can be power gated/ungated |