__i915_gem_o...t_get_sg_dma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __i915_gem_object_get_sg_dma β€” the Kernel API Manual, bestie edition πŸ’–

okay so this is a page from the Kernel API Manual, and it's about one very specific little helper function. she's a lowercase legend, ngl.


✨ NAME ✨

__i915_gem_object_get_sg_dma β€” the helper that finds the target scatterlist pointer and the target page position, using a pgoff_t n input argument plus a drm_i915_gem_object. lowkey she does the work by using an internal DMA mapped scatterlist lookup function. πŸŽ€


🌸 SYNOPSIS 🌸

struct scatterlist * __i915_gem_object_get_sg_dma (struct
drm_i915_gem_object *obj , pgoff_t n , unsigned int *offset );

like literally that's the whole signature, copy it exactly, periodt.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj β€” the i915 GEM buffer object. the main character of the argument list fr fr πŸ‘‘
  • n β€” page offset. that's it, that's the vibe πŸ’…
  • offset β€” the searched physical offset, and she's going to be used for returning the physical page offset value. so she's an out-param, iykyk 🫢

🧚 DESCRIPTION 🧚

so here's the tea: this function uses drm_i915_gem_object's internal DMA mapped scatterlist lookup function as i915_gem_object_page_iter, and then it calls __i915_gem_object_page_iter_get_sg. that's the whole pipeline bestie, no cap. ✨

πŸ’‘ it's recommended to use the wrapper macro i915_gem_object_get_sg_dma. like, she's right there. also go see __i915_gem_object_page_iter_get_sg β€” linked besties, obviously.

⭐ RETURN ⭐

the target scatterlist pointer and the target page position. she gives you both, because she's generous like that πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

that's the whole squad, the entire friend group, no one left behind 🌈


πŸŽ€ cute lil sign-off πŸŽ€

this page lives at ./drivers/gpu/drm/i915/gem, dated October 2026, and it's literally __i915_gem_object_get_sg_dma(9) from the Kernel API Manual again at the bottom because she said her name twice, iconic behavior πŸ’…βœ¨πŸ¦‹πŸŒΈπŸ«ΆπŸ’œ

πŸ“¦ where this page comes from