summaryrefslogtreecommitdiff
path: root/include/linux/ion.h
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2012-05-23 12:55:55 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2012-07-18 14:40:44 +0530
commit4cf2972ff44d78dda7bc1aee288915ab50ce9155 (patch)
treebf1c8751313dbe5f91c875484a206fa9e19b1525 /include/linux/ion.h
parent72fd968a507c1eb7e5a033501794a10872374f42 (diff)
gpu: ion: Get an sg_table from an ion handle
This patch adds an interface to return and sg_table given a valid ion handle. Change-Id: Icd948c60c1af0a4279f337bcd591cd39b46325e8 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'include/linux/ion.h')
-rw-r--r--include/linux/ion.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/ion.h b/include/linux/ion.h
index 269d6de574f6..eeded60d4235 100644
--- a/include/linux/ion.h
+++ b/include/linux/ion.h
@@ -152,7 +152,7 @@ void ion_free(struct ion_client *client, struct ion_handle *handle);
* This function queries the heap for a particular handle to get the
* handle's physical address. It't output is only correct if
* a heap returns physically contiguous memory -- in other cases
- * this api should not be implemented -- ion_map_dma should be used
+ * this api should not be implemented -- ion_sg_table should be used
* instead. Returns -EINVAL if the handle is invalid. This has
* no implications on the reference counting of the handle --
* the returned value may not be valid if the caller is not
@@ -162,6 +162,17 @@ int ion_phys(struct ion_client *client, struct ion_handle *handle,
ion_phys_addr_t *addr, size_t *len);
/**
+ * ion_map_dma - return an sg_table describing a handle
+ * @client: the client
+ * @handle: the handle
+ *
+ * This function returns the sg_table describing
+ * a particular ion handle.
+ */
+struct sg_table *ion_sg_table(struct ion_client *client,
+ struct ion_handle *handle);
+
+/**
* ion_map_kernel - create mapping for the given handle
* @client: the client
* @handle: handle to map