ENUM V4L2_VIDEO_DEVICE_FLAGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum v4l2_video_device_flags(9) β€” Kernel API Manual, bestie edition

okay so you found the page for enum v4l2_video_device_flags, the little enum that holds the Flags used by &struct video_device. it's a small enum but every single member is lowkey doing main character work. let's get into it πŸŽ€


✨ SYNOPSIS ✨

like, here's the whole vibe, verbatim:

enum v4l2_video_device_flags {
    V4L2_FL_REGISTERED ,
    V4L2_FL_USES_V4L2_FH ,
    V4L2_FL_QUIRK_INVERTED_CROP ,
    V4L2_FL_SUBDEV_RO_DEVNODE

};

four constants, no cap. and now the tea on each one πŸ‘‡


🌸 CONSTANTS 🌸

  • V4L2_FL_REGISTERED β€” this one indicates that a struct video_device is registered. drivers can clear this flag if they want to block all future device access (iconic gatekeeping behavior tbh πŸ’…). and fun fact: it is cleared by video_unregister_device.
  • V4L2_FL_USES_V4L2_FH β€” this flag indicates that file->private_data points to struct v4l2_fh. it's set by the core when v4l2_fh_init is called. and listen β€” all drivers must use it. not optional, not a suggestion, it's giving mandatory 🫢.
  • V4L2_FL_QUIRK_INVERTED_CROP β€” okay this one's a whole saga 😭. some old M2M drivers use g/s_crop/cropcap incorrectly: crop and compose are swapped. so if this flag is set, then the selection targets are swapped in the g/s_crop/cropcap functions in v4l2-ioctl.c. that lets those drivers correctly implement the selection API, but the old crop API will still work as expected in order to preserve backwards compatibility. it's a legacy-support slay but...
⚠️ Never set this flag for new drivers. fr fr. do not. this is ancient quirk territory, not inspo πŸ’€
  • V4L2_FL_SUBDEV_RO_DEVNODE β€” indicates that the video device node is registered in read-only mode. and this flag only applies to device nodes registered for sub-devices, jsyk. it's set by the core when the sub-devices device nodes are registered with v4l2_device_register_ro_subdev_nodes, and it's used by the sub-device ioctl handler to restrict access to some ioctl calls. protective queen behavior honestly πŸ‘‘.

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group shows up here, bestie. kernel file ./include/media/v4l2-dev.h plus this absolutely stacked list:

that's the whole roster, no skips πŸ’–


✨ that's the page!! ✨ this little number lives in ./include/media and it's dated October 2026 β€” go off, future-dated kernel docs 🌈. mwah, study hard, and remember: don't set the quirk flag. periodt. πŸ’œ

πŸ“¦ where this page comes from