drm_prime_sg...a_addr_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_prime_sg_to_dma_addr_array πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this one's a kernel function page, and it's lowkey a little workhorse β€” it takes your scatter-gather table and turns it into a dma addr array. no cap, that's the whole vibe. let's get into it 🫢


🌸 NAME 🌸

drm_prime_sg_to_dma_addr_array β€” convert an sg table into a dma addr array

like... it literally does what it says on the tin πŸ’–

✨ SYNOPSIS ✨

int drm_prime_sg_to_dma_addr_array (struct sg_table *sgt , dma_addr_t
*addrs , int max_entries );

that's the whole signature, keep it exactly like that, no editing bestie πŸ™ˆ

πŸŽ€ ARGUMENTS πŸŽ€

  • sgt β€” the scatter-gather table we're converting. this is the thing you're pulling pages/addresses out of πŸ¦‹
  • addrs β€” the array where the dma bus address of each page gets stored. it's the destination, the main character of storage here πŸ‘‘
  • max_entries β€” the size of both the passed-in arrays. yes, both. it's doing double duty, iconic πŸ’…

πŸ’– DESCRIPTION πŸ’–

So here's the tea: this function exports an sg table into an array of addresses. that's it, that's the job πŸ“

And drivers should use this in their drm_driver.gem_prime_import_sg_table implementation. fr fr, that's the intended spot for it β€” don't just sprinkle it around like glitter, put it where it belongs ✨

πŸ¦‹ SEE ALSO πŸ¦‹

like, that's the whole friend group right there β€” go read them too, iykyk πŸ’œ


ok and that's a wrap on this one 🌈 every single cross-reference survived the vibe check, so go be a main character in drm_prime.c 🧚

sign-off time, bestie: this page lives under ./drivers/gpu/drm, and it's dated October 2026 πŸŽ€ periodt.

πŸ“¦ where this page comes from