i915_gem_ob..._cache_level(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i915_gem_ob..._cache_level(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes, the Kernel API Manual, that's the whole vibe of this page. Today we're looking at i915_gem_ob..._cache_level(9), which is genuinely one of those names that got truncated by the terminal and we're all just living with it 🫢


🌸 NAME 🌸

i915_gem_object_set_cache_level β€” literally changes the cache-level of an object across all VMA. that's it, that's the function, slay πŸ’…


✨ SYNOPSIS ✨

int i915_gem_object_set_cache_level (struct drm_i915_gem_object *obj ,
enum i915_cache_level cache_level );

πŸŽ€ ARGUMENTS πŸŽ€

  • obj β€” the object we're acting on. our main character, honestly πŸ‘‘
  • cache_level β€” the new cache level we're setting for the object. the glow-up we're giving it ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ“ β€” after this function returns, the object is gonna be sitting in the new cache-level across all GTT, and the contents of the backing storage will be coherent with respect to that new cache-level. no cap, that's the whole promise πŸ’–

and because we want the backing storage to stay coherent for all users, we only allow a single cache level to be set globally on the object, and we prevent it from being changed whilst the hardware is reading from the object. like, the hardware has the object open, you do not get to redecorate mid-read, that's so rude 😭

that means: if the object is currently on the scanout, it gets set to uncached (or equivalent display cache coherency), and all non-MOCS GPU access also goes uncached β€” so that all direct access to the scanout remains coherent. it's giving "everyone has to be on the same page or nobody gets anything" and honestly? iconic 🌈


πŸ”₯ SEE ALSO πŸ”₯


πŸ’œ cute little sign-off πŸ’œ

this page came to you from ./drivers/gpu/drm/i915/gem, dated October 2026, and it's the i915_gem_ob..._cache_level(9) page from the Kernel API Manual. go forth and cache responsibly bestie, mwah πŸ§šπŸ’–

πŸ“¦ where this page comes from