i915_rsgt_from_mm_node(9)
π i915_rsgt_from_mm_node(9) β like, the kernel API manual bestie π
okay so welcome to the i915_rsgt_from_mm_node page, part of the Kernel API Manual, and honestly? this one's a little baddie. it takes a struct drm_mm_node and gives you back a refcounted sg_table, which is giving "glow-up machine" energy β¨
πΈ NAME πΈ
i915_rsgt_from_mm_node β create a refcounted sg_table from a struct drm_mm_node π«
π¦ SYNOPSIS π¦
struct i915_refct_sgt * i915_rsgt_from_mm_node (const struct drm_mm_node
*node , u64 region_start , u32 page_alignment );
like yes bestie that's the whole signature, no notes π
β¨ ARGUMENTS β¨
nodeβ thestruct drm_mm_node. that's literally it, that's the whole vibe π«Άregion_startβ an offset you add to the dma addresses of the sg list. think of it as a little head start, a glow-up displacement if you will πpage_alignmentβ the required page alignment for each sg entry. and bestie, it has to be a power of two β no cap, that's non-negotiable β οΈ
π₯ DESCRIPTION π₯
so what it actually does: it creates a struct sg_table, initializing it from a struct drm_mm_node π§ and it's out here taking a maximum segment length into account too, splitting into segments if necessary. like it's doing the most and honestly? it ate πβ¨
π RETURN π
- on success: a pointer to a kmalloced
struct i915_refct_sgtπ slay - on failure: a negative error code cast to an error pointer β so yeah, check that
IS_ERR()bestie, don't just raw-dog the pointer ππ
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/i915/i915_scatterlist.cβ go read it, iykyk π i915_refct_sgt_init(9)i915_rsgt_from_buddy_resource(9)
lowkey important: no invented behaviour here, everything above is fr fr straight from the page. if you need the actual file, it's in ./drivers/gpu/drm/i915 π
and that's the whole thing bestie β this page lives in ./drivers/gpu/drm/i915 and it's dated October 2026, so yeah, she's from the future and she's iconic for it ππ
π¦β
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms