i915_gem_ob..._cache_level(9)
π 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 π₯
- Kernel file
./drivers/gpu/drm/i915/gem/i915_gem_domain.c i915_gem_object_set_to_wc_domain(9)i915_gem_object_set_to_gtt_domain(9)i915_gem_object_set_to_cpu_domain(9)i915_gem_set_domain_ioctl(9)
π 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
- 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