i915_ttm_resource_get_st(9)
π i915_ttm_resource_get_st β the kernel API manual, but make it make sense π
okay so bestie, welcome to the i915_ttm_resource_get_st(9) page π this is the kernel API manual, i915 flavour, and we're gonna get you fluent in it in like, one scroll fr fr.
β¨ NAME β¨
i915_ttm_resource_get_st β grab a refcounted sg-table that points at the resource memory π
that's it, that's the whole job.
πΈ SYNOPSIS πΈ
struct i915_refct_sgt * i915_ttm_resource_get_st (struct
drm_i915_gem_object *obj , struct ttm_resource *res );
look at that signature. iconic. two args, one very cute return type π¦
π ARGUMENTS π
objβ the GEM object, and it's the one doing the sg-table caching β¨ it's the main character here, lowkeyresβ thestruct ttm_resourceyou're asking an sg-table for. like, that specific resource. no substitutions π
π DESCRIPTION π
so what does this actually do? it returns a refcounted sg-table representing the memory that res points to π«Ά that's the vibe.
now here's the spicy part πΆοΈ if res happens to be the object's current resource, it may also cache the sg_table on the object itself, or it might go poke at an sg-table that's already been cached. efficient queen behavior, honestly.
β οΈ heads up bestie: that refcounted sg-table needs to be put when it's no longer in use. do not forget. it's giving "return the library book" energy, except the book is memory π
β RETURN β
you get a valid pointer to a struct i915_refct_sgt, or β plot twist π β an error pointer on failure. handle it, don't ignore it, we've all been there.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/i915/gem/i915_gem_ttm.c struct i915_ttm_tt(9)i915_ttm_sys_placement(9)i915_ttm_free_cached_io_rsgt(9)i915_ttm_purge(9)i915_ttm_resource_mappable(9)i915_ttm_driver(9)- Migration vs eviction(9)
i915_ttm_adjust_lru(9)
and that's the page!! π§ lived in ./drivers/gpu/drm/i915/gem, dated October 2026, kernel API manual, i915_ttm_resource_get_st(9) β slay, go read the source, mwah ππ
π¦ 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