diff options
| author | Rebecca Schultz Zavin <rebecca@android.com> | 2012-05-23 12:55:55 -0700 |
|---|---|---|
| committer | Arve Hjønnevåg <arve@android.com> | 2013-07-01 13:40:48 -0700 |
| commit | 042065151c86d44c858115653d190bbb58571187 (patch) | |
| tree | d368c59847458ae44466ee0cde081ba912b2e506 | |
| parent | 8385ba129a9dc71a1d38cca7874d8c55a90eaea1 (diff) | |
| download | olio-linux-3.10-042065151c86d44c858115653d190bbb58571187.tar.xz olio-linux-3.10-042065151c86d44c858115653d190bbb58571187.zip | |
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>
| -rw-r--r-- | drivers/gpu/ion/ion.c | 8 | ||||
| -rw-r--r-- | include/linux/ion.h | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index f17f9255013..50a4a407964 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -616,8 +616,8 @@ void ion_client_destroy(struct ion_client *client) kfree(client); } -struct sg_table *ion_map_dma(struct ion_client *client, - struct ion_handle *handle) +struct sg_table *ion_sg_table(struct ion_client *client, + struct ion_handle *handle) { struct ion_buffer *buffer; struct sg_table *table; @@ -635,10 +635,6 @@ struct sg_table *ion_map_dma(struct ion_client *client, return table; } -void ion_unmap_dma(struct ion_client *client, struct ion_handle *handle) -{ -} - static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment *attachment, enum dma_data_direction direction) { diff --git a/include/linux/ion.h b/include/linux/ion.h index 3bf85fd0438..d44ce69446d 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -149,7 +149,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 @@ -159,6 +159,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 |