v4l2_subdev_lock_states(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… v4l2_subdev_lock_states(9) Kernel API Manual ✨

πŸŽ€ NAME πŸŽ€

v4l2_subdev_lock_states β€” lock two sub-device states, no cap πŸ’…

✨ SYNOPSIS ✨

okay bestie, here’s the signature exactly as it is:

void v4l2_subdev_lock_states (struct v4l2_subdev_state *state1 , struct
       v4l2_subdev_state *state2 );

🫢 ARGUMENTS 🫢

  • state1 β€” one subdevice state. literally one of the two.
  • state2 β€” the other subdevice state. yep, that one too.

πŸ’– DESCRIPTION πŸ’–

Okay so v4l2_subdev_lock_states locks the state of two sub-devices. That’s the whole vibe. πŸ”₯

⚠️ bestie, after use the states must be unlocked with v4l2_subdev_unlock_states. Do not ghost them πŸ™ˆ.

Now here’s the important tea: this differs from calling v4l2_subdev_lock_state on both states so that if the states share the same lock, the lock is acquired only once (so no deadlock occurs). The way that works is iconic and also very much on purpose πŸ‘‘

The caller is responsible for ensuring the locks will always be acquired in the same order. That part is on you, bestie β€” no cap.

πŸ”— SEE ALSO πŸ”—

Kernel file ./include/media/v4l2-subdev.h struct β€” yes, that’s the spot.


okay that’s the whole page, bestie 🫢 β€” sending love from the ./include/media corner, dated October 2026, and this has been your girl v4l2_subdev_lock_states(9) signing off πŸ’–

πŸ“¦ where this page comes from