ENUM V4L2_VIDEO_DEVICE_FLAGS(9)
π 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 byvideo_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 whenv4l2_fh_initis 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 inv4l2-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 withv4l2_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:
enum vfl_devnode_type(9)enum vfl_devnode_direction(9)struct v4l2_prio_state(9)v4l2_prio_init(9)v4l2_prio_change(9)v4l2_prio_open(9)v4l2_prio_close(9)v4l2_prio_max(9)v4l2_prio_check(9)struct v4l2_file_operations(9)struct video_device(9)media_entity_to_video_device(9)to_video_device(9)__video_register_device(9)video_register_device(9)video_register_device_no_warn(9)video_unregister_device(9)video_device_alloc(9)video_device_release(9)video_device_release_empty(9)v4l2_disable_ioctl(9)video_get_drvdata(9)video_set_drvdata(9)video_devdata(9)video_drvdata(9)video_device_node_name(9)video_is_registered(9)v4l2_debugfs_root(9)video_device_pipeline_start(9)__video_device_pipeline_start(9)video_device_pipeline_stop(9)__video_device_pipeline_stop(9)video_device_pipeline_alloc_start(9)video_device_pipeline(9)
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
- 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