Lines Matching refs:dma_buf
19 - allows other users to share the buffer by using dma_buf sharing APIs,
35 The dma_buf buffer sharing API usage contains the following steps:
51 that can be performed on the exported dma_buf, and flags for the file
57 struct dma_buf *dma_buf_export(struct dma_buf_export_info *exp_info)
59 If this succeeds, dma_buf_export allocates a dma_buf structure, and
61 buffer, so it can be exported. On failure to allocate the dma_buf object,
80 int dma_buf_fd(struct dma_buf *dmabuf, int flags)
91 struct dma_buf *dma_buf_get(int fd)
93 This API will return a reference to the dma_buf, and increment refcount for
100 struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
104 for scatterlist operations. It will optionally call the 'attach' dma_buf
125 This is a wrapper to dma_buf->ops->map_dma_buf operation, which hides the
126 "dma_buf->ops->" indirection from the users of this interface.
157 This is a wrapper to dma_buf->ops->unmap_dma_buf() operation, which hides the
158 "dma_buf->ops->" indirection from the users of this interface.
178 void dma_buf_detach(struct dma_buf *dmabuf,
182 dma_buf->ops->detach(), if provided by exporter, for any housekeeping bits.
187 void dma_buf_put(struct dma_buf *dmabuf);
244 Access to a dma_buf from the kernel context involves three steps:
248 2. Access the object page-by-page with the dma_buf map apis
254 Before an importer can access a dma_buf object with the cpu from the kernel
259 int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
276 To support dma_buf objects residing in highmem cpu access is page-based using
277 an api similar to kmap. Accessing a dma_buf is done in aligned chunks of
285 void *dma_buf_kmap(struct dma_buf *, unsigned long);
286 void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);
293 void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long);
294 void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *);
298 atomic dma_buf kmaps at the same time (in any given process context).
300 dma_buf kmap calls outside of the range specified in begin_cpu_access are
313 void *dma_buf_vmap(struct dma_buf *dmabuf)
314 void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
321 by taking the dma_buf->lock mutex.
327 unpinning of any pinned resources). The result of any dma_buf kmap calls
331 void dma_buf_end_cpu_access(struct dma_buf *dma_buf,
348 it's ideal if the dma_buf fd itself can be used to access the backing storage
376 int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
380 up a mapping in userspace, calling do_mmap with dma_buf->file will equally
393 dma_buf files share the same anon inode, hence the exporter needs to replace
394 the dma_buf file stored in vma->vm_file with it's own if pte shootdown is
452 unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd
456 by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap