diff options
| author | Krishna Reddy <vdumpa@nvidia.com> | 2013-08-27 17:15:03 -0400 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:05:58 -0400 |
| commit | 6ea3836d7add4892ffa6cf3dbed0164af1a80a99 (patch) | |
| tree | 5d36b21c8654b87c4017d6e63f4bb3bedad7b96a /include/linux | |
| parent | 6f8a611a94d8b8864759e66e0a9d66b0605b4612 (diff) | |
video: tegra: nvmap: add api's that take dmabuf
add api's that take dmabuf instead of nvmap_handle_ref.
these are necessary for nvhost to start using dmabuf.
Bug 1356091
Change-Id: I61c74641f2c013e4aa9812aabf2a6f558fdf1fcf
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266897
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvmap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index 6ed486ccb..25f413116 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h | |||
| @@ -97,6 +97,8 @@ struct dma_buf *nvmap_dmabuf_export_from_ref(struct nvmap_handle_ref *ref); | |||
| 97 | 97 | ||
| 98 | ulong nvmap_ref_to_user_id(struct nvmap_handle_ref *ref); | 98 | ulong nvmap_ref_to_user_id(struct nvmap_handle_ref *ref); |
| 99 | 99 | ||
| 100 | ulong nvmap_dmabuf_to_user_id(struct dma_buf *dmabuf); | ||
| 101 | |||
| 100 | phys_addr_t nvmap_get_addr_from_user_id(ulong user_id); | 102 | phys_addr_t nvmap_get_addr_from_user_id(ulong user_id); |
| 101 | 103 | ||
| 102 | void nvmap_free(struct nvmap_client *client, struct nvmap_handle_ref *r); | 104 | void nvmap_free(struct nvmap_client *client, struct nvmap_handle_ref *r); |
| @@ -155,6 +157,14 @@ void nvmap_free_sg_table(struct nvmap_client *client, | |||
| 155 | void nvmap_set_nvhost_private(struct nvmap_handle_ref *ref, void *priv, | 157 | void nvmap_set_nvhost_private(struct nvmap_handle_ref *ref, void *priv, |
| 156 | void (*delete)(void *priv)); | 158 | void (*delete)(void *priv)); |
| 157 | void *nvmap_get_nvhost_private(struct nvmap_handle_ref *ref); | 159 | void *nvmap_get_nvhost_private(struct nvmap_handle_ref *ref); |
| 160 | |||
| 161 | struct sg_table *nvmap_dmabuf_sg_table(struct dma_buf *dmabuf); | ||
| 162 | void nvmap_dmabuf_free_sg_table(struct dma_buf *dmabuf, struct sg_table *sgt); | ||
| 163 | |||
| 164 | void nvmap_set_dmabuf_private(struct dma_buf *dmabuf, void *priv, | ||
| 165 | void (*delete)(void *priv)); | ||
| 166 | void *nvmap_get_dmabuf_private(struct dma_buf *dmabuf); | ||
| 167 | |||
| 158 | /* | 168 | /* |
| 159 | * Flush cache maintenance operations for the handle that have been deferred. | 169 | * Flush cache maintenance operations for the handle that have been deferred. |
| 160 | * Use this if you don't use nvmap_pin for mapping the buffer to IOVA. | 170 | * Use this if you don't use nvmap_pin for mapping the buffer to IOVA. |
