diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-22 08:34:38 -0400 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@ti.com> | 2012-05-25 03:21:11 -0400 |
commit | b25b086d23eb852bf3cfdeb60409b4967ebb3c0c (patch) | |
tree | b7c40775fe47606e319f1d2dab3842ad3460c316 /Documentation | |
parent | 12c4727e1d5370270a7df781d2ba0a76e05c1137 (diff) |
dma-buf: add initial vmap documentation
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/dma-buf-sharing.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 5ff4d2b84f7..ad86fb86c9a 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt | |||
@@ -293,6 +293,17 @@ Access to a dma_buf from the kernel context involves three steps: | |||
293 | Note that these calls need to always succeed. The exporter needs to complete | 293 | Note that these calls need to always succeed. The exporter needs to complete |
294 | any preparations that might fail in begin_cpu_access. | 294 | any preparations that might fail in begin_cpu_access. |
295 | 295 | ||
296 | For some cases the overhead of kmap can be too high, a vmap interface | ||
297 | is introduced. This interface should be used very carefully, as vmalloc | ||
298 | space is a limited resources on many architectures. | ||
299 | |||
300 | Interfaces: | ||
301 | void *dma_buf_vmap(struct dma_buf *dmabuf) | ||
302 | void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) | ||
303 | |||
304 | The vmap call can fail if there is no vmap support in the exporter, or if it | ||
305 | runs out of vmalloc space. Fallback to kmap should be implemented. | ||
306 | |||
296 | 3. Finish access | 307 | 3. Finish access |
297 | 308 | ||
298 | When the importer is done accessing the range specified in begin_cpu_access, | 309 | When the importer is done accessing the range specified in begin_cpu_access, |