drm_gem_map_dma_buf(9)
okay bestie, welcome to the Kernel API Manual β¨ this page is for drm_gem_map_dma_buf(9) β the map_dma_buf implementation for GEM, and sheβs literally here to handle the scatterlist situation. π
πΈ NAME πΈ
drm_gem_map_dma_buf β the map_dma_buf implementation for GEM. thatβs the whole name and the whole vibe. π«Ά
β¨ SYNOPSIS β¨
struct sg_table * drm_gem_map_dma_buf (struct dma_buf_attachment *attach
, enum dma_data_direction dir );
π ARGUMENTS π
attachβ the attachment whose scatterlist is to be returned. thatβs the attachment weβre serving back, periodt. πdirβ the direction of DMA transfer. which way the DMA vibes are flowing, bestie. π
π¦ DESCRIPTION π¦
okay so hereβs the tea: the function calls drm_gem_object_funcs.get_sg_table and then maps the scatterlist. literally those two steps. β¨
it can be used as the dma_buf_ops.map_dma_buf callback. and bestie, it should be used together with drm_gem_unmap_dma_buf β no cap, theyβre meant to be a pair. π«Ά
β RETURN β
returns an sg_table containing the scatterlist to be returned; returns ERR_PTR on error. it may return -EINTR if it is interrupted by a signal. π thatβs the full return tea, fr fr.
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/drm_prime.coverview and lifetime rules(9) 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_unmap_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 it, bestie β source/version: ./drivers/gpu/drm, date: October 2026. slay π
π¦ 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