vmw_crtc_state_and_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vmw_crtc_state_and_lock ✨

okay bestie, welcome to the vmw_crtc_state_and_lock(9) page, from the Kernel API Manual πŸŽ€ β€” this is the one that hands you a crtc state and makes sure the crtc mutex is locked, so you can go do your little atomic commit thing without worrying the lock situation got left on read πŸ’€


🌸 SYNOPSIS 🌸

struct drm_crtc_state * vmw_crtc_state_and_lock (struct
drm_atomic_commit *state , struct drm_crtc *crtc );

like, look at that signature. it's giving "I return a pointer and I also handle locking for you" energy 🫢


✨ ARGUMENTS ✨

  • state β€” the atomic state pointer that's holding the new atomic state. that's your group chat with all the fresh updates in it πŸ’¬
  • crtc β€” the crtc. yes. that one. πŸ–₯️

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this function returns the new crtc state if it's part of the state update. and if it's not? it just returns the current crtc state instead β€” no drama, no cap πŸ’…

and the main-character move: it also makes sure the crtc mutex is locked. that's it, that's the whole job. locked and loaded πŸ”’βœ¨


πŸ”₯ RETURN πŸ”₯

you get a valid crtc state pointer, or NULL. it may also return a pointer error πŸ™ˆ β€” in particular -EDEADLK if the locking needs to be rerun. so yeah, watch for that one, she's a little chaotic 😭

fr fr, -EDEADLK is not a failure, it's an "okay try the lock again" β€” don't panic, just rerun πŸƒβ€β™€οΈπŸ’¨

⭐ SEE ALSO ⭐

the kernel file this lives in, iconic location:

./drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

and now the whole friend group πŸ‘‘ (yes, all of them, I'm not skipping a single one):


that's the whole page, bestie, you ate that πŸ“πŸ’œ

later babes β€” this one comes from ./drivers/gpu/drm/vmwgfx, dated October 2026, and it's the vmw_crtc_state_and_lock(9) page every single time πŸ’–βœ¨

πŸ“¦ where this page comes from