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 ...
Showing the changes to include/uapi (5 of 307 files). Show all
Unified · Split
| @@ -854,7 +854,7 @@ struct dtv_stats { · 853 unmodified lines | ||
| 854 | 854 | union { |
| 855 | 855 | __u64 uvalue; /* for counters and relative scales */ |
| 856 | 856 | __s64 svalue; /* for 0.001 dB measures */ |
| 857 | − }; | |
| 857 | + } __attribute__ ((packed)); | |
| 858 | 858 | } __attribute__ ((packed)); |
| 859 | 859 | |
| 860 | 860 | |
| @@ -174,4 +174,13 @@ · 173 unmodified lines | ||
| 174 | 174 | */ |
| 175 | 175 | #define MEDIA_BUS_FMT_METADATA_FIXED 0x7001 |
| 176 | 176 | |
| 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 | + | |
| 177 | 186 | #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ |
| @@ -19,12 +19,18 @@ · 18 unmodified lines | ||
| 19 | 19 | * @width: image width |
| 20 | 20 | * @height: image height |
| 21 | 21 | * @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 | |
| 28 | 34 | * @flags: flags (V4L2_MBUS_FRAMEFMT_*) |
| 29 | 35 | * @reserved: reserved bytes that can be later used |
| 30 | 36 | */ |
| @@ -50,6 +50,10 @@ struct v4l2_subdev_format { · 49 unmodified lines | ||
| 50 | 50 | * @rect: pad crop rectangle boundaries |
| 51 | 51 | * @stream: stream number, defined in subdev routing |
| 52 | 52 | * @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. | |
| 53 | 57 | */ |
| 54 | 58 | struct v4l2_subdev_crop { |
| 55 | 59 | __u32 which; |
| @@ -224,15 +228,19 @@ struct v4l2_subdev_route { · 168 unmodified lines | ||
| 224 | 228 | * struct v4l2_subdev_routing - Subdev routing information |
| 225 | 229 | * |
| 226 | 230 | * @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 | |
| 228 | 233 | * @routes: pointer to the routes array |
| 234 | + * @num_routes: the total number of routes, possibly more than fits in the | |
| 235 | + * routes array | |
| 229 | 236 | * @reserved: drivers and applications must zero this array |
| 230 | 237 | */ |
| 231 | 238 | struct v4l2_subdev_routing { |
| 232 | 239 | __u32 which; |
| 233 | − __u32 num_routes; | |
| 240 | + __u32 len_routes; | |
| 234 | 241 | __u64 routes; |
| 235 | − __u32 reserved[6]; | |
| 242 | + __u32 num_routes; | |
| 243 | + __u32 reserved[11]; | |
| 236 | 244 | }; |
| 237 | 245 | |
| 238 | 246 | /* |
| @@ -599,6 +599,8 @@ struct v4l2_pix_format { · 598 unmodified lines | ||
| 599 | 599 | #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */ |
| 600 | 600 | #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */ |
| 601 | 601 | #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 */ | |
| 602 | 604 | |
| 603 | 605 | /* Palette formats */ |
| 604 | 606 | #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 | ||
| 839 | 841 | #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ |
| 840 | 842 | #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ |
| 841 | 843 | |
| 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 | + | |
| 842 | 858 | /* priv field value to indicates that subsequent fields are valid. */ |
| 843 | 859 | #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe |
| 844 | 860 | |
| @@ -869,6 +885,7 @@ struct v4l2_fmtdesc { · 24 unmodified lines | ||
| 869 | 885 | #define V4L2_FMT_FLAG_CSC_YCBCR_ENC 0x0080 |
| 870 | 886 | #define V4L2_FMT_FLAG_CSC_HSV_ENC V4L2_FMT_FLAG_CSC_YCBCR_ENC |
| 871 | 887 | #define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100 |
| 888 | +#define V4L2_FMT_FLAG_META_LINE_BASED 0x0200 | |
| 872 | 889 | |
| 873 | 890 | /* Frame Size and frame rate enumeration */ |
| 874 | 891 | /* |
| @@ -1036,6 +1053,7 @@ struct v4l2_requestbuffers { · 161 unmodified lines | ||
| 1036 | 1053 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5) |
| 1037 | 1054 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6) |
| 1038 | 1055 | #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7) |
| 1056 | +#define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS (1 << 8) | |
| 1039 | 1057 | |
| 1040 | 1058 | /** |
| 1041 | 1059 | * struct v4l2_plane - plane info for multi-planar buffers |
| @@ -1841,7 +1859,7 @@ struct v4l2_ext_control { · 799 unmodified lines | ||
| 1841 | 1859 | struct v4l2_ctrl_hdr10_cll_info __user *p_hdr10_cll_info; |
| 1842 | 1860 | struct v4l2_ctrl_hdr10_mastering_display __user *p_hdr10_mastering_display; |
| 1843 | 1861 | void __user *ptr; |
| 1844 | − }; | |
| 1862 | + } __attribute__ ((packed)); | |
| 1845 | 1863 | } __attribute__ ((packed)); |
| 1846 | 1864 | |
| 1847 | 1865 | struct v4l2_ext_controls { |
| @@ -2415,10 +2433,19 @@ struct v4l2_sdr_format { · 567 unmodified lines | ||
| 2415 | 2433 | * struct v4l2_meta_format - metadata format definition |
| 2416 | 2434 | * @dataformat: little endian four character code (fourcc) |
| 2417 | 2435 | * @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) | |
| 2418 | 2442 | */ |
| 2419 | 2443 | struct v4l2_meta_format { |
| 2420 | 2444 | __u32 dataformat; |
| 2421 | 2445 | __u32 buffersize; |
| 2446 | + __u32 width; | |
| 2447 | + __u32 height; | |
| 2448 | + __u32 bytesperline; | |
| 2422 | 2449 | } __attribute__ ((packed)); |
| 2423 | 2450 | |
| 2424 | 2451 | /** |
| @@ -2624,6 +2651,20 @@ struct v4l2_create_buffers { · 199 unmodified lines | ||
| 2624 | 2651 | __u32 reserved[5]; |
| 2625 | 2652 | }; |
| 2626 | 2653 | |
| 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 | + | |
| 2627 | 2668 | /* |
| 2628 | 2669 | * 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 |
| 2629 | 2670 | * |
| @@ -2723,6 +2764,8 @@ struct v4l2_create_buffers { · 93 unmodified lines | ||
| 2723 | 2764 | #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) |
| 2724 | 2765 | |
| 2725 | 2766 | #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 | + | |
| 2726 | 2769 | |
| 2727 | 2770 | /* Reminder: when adding new ioctls please add support for them to |
| 2728 | 2771 | drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ |