drm_gem_map_dma_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 πŸ”₯


that’s it, bestie β€” source/version: ./drivers/gpu/drm, date: October 2026. slay πŸ’–

πŸ“¦ where this page comes from