drm_gem_shm...ort_sg_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gem_shmem_prime_import_sg_table(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this one's a (9) page, which is kernel-dev territory, so grab a lil snack and let's go πŸ“


✨ NAME ✨

drm_gem_shmem_prime_import_sg_table β€” literally the function that produces a shmem GEM object out of another driver's scatter/gather table of pinned pages πŸŽ€


🌸 SYNOPSIS 🌸

struct drm_gem_object * drm_gem_shmem_prime_import_sg_table (struct
drm_device *dev , struct dma_buf_attachment *attach , struct sg_table
*sgt );

no cap, that's the whole signature πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the Device you're importing into, periodt.
  • attach β€” the DMA-BUF attachment, iykyk.
  • sgt β€” the scatter/gather table of pinned pages, the main character of this whole operation πŸ‘‘

πŸŽ€ DESCRIPTION πŸŽ€

so this function imports a scatter/gather table that some other driver exported via DMA-BUF. the way it works is: drivers that use the shmem helpers should set this bad boy as their drm_driver.gem_prime_import_sg_table callback. that's it, that's the vibe check βœ…


⭐ RETURN ⭐

you get back a pointer to a newly created GEM object πŸ’« β€” or, if things go sideways, an ERR_PTR-encoded negative error code on failure 😭 (ngl, always check for that one, bestie).


🌈 SEE ALSO 🌈

go read them all, fr fr πŸ“šβœ¨


this page lives at ./drivers/gpu/drm in the source tree, and it's dated October 2026. mwah πŸ’‹

okay that's the whole page, you ate that 🫢 from your fave drm_gem_shm...ort_sg_table(9) girlie β€” slay, bye! πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from