intel_regio...urce_to_rsgt(9)
π 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 giving1, 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
mallocedsg_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:
- TTM support structure(9)
intel_region_ttm_device_init(9)intel_region_ttm_device_fini(9)intel_region_ttm_init(9)intel_region_ttm_fini(9)intel_region_ttm_resource_alloc(9)intel_region_ttm_resource_free(9)
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
- 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