diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nvmap.h | 18 | ||||
-rw-r--r-- | include/uapi/linux/nvmap.h | 2 |
2 files changed, 20 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 |
diff --git a/include/uapi/linux/nvmap.h b/include/uapi/linux/nvmap.h index 66eda75ce..5fea19ac8 100644 --- a/include/uapi/linux/nvmap.h +++ b/include/uapi/linux/nvmap.h | |||
@@ -304,6 +304,8 @@ struct nvmap_handle_parameters { | |||
304 | */ | 304 | */ |
305 | #define NVMAP_IOC_FREE _IO(NVMAP_IOC_MAGIC, 4) | 305 | #define NVMAP_IOC_FREE _IO(NVMAP_IOC_MAGIC, 4) |
306 | 306 | ||
307 | #define NVMAP_IOC_DEALLOC _IO(NVMAP_IOC_MAGIC, 9) | ||
308 | |||
307 | /* Maps the region of the specified handle into a user-provided virtual address | 309 | /* Maps the region of the specified handle into a user-provided virtual address |
308 | * that was previously created via an mmap syscall on this fd */ | 310 | * that was previously created via an mmap syscall on this fd */ |
309 | #define NVMAP_IOC_MMAP _IOWR(NVMAP_IOC_MAGIC, 5, struct nvmap_map_caller) | 311 | #define NVMAP_IOC_MMAP _IOWR(NVMAP_IOC_MAGIC, 5, struct nvmap_map_caller) |