Merge tag 'tag-for-linus-3.9' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf
Pull dma-buf framework updates from Sumit Semwal: "Refcounting implemented for vmap in core dma-buf" * tag 'tag-for-linus-3.9' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf: CHROMIUM: dma-buf: restore args on failure of dma_buf_mmap dma-buf: implement vmap refcounting in the interface logic
This commit is contained in:
@@ -302,7 +302,11 @@ Access to a dma_buf from the kernel context involves three steps:
|
||||
void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
|
||||
|
||||
The vmap call can fail if there is no vmap support in the exporter, or if it
|
||||
runs out of vmalloc space. Fallback to kmap should be implemented.
|
||||
runs out of vmalloc space. Fallback to kmap should be implemented. Note that
|
||||
the dma-buf layer keeps a reference count for all vmap access and calls down
|
||||
into the exporter's vmap function only when no vmapping exists, and only
|
||||
unmaps it once. Protection against concurrent vmap/vunmap calls is provided
|
||||
by taking the dma_buf->lock mutex.
|
||||
|
||||
3. Finish access
|
||||
|
||||
|
Reference in New Issue
Block a user