summaryrefslogtreecommitdiffstats
path: root/Documentation/dma-buf-sharing.txt
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2013-03-22 08:52:16 -0400
committerSumit Semwal <sumit.semwal@linaro.org>2013-05-01 07:05:36 -0400
commit78df969550e7187f4dcd70b737217dcbc8e9a06a (patch)
treea10524a478ce83555904ce27363bd68140f031bc /Documentation/dma-buf-sharing.txt
parent5f56886521d6ddd3648777fae44d82382dd8c87f (diff)
dma-buf: replace dma_buf_export() with dma_buf_export_named()
For debugging purposes, it is useful to have a name-string added while exporting buffers. Hence, dma_buf_export() is replaced with dma_buf_export_named(), which additionally takes 'exp_name' as a parameter. For backward compatibility, and for lazy exporters who don't wish to name themselves, a #define dma_buf_export() is also made available, which adds a __FILE__ instead of 'exp_name'. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> [Thanks for the idea!] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'Documentation/dma-buf-sharing.txt')
-rw-r--r--Documentation/dma-buf-sharing.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 4966b1be42ac..0b23261561d2 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -52,14 +52,23 @@ The dma_buf buffer sharing API usage contains the following steps:
52 associated with this buffer. 52 associated with this buffer.
53 53
54 Interface: 54 Interface:
55 struct dma_buf *dma_buf_export(void *priv, struct dma_buf_ops *ops, 55 struct dma_buf *dma_buf_export_named(void *priv, struct dma_buf_ops *ops,
56 size_t size, int flags) 56 size_t size, int flags,
57 const char *exp_name)
57 58
58 If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a 59 If this succeeds, dma_buf_export allocates a dma_buf structure, and returns a
59 pointer to the same. It also associates an anonymous file with this buffer, 60 pointer to the same. It also associates an anonymous file with this buffer,
60 so it can be exported. On failure to allocate the dma_buf object, it returns 61 so it can be exported. On failure to allocate the dma_buf object, it returns
61 NULL. 62 NULL.
62 63
64 'exp_name' is the name of exporter - to facilitate information while
65 debugging.
66
67 Exporting modules which do not wish to provide any specific name may use the
68 helper define 'dma_buf_export()', with the same arguments as above, but
69 without the last argument; a __FILE__ pre-processor directive will be
70 inserted in place of 'exp_name' instead.
71
632. Userspace gets a handle to pass around to potential buffer-users 722. Userspace gets a handle to pass around to potential buffer-users
64 73
65 Userspace entity requests for a file-descriptor (fd) which is a handle to the 74 Userspace entity requests for a file-descriptor (fd) which is a handle to the