History

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

Pull media updates from Mauro Carvalho Chehab: - v4l2 core: - sub-device framework routing improvements - NV12M tiled variants added to v4l2_format_info - some fixes at control handler freeing logic - fixed H264 SEPARATE_COLOUR_PLANE check - new staging driver: Intel IPU7 PCI - Rockchip video decoder driver got promoted from staging - iris: added HEVC/VP9 encoder/decoder support - vsp1: driver has gained Renesas VSPX support - uvc: - switched to vb2 ioctl helpers - added MSXU 1.5 metadata support - atomisp: GC0310 sensor driver cleanups in preparation for moving it out of staging - Lots of cleanup, fixes and improvements * tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (310 commits) media: rkvdec: Unstage the driver media: rkvdec: Remove TODO file media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings media: amphion: Support dmabuf and v4l2 buffer without binding media: verisilicon: postproc: 4K support media: v4l2: Add support for NV12M tiled variants to v4l2_format_info() media: uvcvideo: Use a count variable for meta_formats instead of 0 terminating media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5 media: uvcvideo: Introduce dev->meta_formats media: Documentation: Add note about UVCH length field media: uvcvideo: Do not mark valid metadata as invalid media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic media: core: export v4l2_translate_cmd media: uvcvideo: Turn on the camera if V4L2_EVENT_SUB_FL_SEND_INITIAL media: uvcvideo: Remove stream->is_streaming field media: uvcvideo: Split uvc_stop_streaming() media: uvcvideo: Handle locks in uvc_queue_return_buffers media: uvcvideo: Use vb2 ioctl and fop helpers ...

Linus Torvalds committed 1 year ago

Commit 0cdee262 parents 2715260 d968e50314 files · +23131 −4600Browse files

Showing the changes to include/uapi (4 of 314 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/media/raspberrypi/pisp_be_config.h +5 −4
  2. include/uapi/linux/rkisp1-config.h +105 −1
  3. include/uapi/linux/v4l2-controls.h +6 −0
  4. include/uapi/linux/videodev2.h +8 −1
include/uapi/linux/media/raspberrypi/pisp_be_config.h+5−4
@@ -21,10 +21,11 @@ · 20 unmodified lines
21/* preferred byte alignment for outputs */21/* preferred byte alignment for outputs */
22#define PISP_BACK_END_OUTPUT_MAX_ALIGN 64u22#define PISP_BACK_END_OUTPUT_MAX_ALIGN 64u
23 23
24/* minimum allowed tile width anywhere in the pipeline */24/* minimum allowed tile sizes anywhere in the pipeline */
25#define PISP_BACK_END_MIN_TILE_WIDTH 16u25#define PISP_BACK_END_MIN_TILE_WIDTH 16u
26/* minimum allowed tile width anywhere in the pipeline */26#define PISP_BACK_END_MIN_TILE_HEIGHT 16u
27#define PISP_BACK_END_MIN_TILE_HEIGHT 16u27#define PISP_BACK_END_MAX_TILE_WIDTH 65536u
28#define PISP_BACK_END_MAX_TILE_HEIGHT 65536u
28 29
29#define PISP_BACK_END_NUM_OUTPUTS 230#define PISP_BACK_END_NUM_OUTPUTS 2
30#define PISP_BACK_END_HOG_OUTPUT 131#define PISP_BACK_END_HOG_OUTPUT 1
include/uapi/linux/rkisp1-config.h+105−1
@@ -169,6 +169,13 @@ · 168 unmodified lines
169 */169 */
170#define RKISP1_CIF_ISP_COMPAND_NUM_POINTS 64170#define RKISP1_CIF_ISP_COMPAND_NUM_POINTS 64
171 171
172/*
173 * Wide Dynamic Range
174 */
175#define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV 32
176#define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF (RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1)
177#define RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS 4
178
172/*179/*
173 * Measurement types180 * Measurement types
174 */181 */
@@ -889,6 +896,72 @@ struct rkisp1_cif_isp_compand_curve_config { · 714 unmodified lines
889 __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];896 __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];
890};897};
891 898
899/**
900 * struct rkisp1_cif_isp_wdr_tone_curve - Tone mapping curve definition for WDR.
901 *
902 * @dY: the dYn increments for horizontal (input) axis of the tone curve.
903 * each 3-bit dY value represents an increment of 2**(value+3).
904 * dY[0] bits 0:2 is increment dY1, bit 3 unused
905 * dY[0] bits 4:6 is increment dY2, bit 7 unused
906 * ...
907 * dY[0] bits 28:30 is increment dY8, bit 31 unused
908 * ... and so on till dY[3] bits 28:30 is increment dY32, bit 31 unused.
909 * @ym: the Ym values for the vertical (output) axis of the tone curve.
910 * each value is 13 bit.
911 */
912struct rkisp1_cif_isp_wdr_tone_curve {
913 __u32 dY[RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS];
914 __u16 ym[RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF];
915};
916
917/**
918 * struct rkisp1_cif_isp_wdr_iref_config - Illumination reference config for WDR.
919 *
920 * Use illumination reference value as described below, instead of only the
921 * luminance (Y) value for tone mapping and gain calculations:
922 * IRef = (rgb_factor * RGBMax_tr + (8 - rgb_factor) * Y)/8
923 *
924 * @rgb_factor: defines how much influence the RGBmax approach has in
925 * comparison to Y (valid values are 0..8).
926 * @use_y9_8: use Y*9/8 for maximum value calculation along with the
927 * default of R, G, B for noise reduction.
928 * @use_rgb7_8: decrease RGBMax by 7/8 for noise reduction.
929 * @disable_transient: disable transient calculation between Y and RGBY_max.
930 */
931struct rkisp1_cif_isp_wdr_iref_config {
932 __u8 rgb_factor;
933 __u8 use_y9_8;
934 __u8 use_rgb7_8;
935 __u8 disable_transient;
936};
937
938/**
939 * struct rkisp1_cif_isp_wdr_config - Configuration for wide dynamic range.
940 *
941 * @tone_curve: tone mapping curve.
942 * @iref_config: illumination reference configuration. (when use_iref is true)
943 * @rgb_offset: RGB offset value for RGB operation mode. (12 bits)
944 * @luma_offset: luminance offset value for RGB operation mode. (12 bits)
945 * @dmin_thresh: lower threshold for deltaMin value. (12 bits)
946 * @dmin_strength: strength factor for deltaMin. (valid range is 0x00..0x10)
947 * @use_rgb_colorspace: use RGB instead of luminance/chrominance colorspace.
948 * @bypass_chroma_mapping: disable chrominance mapping (only valid if
949 * use_rgb_colorspace = 0)
950 * @use_iref: use illumination reference instead of Y for tone mapping
951 * and gain calculations.
952 */
953struct rkisp1_cif_isp_wdr_config {
954 struct rkisp1_cif_isp_wdr_tone_curve tone_curve;
955 struct rkisp1_cif_isp_wdr_iref_config iref_config;
956 __u16 rgb_offset;
957 __u16 luma_offset;
958 __u16 dmin_thresh;
959 __u8 dmin_strength;
960 __u8 use_rgb_colorspace;
961 __u8 bypass_chroma_mapping;
962 __u8 use_iref;
963};
964
892/*---------- PART2: Measurement Statistics ------------*/965/*---------- PART2: Measurement Statistics ------------*/
893 966
894/**967/**
@@ -1059,6 +1132,7 @@ struct rkisp1_stat_buffer { · 164 unmodified lines
1059 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block1132 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block
1060 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve1133 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve
1061 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve1134 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve
1135 * @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range
1062 */1136 */
1063enum rkisp1_ext_params_block_type {1137enum rkisp1_ext_params_block_type {
1064 RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,1138 RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,
@@ -1081,11 +1155,15 @@ enum rkisp1_ext_params_block_type { · 16 unmodified lines
1081 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,1155 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,
1082 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,1156 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,
1083 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,1157 RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,
1158 RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,
1084};1159};
1085 1160
1086#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)1161#define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE (1U << 0)
1087#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)1162#define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE (1U << 1)
1088 1163
1164/* A bitmask of parameters blocks supported on the current hardware. */
1165#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS (V4L2_CID_USER_RKISP1_BASE + 0x01)
1166
1089/**1167/**
1090 * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block1168 * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block
1091 * header1169 * header
@@ -1460,6 +1538,23 @@ struct rkisp1_ext_params_compand_curve_config { · 368 unmodified lines
1460 struct rkisp1_cif_isp_compand_curve_config config;1538 struct rkisp1_cif_isp_compand_curve_config config;
1461} __attribute__((aligned(8)));1539} __attribute__((aligned(8)));
1462 1540
1541/**
1542 * struct rkisp1_ext_params_wdr_config - RkISP1 extensible params
1543 * Wide dynamic range config
1544 *
1545 * RkISP1 extensible parameters WDR block.
1546 * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR`
1547 *
1548 * @header: The RkISP1 extensible parameters header, see
1549 * :c:type:`rkisp1_ext_params_block_header`
1550 * @config: WDR configuration, see
1551 * :c:type:`rkisp1_cif_isp_wdr_config`
1552 */
1553struct rkisp1_ext_params_wdr_config {
1554 struct rkisp1_ext_params_block_header header;
1555 struct rkisp1_cif_isp_wdr_config config;
1556} __attribute__((aligned(8)));
1557
1463/*1558/*
1464 * The rkisp1_ext_params_compand_curve_config structure is counted twice as it1559 * The rkisp1_ext_params_compand_curve_config structure is counted twice as it
1465 * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.1560 * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.
@@ -1484,7 +1579,8 @@ struct rkisp1_ext_params_compand_curve_config { · 18 unmodified lines
1484 sizeof(struct rkisp1_ext_params_afc_config) +\1579 sizeof(struct rkisp1_ext_params_afc_config) +\
1485 sizeof(struct rkisp1_ext_params_compand_bls_config) +\1580 sizeof(struct rkisp1_ext_params_compand_bls_config) +\
1486 sizeof(struct rkisp1_ext_params_compand_curve_config) +\1581 sizeof(struct rkisp1_ext_params_compand_curve_config) +\
1487 sizeof(struct rkisp1_ext_params_compand_curve_config))1582 sizeof(struct rkisp1_ext_params_compand_curve_config) +\
1583 sizeof(struct rkisp1_ext_params_wdr_config))
1488 1584
1489/**1585/**
1490 * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version1586 * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version
@@ -1520,6 +1616,14 @@ enum rksip1_ext_param_buffer_version { · 29 unmodified lines
1520 * V4L2 control. If such control is not available, userspace should assume only1616 * V4L2 control. If such control is not available, userspace should assume only
1521 * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.1617 * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.
1522 *1618 *
1619 * The read-only V4L2 control ``RKISP1_CID_SUPPORTED_PARAMS_BLOCKS`` can be used
1620 * to query the blocks supported by the device. It contains a bitmask where each
1621 * bit represents the availability of the corresponding entry from the
1622 * :c:type:`rkisp1_ext_params_block_type` enum. The current and default values
1623 * of the control represents the blocks supported by the device instance, while
1624 * the maximum value represents the blocks supported by the kernel driver,
1625 * independently of the device instance.
1626 *
1523 * For each ISP block that userspace wants to configure, a block-specific1627 * For each ISP block that userspace wants to configure, a block-specific
1524 * structure is appended to the @data buffer, one after the other without gaps1628 * structure is appended to the @data buffer, one after the other without gaps
1525 * in between nor overlaps. Userspace shall populate the @data_size field with1629 * in between nor overlaps. Userspace shall populate the @data_size field with
include/uapi/linux/v4l2-controls.h+6−0
@@ -222,6 +222,12 @@ enum v4l2_colorfx { · 221 unmodified lines
222 */222 */
223#define V4L2_CID_USER_UVC_BASE (V4L2_CID_USER_BASE + 0x11e0)223#define V4L2_CID_USER_UVC_BASE (V4L2_CID_USER_BASE + 0x11e0)
224 224
225/*
226 * The base for Rockchip ISP1 driver controls.
227 * We reserve 16 controls for this driver.
228 */
229#define V4L2_CID_USER_RKISP1_BASE (V4L2_CID_USER_BASE + 0x1220)
230
225/* MPEG-class control IDs */231/* MPEG-class control IDs */
226/* The MPEG controls are applicable to all codec controls232/* The MPEG controls are applicable to all codec controls
227 * and the 'MPEG' part of the define is historical */233 * and the 'MPEG' part of the define is historical */
include/uapi/linux/videodev2.h+8−1
@@ -726,7 +726,7 @@ struct v4l2_pix_format { · 725 unmodified lines
726#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */726#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
727#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */727#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
728#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */728#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
729 /* 12bit raw bayer packed, 6 bytes for every 4 pixels */729 /* 12bit raw bayer packed, 3 bytes for every 2 pixels */
730#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C')730#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C')
731#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C')731#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C')
732#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C')732#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C')
@@ -840,6 +840,12 @@ struct v4l2_pix_format { · 107 unmodified lines
840#define V4L2_PIX_FMT_PISP_COMP2_BGGR v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compressed BGGR bayer */840#define V4L2_PIX_FMT_PISP_COMP2_BGGR v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compressed BGGR bayer */
841#define V4L2_PIX_FMT_PISP_COMP2_MONO v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compressed monochrome */841#define V4L2_PIX_FMT_PISP_COMP2_MONO v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compressed monochrome */
842 842
843/* Renesas RZ/V2H CRU packed formats. 64-bit units with contiguous pixels */
844#define V4L2_PIX_FMT_RAW_CRU10 v4l2_fourcc('C', 'R', '1', '0')
845#define V4L2_PIX_FMT_RAW_CRU12 v4l2_fourcc('C', 'R', '1', '2')
846#define V4L2_PIX_FMT_RAW_CRU14 v4l2_fourcc('C', 'R', '1', '4')
847#define V4L2_PIX_FMT_RAW_CRU20 v4l2_fourcc('C', 'R', '2', '0')
848
843/* SDR formats - used only for Software Defined Radio devices */849/* SDR formats - used only for Software Defined Radio devices */
844#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */850#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
845#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */851#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */
@@ -861,6 +867,7 @@ struct v4l2_pix_format { · 15 unmodified lines
861#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */867#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
862#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */868#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
863#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */869#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
870#define V4L2_META_FMT_UVC_MSXU_1_5 v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */
864#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */871#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
865 872
866/* Vendor specific - used for RK_ISP1 camera sub-system */873/* Vendor specific - used for RK_ISP1 camera sub-system */