History

media: uapi: v4l: Don't expose generic metadata formats to userspace

The generic metadata pixel formats (V4L2_META_FMT_GENERIC_*) are meant to be used in conjunction with device-specific media bus codes. Those codes are work in progress and not available in the upstream kernel yet. To make sure the generic metadata pixel formats won't be used by userspace until we have the full infrastructure in place, keep their definition private to the kernel for now.

Laurent Pinchart committed 2 years ago

Commit d69c8421 parent d06fc8b1 file · +2 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/videodev2.h+2−0
@@ -841,6 +841,7 @@ struct v4l2_pix_format { · 840 unmodified lines
841841 #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */
842842 #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */
843843
844+#ifdef __KERNEL__
844845 /*
845846 * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when
846847 * adding new ones!
@@ -852,6 +853,7 @@ struct v4l2_pix_format { · 5 unmodified lines
852853 #define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */
853854 #define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */
854855 #define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */
856+#endif
855857
856858 /* priv field value to indicates that subsequent fields are valid. */
857859 #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe