summaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/nvmap/nvmap_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap_priv.h')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_priv.h b/drivers/video/tegra/nvmap/nvmap_priv.h
index 781260b1d..9d668cd2e 100644
--- a/drivers/video/tegra/nvmap/nvmap_priv.h
+++ b/drivers/video/tegra/nvmap/nvmap_priv.h
@@ -174,6 +174,7 @@ struct nvmap_handle {
174 bool from_va; /* handle memory is from VA */ 174 bool from_va; /* handle memory is from VA */
175 u32 heap_type; /* handle heap is allocated from */ 175 u32 heap_type; /* handle heap is allocated from */
176 u32 userflags; /* flags passed from userspace */ 176 u32 userflags; /* flags passed from userspace */
177 u32 userheap_mask; /* heap_mask passed from userspace */
177 void *vaddr; /* mapping used inside kernel */ 178 void *vaddr; /* mapping used inside kernel */
178 struct list_head vmas; /* list of all user vma's */ 179 struct list_head vmas; /* list of all user vma's */
179 atomic_t umap_count; /* number of outstanding maps from user */ 180 atomic_t umap_count; /* number of outstanding maps from user */
@@ -191,6 +192,9 @@ struct nvmap_handle_info {
191 struct nvmap_handle *handle; 192 struct nvmap_handle *handle;
192 struct list_head maps; 193 struct list_head maps;
193 struct mutex maps_lock; 194 struct mutex maps_lock;
195 // Allow drivers such as nvgpu to optionally store pointers to their
196 // own internal state tracking structures
197 struct list_head user_priv_list;
194}; 198};
195 199
196struct nvmap_tag_entry { 200struct nvmap_tag_entry {
@@ -415,12 +419,16 @@ void nvmap_free_handle(struct nvmap_client *c, struct nvmap_handle *h);
415 419
416void nvmap_free_handle_fd(struct nvmap_client *c, int fd); 420void nvmap_free_handle_fd(struct nvmap_client *c, int fd);
417 421
422void nvmap_dealloc_fd(struct nvmap_client *client, int fd);
423
418int nvmap_handle_remove(struct nvmap_device *dev, struct nvmap_handle *h); 424int nvmap_handle_remove(struct nvmap_device *dev, struct nvmap_handle *h);
419 425
420void nvmap_handle_add(struct nvmap_device *dev, struct nvmap_handle *h); 426void nvmap_handle_add(struct nvmap_device *dev, struct nvmap_handle *h);
421 427
422int is_nvmap_vma(struct vm_area_struct *vma); 428int is_nvmap_vma(struct vm_area_struct *vma);
423 429
430bool dmabuf_is_nvmap(struct dma_buf *dmabuf);
431
424int nvmap_get_dmabuf_fd(struct nvmap_client *client, struct nvmap_handle *h); 432int nvmap_get_dmabuf_fd(struct nvmap_client *client, struct nvmap_handle *h);
425struct nvmap_handle *nvmap_handle_get_from_dmabuf_fd( 433struct nvmap_handle *nvmap_handle_get_from_dmabuf_fd(
426 struct nvmap_client *client, int fd); 434 struct nvmap_client *client, int fd);