drm_gem_shmem_get_sg_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_gem_shmem_get_sg_table(9) πŸ’–

okay bestie, this is the Kernel API Manual page for drm_gem_shmem_get_sg_table(9) β€” and it's giving scatter/gather table for a shmem GEM object. We're gonna go through every detail, no cap. ✨


🌸 NAME 🌸

drm_gem_shmem_get_sg_table β€” provide a scatter/gather table of pinned pages for a shmem GEM object. That's the whole name, bestie. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

the signature is literally this:

struct sg_table * drm_gem_shmem_get_sg_table (struct
       drm_gem_shmem_object *shmem );

πŸŽ€ ARGUMENTS πŸŽ€

  • shmem β€” a shmem GEM object. That's the one and only argument, main character energy. πŸ‘‘

🌸 DESCRIPTION 🌸

So what does it do? This function exports a scatter/gather table that's suitable for PRIME usage, and it does that by calling the standard DMA mapping API. Yes bestie, PRIME usage + standard DMA mapping API β€” that's the vibe. πŸ”₯

But lowkey important: drivers who need to acquire a scatter/gather table for objects need to call drm_gem_shmem_get_pages_sgt instead. Noted, bestie β€” different function for that job. πŸ’…


πŸ’… RETURN πŸ’…

On success, you get a pointer to the scatter/gather table of pinned pages. On failure, you get an error pointer. That's the return vibe check, fr fr. 😭


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_gem_shmem_helper.c and overview(9), plus these iconique entries:


okay that's the whole page, bestie! The source/version is ./drivers/gpu/drm, the date is October 2026, and the manual is the Kernel API Manual. go off, scatter/gather table icon πŸ’…βœ¨

πŸ“¦ where this page comes from