From 6ea3836d7add4892ffa6cf3dbed0164af1a80a99 Mon Sep 17 00:00:00 2001 From: Krishna Reddy Date: Tue, 27 Aug 2013 14:15:03 -0700 Subject: 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 Reviewed-on: http://git-master/r/266897 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom --- include/linux/nvmap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux') 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); ulong nvmap_ref_to_user_id(struct nvmap_handle_ref *ref); +ulong nvmap_dmabuf_to_user_id(struct dma_buf *dmabuf); + phys_addr_t nvmap_get_addr_from_user_id(ulong user_id); 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, void nvmap_set_nvhost_private(struct nvmap_handle_ref *ref, void *priv, void (*delete)(void *priv)); void *nvmap_get_nvhost_private(struct nvmap_handle_ref *ref); + +struct sg_table *nvmap_dmabuf_sg_table(struct dma_buf *dmabuf); +void nvmap_dmabuf_free_sg_table(struct dma_buf *dmabuf, struct sg_table *sgt); + +void nvmap_set_dmabuf_private(struct dma_buf *dmabuf, void *priv, + void (*delete)(void *priv)); +void *nvmap_get_dmabuf_private(struct dma_buf *dmabuf); + /* * Flush cache maintenance operations for the handle that have been deferred. * Use this if you don't use nvmap_pin for mapping the buffer to IOVA. -- cgit v1.2.2