dma_buf_end_cpu_access(9)
π dma_buf_end_cpu_access(9) β the Kernel API Manual glow-up β¨
okay so bestie, we're in the Kernel API Manual today and this page is all about the closing move of a CPU access arc. she's the sequel, the cooldown, the "ok we're done here" text. let's get into it π«Ά
πΈ NAME πΈ
dma_buf_end_cpu_access β the function you must call after you've been accessing a dma_buf from the cpu in the kernel context. she calls end_cpu_access so the exporter can do its own little exporter-specific actions π
and a very important vibe check: coherency is only guaranteed in the specified range, for the specified access direction. no cap. don't go thinking you get coherency everywhere for free π
β SYNOPSIS β
int dma_buf_end_cpu_access (struct dma_buf *dmabuf , enum
dma_data_direction direction );
look at her. iconic signature. returns an int like the main character she is π
π ARGUMENTS π
dmabuf[in]β the buffer you're completing cpu access for πdirection[in]β the direction of access π
two args, both [in], both important, periodt.
π¦ DESCRIPTION π¦
so this is literally the terminator of the pair β it ends the CPU access that you started with dma_buf_begin_cpu_access. think of it as closing the tab, logging out, saying bye to the group chat π
she can return negative error values, and she returns 0 on success β¨
lowkey do not ignore a negative return here bestie, that's the function telling you something went sideways π
π SEE ALSO π
the kernel file lives at ./drivers/dma-buf/dma-buf.c, and here's the whole friend group β every single one of them, no skips:
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_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_mmap(9)dma_buf_vmap(9)dma_buf_vmap_unlocked(9)dma_buf_vunmap(9)dma_buf_vunmap_unlocked(9)
and that's the whole page, bestie π§π this one's out of ./drivers/dma-buf, dated October 2026, and yes she signed off as dma_buf_end_cpu_access(9) β main character energy from top to bottom, as she should π
β¨
π¦ 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