drm_gem_unmap_dma_buf(9)
π drm_gem_unmap_dma_buf β like the kernel API manual, but make it make sense
okay so bestie, gather round, because we're talking about drm_gem_unmap_dma_buf(9) today and honestly? she's a supporting character with main character energy. this is the kernel API manual page for her, and yes we're reading the whole thing, no skipping π
β¨ NAME β¨
drm_gem_unmap_dma_buf β the unmap_dma_buf implementation for GEM. that's it, that's the tweet. she unmaps. she's GEM's girl. periodt π
πΈ SYNOPSIS πΈ
void drm_gem_unmap_dma_buf (struct dma_buf_attachment *attach , struct
sg_table *sgt , enum dma_data_direction dir );
literally just three little arguments and a whole lot of "please clean up after yourself" energy. no return value, because she's not here to give you answers, she's here to unmap. π¦
π§ ARGUMENTS π§
attachβ the attachment you're unmapping the buffer from. think of it as the situationship you're officially closing out πsgtβ the scatterlist info of the buffer that's getting unmapped. the actual memory gossip, in list form β¨dirβ the direction of the DMA transfer. yes it matters, no you cannot skip it π
π₯ DESCRIPTION π₯
lowkey the whole point: this function can be used as the dma_buf_ops.unmap_dma_buf callback. that's the vibe. she slots right in, does her thing, and the kernel is obsessed with her for it. no cap π«Ά
ngl bestie, she doesn't come with a novel of a description β she's a callback, not a saga. the whole job is be the dma_buf_ops.unmap_dma_buf callback, and she ate. π
β SEE ALSO β
okay this list is LONG, so buckle up, we're going through every single one because i would never do you dirty like that π
- the Kernel file
./drivers/gpu/drm/drm_prime.coverview and lifetime rules(9) β read this before you touch anything, i'm so serious π drm_gem_dmabuf_export(9)drm_gem_dmabuf_release(9)drm_gem_prime_fd_to_handle(9)drm_gem_prime_handle_to_dmabuf(9)drm_gem_prime_handle_to_fd(9)PRIME Helpers(9)drm_gem_map_attach(9)drm_gem_map_detach(9)drm_gem_map_dma_buf(9)drm_gem_dmabuf_vmap(9)drm_gem_dmabuf_vunmap(9)drm_gem_prime_mmap(9)drm_gem_dmabuf_mmap(9)drm_prime_pages_to_sg(9)drm_prime_get_contiguous_size(9)drm_gem_prime_export(9)drm_gem_is_prime_exported_dma_buf(9)drm_gem_prime_import_dev(9)drm_gem_prime_import(9)drm_prime_sg_to_page_array(9)drm_prime_sg_to_dma_addr_array(9)drm_prime_gem_destroy(9)
that's the whole squad. she's the social butterfly of drm_prime.c, truly π¦π
and that's the page, bestie! this iconic little entry comes to you from ./drivers/gpu/drm and is dated October 2026 β so when you cite your sources, you cite drm_gem_unmap_dma_buf(9), and you cite it with your whole chest πβ¨π
π¦ 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