i915_ttm_resource_get_st(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, lowkey
  • res β€” the struct ttm_resource you'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 πŸ’œ


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