History

Merge tag 'media/v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab: - New V4L2 ioctl VIDIOC_REMOVE_BUFS - experimental support for using generic metaformats on V4L2 core - New drivers: Intel IPU6 controller driver, Broadcom BCM283x/BCM271x - More cleanups at atomisp driver - Usual bunch of driver cleanups, improvements and fixes * tag 'media/v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (328 commits) media: bcm2835-unicam: Depend on COMMON_CLK Revert "media: v4l2-ctrls: show all owned controls in log_status" media: ov2740: Ensure proper reset sequence on probe() media: intel/ipu6: Don't print user-triggerable errors to kernel log media: bcm2835-unicam: Fix driver path in MAINTAINERS media: bcm2835-unicam: Fix a NULL vs IS_ERR() check media: bcm2835-unicam: Do not print error when irq not found media: bcm2835-unicam: Do not replace IRQ retcode during probe media: bcm2835-unicam: Convert to platform remove callback returning void media: media: intel/ipu6: Fix spelling mistake "remappinp" -> "remapping" media: intel/ipu6: explicitly include vmalloc.h media: cec.h: Fix kerneldoc media: uvcvideo: Refactor iterators media: v4l: async: refactor v4l2_async_create_ancillary_links media: intel/ipu6: Don't re-allocate memory for firmware media: dvb-frontends: tda10048: Fix integer overflow media: tc358746: Use the correct div_ function media: i2c: st-mipid02: Use the correct div function media: tegra-vde: Refactor timeout handling media: stk1160: Use min macro ...

Linus Torvalds committed 2 years ago

Commit 6fd600d2 parents 972a254 8771b7f307 files · +22908 −5428Browse files

Showing the changes to include/uapi (5 of 307 files). Show all

Unified · Split

5 files
  1. include/uapi/linux/dvb/frontend.h +1 −1
  2. include/uapi/linux/media-bus-format.h +9 −0
  3. include/uapi/linux/v4l2-mediabus.h +12 −6
  4. include/uapi/linux/v4l2-subdev.h +11 −3
  5. include/uapi/linux/videodev2.h +44 −1
