intel_regio...urce_to_rsgt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_region_ttm_resource_to_rsgt(9) β€” the glow-up ✨

okay bestie, welcome to the Kernel API Manual, section 9, and today's main character is intel_region_ttm_resource_to_rsgt (the header up top lowkey truncates it to intel_regio...urce_to_rsgt(9) because even manpage titles need a little mystery πŸ’…). she converts stuff. she refcounts stuff. she slays.


🌸 NAME 🌸

intel_region_ttm_resource_to_rsgt β€” converts an opaque TTM resource manager resource into a refcounted sg_table. that's it, that's the whole job, and she does it flawlessly fr fr 🫢


✨ SYNOPSIS ✨

struct i915_refct_sgt * intel_region_ttm_resource_to_rsgt (struct
intel_memory_region *mem , struct ttm_resource *res , u32 page_alignment
);

like, three args, one return, zero drama (well, there's error-pointer drama, but we'll get to that πŸ™ˆ).


πŸŽ€ ARGUMENTS πŸŽ€

  • mem β€” the memory region. that's her. that's the vibe. the whole region, no cap.
  • res β€” the resource manager resource, and listen, you have to have gotten it from the TTM resource manager. that's the source, that's the lore πŸ”₯
  • page_alignment β€” the page alignment you require for each sg entry. and it has to be a power of two, bestie. powers of two only. it's giving 1, 2, 4, 8, 16, 32... and nothing in between ⭐

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the situation. the gem backends typically use sg-tables for doing operations on the underlying io_memory. iconic behaviour, honestly.

so this function exists to give those backends a way to translate the nodes they get handed from TTM into sg-tables. that's the whole point. TTM node in, sg-table out, everyone eats πŸ“


πŸ”₯ RETURN πŸ”₯

  • success β€” a malloced sg_table πŸ’– (yes, she's allocated! someone's gotta free her!)
  • failure β€” an error pointer. check it. always check it. don't be that girl who dereferences an error pointer 😭

πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/gpu/drm/i915/intel_region_ttm.c, plus the whole friend group:


ngl the whole intel_region_ttm_* family is a package deal. know them. love them. call them by their section-9 names πŸ‘‘

and that's the page!! sourced straight from ./drivers/gpu/drm/i915, dated October 2026, and yes she's still rocking that truncated intel_regio...urce_to_rsgt(9) header like a little signature move πŸ˜ŒπŸ’… periodt.

πŸ“¦ where this page comes from