dma_buf_export(9)
π dma_buf_export π
okay so bestie, welcome to the Kernel API Manual page for dma_buf_export(9) β yes it's a section 9 page, yes it's kernel API, yes we're doing this π«Ά
β¨ NAME β¨
dma_buf_export β makes a brand new dma_buf and hooks it up to an anon file so it can actually be exported, no cap π It also wires the allocator-specific data and ops onto the buffer, and gives you a name string for the exporter which is lowkey super useful when you're debugging at 3am π
πΈ SYNOPSIS πΈ
struct dma_buf * dma_buf_export (const struct dma_buf_export_info
*exp_info );
π ARGUMENTS π
exp_info[in] β this holds literally all the export-related info that the exporter hands over. peek atstruct dma_buf_export_infofor the deets, iykyk π
π¦ DESCRIPTION π¦
On success it returns a freshly created struct dma_buf object β and that object is wrapping the private data and operations you supplied for struct dma_buf_ops β¨ it's giving main character energy fr.
If the ops are missing, or if allocating the struct dma_buf fails, it returns a negative error π so like, check your return value bestie.
For most cases, the easiest way to createexp_infois through theDEFINE_DMA_BUF_EXPORT_INFOmacro β genuinely the move, obsessed π§
π SEE ALSO π
Kernel file ./drivers/dma-buf/dma-buf.c β and the whole friend group:
dma_buf_iter_begin(9)dma_buf_iter_next(9)- implicit fence polling(9)
dma_buf_set_name(9)- dma buf device access(9)
dma_buf_fd(9)dma_buf_fd_install(9)dma_buf_get(9)dma_buf_put(9)- locking convention(9)
dma_buf_dynamic_attach(9)dma_buf_attach(9)dma_buf_detach(9)dma_buf_pin(9)dma_buf_unpin(9)dma_buf_map_attachment(9)dma_buf_map_attachment_unlocked(9)dma_buf_unmap_attachment(9)dma_buf_unmap_attachment_unlocked(9)dma_buf_attach_revocable(9)dma_buf_invalidate_mappings(9)- cpu access(9)
dma_buf_begin_cpu_access(9)dma_buf_end_cpu_access(9)dma_buf_mmap(9)dma_buf_vmap(9)dma_buf_vmap_unlocked(9)dma_buf_vunmap(9)dma_buf_vunmap_unlocked(9)
π that's the whole page bestie, go export some buffers slay
shoutout to ./drivers/dma-buf for hosting this icon, dated October 2026 β periodt, see u in the next manpage πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms