summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohan Mossberg <johan.mossberg@stericsson.com>2013-01-11 13:38:13 +0100
committerArve Hjønnevåg <arve@android.com>2013-06-11 17:47:04 -0700
commitbd33f13afdd2adc9b1e983b1e8922bcb01f76a6b (patch)
treed6a31de64d06f854e940823464569c31ebb7e40e /include
parent14de040669d864c64a7e29caa7c39e90015df017 (diff)
gpu: ion: Add support for sharing buffers with dma buf kernel handles
Currently ion can only share buffers with dma buf fd's. Fd's can not be used inside the kernel as they are process specific so support for sharing buffers with dma buf kernel handles is needed to support kernel only use cases. An example use case could be a GPU driver using ion that wants to share its output buffers with a 3d party display controller driver supporting dma buf. Change-Id: If1b3753ddbd5b44c5a3e622055d5473e16fc1c48 Signed-off-by: Johan Mossberg <johan.mossberg@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ion.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/ion.h b/include/linux/ion.h
index a55d11fbcbd5..e2503e9e469e 100644
--- a/include/linux/ion.h
+++ b/include/linux/ion.h
@@ -214,11 +214,19 @@ void *ion_map_kernel(struct ion_client *client, struct ion_handle *handle);
void ion_unmap_kernel(struct ion_client *client, struct ion_handle *handle);
/**
- * ion_share_dma_buf() - given an ion client, create a dma-buf fd
+ * ion_share_dma_buf() - share buffer as dma-buf
* @client: the client
* @handle: the handle
*/
-int ion_share_dma_buf(struct ion_client *client, struct ion_handle *handle);
+struct dma_buf *ion_share_dma_buf(struct ion_client *client,
+ struct ion_handle *handle);
+
+/**
+ * ion_share_dma_buf_fd() - given an ion client, create a dma-buf fd
+ * @client: the client
+ * @handle: the handle
+ */
+int ion_share_dma_buf_fd(struct ion_client *client, struct ion_handle *handle);
/**
* ion_import_dma_buf() - given an dma-buf fd from the ion exporter get handle