dma_buf_iter_begin(9)
β¨ dma_buf_iter_begin(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for dma_buf_iter_begin β and yes, this is a function name, not a weird TikTok sound π
πΈ NAME πΈ
dma_buf_iter_begin β your official start-the-tour button for the global list of all DMA buffers π
π¦ SYNOPSIS π¦
struct dma_buf * dma_buf_iter_begin (void );
π ARGUMENTS π
voidβ literally no arguments. nothing. zero. she takes nothing and she serves π«Ά
β¨ DESCRIPTION β¨
Okay so here's the vibe: this function hands you back the first buffer in the global list of DMA-bufs that's not in the process of being destroyed. Like, she's scanning the whole list and she skips past the ones that are mid-glow-down β¨π«
When she finds one, she increments that buffer's reference count to prevent buffer destruction β protecting her new fave from getting deleted while you're still looking at it ππ
Important, no cap: callers must release the reference. You do that either by continuing iteration with dma_buf_iter_next, or with dma_buf_put. don't just walk away and leave the refcount hanging, that's rude and also a bug π
π₯ RETURN π₯
- First buffer from global list, with refcount elevated π (she's protected now, bestie)
NULLif no active buffers are present π (empty list, nothing to see, go home)
π SEE ALSO π
Kernel file ./drivers/dma-buf/dma-buf.c β plus the whole friend group, and we love them all:
dma_buf_iter_next(9)implicit fence polling(9)dma_buf_set_name(9)dma buf device access(9)dma_buf_export(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)
okay that's the whole page, go be iconic with your iterator π§π«
sign-off time: this one lives in ./drivers/dma-buf, dated October 2026, and it's the dma_buf_iter_begin(9) page β mwah ππ
π¦ 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