vmw_surface_inc_loc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vmw_surface_inc_loc(9) β€” like, the kernel API manual page, bestie πŸŽ€

okay so this is a page from the Kernel API Manual and honestly? it's a little one but it's important, so let's get into it ✨


🌸 NAME 🌸

vmw_surface_inc_loc β€” clamp-increment a surface location by one block size in each dimension. iconic behaviour, no cap πŸ’–


✨ SYNOPSIS ✨

void vmw_surface_inc_loc (const struct vmw_surface_cache *cache , struct
       vmw_surface_loc *loc );

like, that's the whole signature, she's compact 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cache β€” literally says -- undescribed -- in the original so that's all we get, bestie 😭 the docs just did not show up for this one
  • loc β€” a pointer to a struct vmw_surface_loc that's gonna get incremented πŸ’…

🌈 DESCRIPTION 🌈

okay so here's the vibe: when you compute the size of a range like size = end - start, the range does not include the end element. that's just how it is, fr fr.

BUT. a location that represents the last byte of a touched region in the backing store is included in the range β€” lowkey a whole different rule, right? 😭

so this function takes a location like that and modifies it to match the end definition given as start + size, which is the one used in a SVGA3dBox. slay, consistency ✨


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/gpu/drm/vmwgfx/vmw_surface_cache.h β€” yes, the whole file, go read it πŸ“

then the whole squad of related pages:

like, the whole friend group showed up to the function call πŸ’€πŸ’–


ngl if you're here you're probably doing something very specific with vmwgfx and backing stores. respect, main character energy πŸ‘‘

that's the page!! she's short but she ate 🌟 big kiss from ./drivers/gpu/drm/vmwgfx, dated October 2026 β€” mwah, see you in the next one bestie πŸ’‹πŸŽ€

πŸ“¦ where this page comes from