include/uapi/linux/dvb/frontend.h+1−1
@@ -854,7 +854,7 @@ struct dtv_stats { · 853 unmodified lines
854854 union {
855855 __u64 uvalue; /* for counters and relative scales */
856856 __s64 svalue; /* for 0.001 dB measures */
857− };
857+ } __attribute__ ((packed));
858858 } __attribute__ ((packed));
859859
860860
include/uapi/linux/media-bus-format.h+9−0
@@ -174,4 +174,13 @@ · 173 unmodified lines
174174 */
175175 #define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
176176
177+/* Generic line based metadata formats for serial buses. Next is 0x8008. */
178+#define MEDIA_BUS_FMT_META_8 0x8001
179+#define MEDIA_BUS_FMT_META_10 0x8002
180+#define MEDIA_BUS_FMT_META_12 0x8003
181+#define MEDIA_BUS_FMT_META_14 0x8004
182+#define MEDIA_BUS_FMT_META_16 0x8005
183+#define MEDIA_BUS_FMT_META_20 0x8006
184+#define MEDIA_BUS_FMT_META_24 0x8007
185+
177186 #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
include/uapi/linux/v4l2-mediabus.h+12−6
@@ -19,12 +19,18 @@ · 18 unmodified lines
1919 * @width: image width
2020 * @height: image height
2121 * @code: data format code (from enum v4l2_mbus_pixelcode)
22− * @field: used interlacing type (from enum v4l2_field)
23− * @colorspace: colorspace of the data (from enum v4l2_colorspace)
24− * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
25− * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding)
26− * @quantization: quantization of the data (from enum v4l2_quantization)
27− * @xfer_func: transfer function of the data (from enum v4l2_xfer_func)
22+ * @field: used interlacing type (from enum v4l2_field), zero for metadata
23+ * mbus codes
24+ * @colorspace: colorspace of the data (from enum v4l2_colorspace), zero on
25+ * metadata mbus codes
26+ * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding), zero
27+ * for metadata mbus codes
28+ * @hsv_enc: HSV encoding of the data (from enum v4l2_hsv_encoding), zero for
29+ * metadata mbus codes
30+ * @quantization: quantization of the data (from enum v4l2_quantization), zero
31+ * for metadata mbus codes
32+ * @xfer_func: transfer function of the data (from enum v4l2_xfer_func), zero
33+ * for metadata mbus codes
2834 * @flags: flags (V4L2_MBUS_FRAMEFMT_*)
2935 * @reserved: reserved bytes that can be later used
3036 */
include/uapi/linux/v4l2-subdev.h+11−3
@@ -50,6 +50,10 @@ struct v4l2_subdev_format { · 49 unmodified lines
5050 * @rect: pad crop rectangle boundaries
5151 * @stream: stream number, defined in subdev routing
5252 * @reserved: drivers and applications must zero this array
53+ *
54+ * The subdev crop API is an obsolete interface and may be removed in the
55+ * future. It is superseded by the selection API. No new extensions to this
56+ * structure will be accepted.
5357 */
5458 struct v4l2_subdev_crop {
5559 __u32 which;
@@ -224,15 +228,19 @@ struct v4l2_subdev_route { · 168 unmodified lines
224228 * struct v4l2_subdev_routing - Subdev routing information
225229 *
226230 * @which: configuration type (from enum v4l2_subdev_format_whence)
227− * @num_routes: the total number of routes in the routes array
231+ * @len_routes: the length of the routes array, in routes; set by the user, not
232+ * modified by the kernel
228233 * @routes: pointer to the routes array
234+ * @num_routes: the total number of routes, possibly more than fits in the
235+ * routes array
229236 * @reserved: drivers and applications must zero this array
230237 */
231238 struct v4l2_subdev_routing {
232239 __u32 which;
233− __u32 num_routes;
240+ __u32 len_routes;
234241 __u64 routes;
235− __u32 reserved[6];
242+ __u32 num_routes;
243+ __u32 reserved[11];
236244 };
237245
238246 /*
include/uapi/linux/videodev2.h+44−1
@@ -599,6 +599,8 @@ struct v4l2_pix_format { · 598 unmodified lines
599599 #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */
600600 #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */
601601 #define V4L2_PIX_FMT_IPU3_Y10 v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */
602+#define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */
603+#define V4L2_PIX_FMT_Y14P v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */
602604
603605 /* Palette formats */
604606 #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
@@ -839,6 +841,20 @@ struct v4l2_pix_format { · 234 unmodified lines
839841 #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */
840842 #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */
841843
844+#ifdef __KERNEL__
845+/*
846+ * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when
847+ * adding new ones!
848+ */
849+#define V4L2_META_FMT_GENERIC_8 v4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */
850+#define V4L2_META_FMT_GENERIC_CSI2_10 v4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit metadata */
851+#define V4L2_META_FMT_GENERIC_CSI2_12 v4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit metadata */
852+#define V4L2_META_FMT_GENERIC_CSI2_14 v4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit metadata */
853+#define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit metadata */
854+#define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit metadata */
855+#define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit metadata */
856+#endif
857+
842858 /* priv field value to indicates that subsequent fields are valid. */
843859 #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
844860
@@ -869,6 +885,7 @@ struct v4l2_fmtdesc { · 24 unmodified lines
869885 #define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080
870886 #define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC
871887 #define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100
888+#define V4L2_FMT_FLAG_META_LINE_BASED 0x0200
872889
873890 /* Frame Size and frame rate enumeration */
874891 /*
@@ -1036,6 +1053,7 @@ struct v4l2_requestbuffers { · 161 unmodified lines
10361053 #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
10371054 #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)
10381055 #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7)
1056+#define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS (1 << 8)
10391057
10401058 /**
10411059 * struct v4l2_plane - plane info for multi-planar buffers
@@ -1841,7 +1859,7 @@ struct v4l2_ext_control { · 799 unmodified lines
18411859 struct v4l2_ctrl_hdr10_cll_info __user *p_hdr10_cll_info;
18421860 struct v4l2_ctrl_hdr10_mastering_display __user *p_hdr10_mastering_display;
18431861 void __user *ptr;
1844− };
1862+ } __attribute__ ((packed));
18451863 } __attribute__ ((packed));
18461864
18471865 struct v4l2_ext_controls {
@@ -2415,10 +2433,19 @@ struct v4l2_sdr_format { · 567 unmodified lines
24152433 * struct v4l2_meta_format - metadata format definition
24162434 * @dataformat: little endian four character code (fourcc)
24172435 * @buffersize: maximum size in bytes required for data
2436+ * @width: number of data units of data per line (valid for line
2437+ * based formats only, see format documentation)
2438+ * @height: number of lines of data per buffer (valid for line based
2439+ * formats only)
2440+ * @bytesperline: offset between the beginnings of two adjacent lines in
2441+ * bytes (valid for line based formats only)
24182442 */
24192443 struct v4l2_meta_format {
24202444 __u32 dataformat;
24212445 __u32 buffersize;
2446+ __u32 width;
2447+ __u32 height;
2448+ __u32 bytesperline;
24222449 } __attribute__ ((packed));
24232450
24242451 /**
@@ -2624,6 +2651,20 @@ struct v4l2_create_buffers { · 199 unmodified lines
26242651 __u32 reserved[5];
26252652 };
26262653
2654+/**
2655+ * struct v4l2_remove_buffers - VIDIOC_REMOVE_BUFS argument
2656+ * @index: the first buffer to be removed
2657+ * @count: number of buffers to removed
2658+ * @type: enum v4l2_buf_type
2659+ * @reserved: future extensions
2660+ */
2661+struct v4l2_remove_buffers {
2662+ __u32 index;
2663+ __u32 count;
2664+ __u32 type;
2665+ __u32 reserved[13];
2666+};
2667+
26272668 /*
26282669 * I O C T L C O D E S F O R V I D E O D E V I C E S
26292670 *
@@ -2723,6 +2764,8 @@ struct v4l2_create_buffers { · 93 unmodified lines
27232764 #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
27242765
27252766 #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl)
2767+#define VIDIOC_REMOVE_BUFS _IOWR('V', 104, struct v4l2_remove_buffers)
2768+
27262769
27272770 /* Reminder: when adding new ioctls please add support for them to
27282771 drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */