[{"id":24269,"web_url":"https://patchwork.libcamera.org/comment/24269/","msgid":"<20220801151629.spsoekliqb6kxp4c@uno.localdomain>","date":"2022-08-01T15:16:29","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> re-instating libcamera local modifications.\n\nDon't we need something better than this ?\n\nshould we regularly rebase the libcamera-changes on top of a new\nheader export per each kernel release ?\n\nOtherwise updating headers and re-applying the local modifications in\none go makes it impossible to actually track what's local and what's\nupstream ?\n\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/linux/README          |   2 +-\n>  include/linux/dma-buf.h       |   4 +-\n>  include/linux/drm_fourcc.h    |  86 +++++++++-\n>  include/linux/intel-ipu3.h    |  35 ++--\n>  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n>  include/linux/videodev2.h     |  13 +-\n>  6 files changed, 418 insertions(+), 23 deletions(-)\n>\n> diff --git a/include/linux/README b/include/linux/README\n> index 4e314b9820ce..9f61517a119a 100644\n> --- a/include/linux/README\n> +++ b/include/linux/README\n> @@ -1,4 +1,4 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n> -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n>  modify them manually.\n> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> --- a/include/linux/dma-buf.h\n> +++ b/include/linux/dma-buf.h\n> @@ -92,7 +92,7 @@ struct dma_buf_sync {\n>   * between them in actual uapi, they're just different numbers.\n>   */\n>  #define DMA_BUF_SET_NAME\t_IOW(DMA_BUF_BASE, 1, const char *)\n> -#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, u32)\n> -#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, u64)\n> +#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, __u32)\n> +#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, __u64)\n>\n>  #endif\n> diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> index ea11dcb405e5..cc69eecc606f 100644\n> --- a/include/linux/drm_fourcc.h\n> +++ b/include/linux/drm_fourcc.h\n> @@ -314,6 +314,13 @@ extern \"C\" {\n>   */\n>  #define DRM_FORMAT_P016\t\tfourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n>\n> +/* 2 plane YCbCr420.\n> + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> + */\n> +#define DRM_FORMAT_P030\t\tfourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> +\n>  /* 3 plane non-subsampled (444) YCbCr\n>   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n>   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> @@ -630,6 +637,53 @@ extern \"C\" {\n>   */\n>  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n>\n> +/*\n> + * Intel Tile 4 layout\n> + *\n> + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> + * only differs from Tile Y at the 256B granularity in between. At this\n> + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> + * of 64B x 8 rows.\n> + */\n> +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> +\n> +/*\n> + * Intel color control surfaces (CCS) for DG2 render compression.\n> + *\n> + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> + * outside of the GEM object in a reserved memory area dedicated for the\n> + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> + */\n> +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> +\n> +/*\n> + * Intel color control surfaces (CCS) for DG2 media compression.\n> + *\n> + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> + * GEM object in a reserved memory area dedicated for the storage of the\n> + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> + * pitch is required to be a multiple of four Tile 4 widths.\n> + */\n> +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> +\n> +/*\n> + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> + *\n> + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> + * outside of the GEM object in a reserved memory area dedicated for the\n> + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> + * format of the 256 bits of clear color data matches the one used for the\n> + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> + * for details.\n> + */\n> +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> +\n>  /*\n>   * IPU3 Bayer packing layout\n>   *\n> @@ -638,7 +692,7 @@ extern \"C\" {\n>   * the 6 most significant bits in the last byte unused. The format is little\n>   * endian.\n>   */\n> -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n>\n>  /*\n>   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> @@ -677,6 +731,28 @@ extern \"C\" {\n>   */\n>  #define DRM_FORMAT_MOD_QCOM_COMPRESSED\tfourcc_mod_code(QCOM, 1)\n>\n> +/*\n> + * Qualcomm Tiled Format\n> + *\n> + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> + * Implementation may be platform and base-format specific.\n> + *\n> + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> + * Pixel data pitch/stride is aligned with macrotile width.\n> + * Pixel data height is aligned with macrotile height.\n> + * Entire pixel data buffer is aligned with 4k(bytes).\n> + */\n> +#define DRM_FORMAT_MOD_QCOM_TILED3\tfourcc_mod_code(QCOM, 3)\n> +\n> +/*\n> + * Qualcomm Alternate Tiled Format\n> + *\n> + * Alternate tiled format typically only used within GMEM.\n> + * Implementation may be platform and base-format specific.\n> + */\n> +#define DRM_FORMAT_MOD_QCOM_TILED2\tfourcc_mod_code(QCOM, 2)\n> +\n> +\n>  /* Vivante framebuffer modifiers */\n>\n>  /*\n> @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n>   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n>   * image from Y to reduce the column height, which is not supported\n>   * with these modifiers.\n> + *\n> + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n>   */\n>\n>  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n>  #define AMD_FMT_MOD_PIPE_MASK 0x7\n>\n>  #define AMD_FMT_MOD_SET(field, value) \\\n> -\t((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> +\t((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n>  #define AMD_FMT_MOD_GET(field, value) \\\n>  \t(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n>  #define AMD_FMT_MOD_CLEAR(field) \\\n> -\t(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> +\t(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n>\n>  /* Mobile Industry Processor Interface (MIPI) modifiers */\n>\n> diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> index f30dce43d1d8..5c298ec557fa 100644\n> --- a/include/linux/intel-ipu3.h\n> +++ b/include/linux/intel-ipu3.h\n> @@ -34,11 +34,17 @@\n>   * struct ipu3_uapi_grid_config - Grid plane config\n>   *\n>   * @width:\tGrid horizontal dimensions, in number of grid blocks(cells).\n> + *\t\tFor AWB, the range is (16, 80).\n> + *\t\tFor AF/AE, the range is (16, 32).\n>   * @height:\tGrid vertical dimensions, in number of grid cells.\n> + *\t\tFor AWB, the range is (16, 60).\n> + *\t\tFor AF/AE, the range is (16, 24).\n>   * @block_width_log2:\tLog2 of the width of each cell in pixels.\n> - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> + *\t\t\tFor AWB, the range is [3, 6].\n> + *\t\t\tFor AF/AE, the range is [3, 7].\n>   * @block_height_log2:\tLog2 of the height of each cell in pixels.\n> - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> + *\t\t\tFor AWB, the range is [3, 6].\n> + *\t\t\tFor AF/AE, the range is [3, 7].\n>   * @height_per_slice:\tThe number of blocks in vertical axis per slice.\n>   *\t\t\tDefault 2.\n>   * @x_start: X value of top left corner of Region of Interest(ROI).\n> @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n>   * @R_avg:\tRed average in the cell.\n>   * @B_avg:\tBlue average in the cell.\n>   * @Gb_avg:\tGreen average for blue lines in the cell.\n> - * @sat_ratio:\tPercentage of pixels over a given threshold set in\n> + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n>   *\t\tipu3_uapi_awb_config_s, coded from 0 to 255.\n> - * @padding0:\tUnused byte for padding.\n> - * @padding1:\tUnused byte for padding.\n> - * @padding2:\tUnused byte for padding.\n> + * @padding0:   Unused byte for padding.\n> + * @padding1:   Unused byte for padding.\n> + * @padding2:   Unused byte for padding.\n>   */\n>  struct ipu3_uapi_awb_set_item {\n> -\tunsigned char Gr_avg;\n> -\tunsigned char R_avg;\n> -\tunsigned char B_avg;\n> -\tunsigned char Gb_avg;\n> -\tunsigned char sat_ratio;\n> -\tunsigned char padding0;\n> -\tunsigned char padding1;\n> -\tunsigned char padding2;\n> +\t__u8 Gr_avg;\n> +\t__u8 R_avg;\n> +\t__u8 B_avg;\n> +\t__u8 Gb_avg;\n> +\t__u8 sat_ratio;\n> +\t__u8 padding0;\n> +\t__u8 padding1;\n> +\t__u8 padding2;\n>  } __attribute__((packed));\n>\n>  /*\n> @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n>  \t(IPU3_UAPI_AWB_MAX_SETS * \\\n>  \t (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n>\n> -\n>  /**\n>   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n>   *\n> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> index a055d2576253..9d2a8237e712 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n>  \tV4L2_COLORFX_SOLARIZATION\t\t= 13,\n>  \tV4L2_COLORFX_ANTIQUE\t\t\t= 14,\n>  \tV4L2_COLORFX_SET_CBCR\t\t\t= 15,\n> +\tV4L2_COLORFX_SET_RGB\t\t\t= 16,\n>  };\n>  #define V4L2_CID_AUTOBRIGHTNESS\t\t\t(V4L2_CID_BASE+32)\n>  #define V4L2_CID_BAND_STOP_FILTER\t\t(V4L2_CID_BASE+33)\n> @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n>\n>  #define V4L2_CID_ALPHA_COMPONENT\t\t(V4L2_CID_BASE+41)\n>  #define V4L2_CID_COLORFX_CBCR\t\t\t(V4L2_CID_BASE+42)\n> +#define V4L2_CID_COLORFX_RGB\t\t\t(V4L2_CID_BASE+43)\n>\n>  /* last CID + 1 */\n> -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n>\n>  /* USER-class private control IDs */\n>\n> @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n>   */\n>  #define V4L2_CID_USER_ALLEGRO_BASE\t\t(V4L2_CID_USER_BASE + 0x1170)\n>\n> +/*\n> + * The base for the isl7998x driver controls.\n> + * We reserve 16 controls for this driver.\n> + */\n> +#define V4L2_CID_USER_ISL7998X_BASE\t\t(V4L2_CID_USER_BASE + 0x1180)\n> +\n>  /* MPEG-class control IDs */\n>  /* The MPEG controls are applicable to all codec controls\n>   * and the 'MPEG' part of the define is historical */\n> @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n>  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES\t\t(V4L2_CID_CODEC_BASE+234)\n>  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR\t\t(V4L2_CID_CODEC_BASE+235)\n>  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD\t(V4L2_CID_CODEC_BASE+236)\n> +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE\t(V4L2_CID_CODEC_BASE+237)\n> +enum v4l2_mpeg_video_intra_refresh_period_type {\n> +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM\t= 0,\n> +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC\t= 1,\n> +};\n>\n>  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n>  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL\t\t\t(V4L2_CID_CODEC_BASE+270)\n> @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n>  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC\t\t0x01\n>  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC\t\t0x02\n>  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD\t0x04\n> +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME\t\t0x08\n> +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME\t\t0x10\n>\n>  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 7)\n>  /**\n> @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n>  \t__u32 min_display_mastering_luminance;\n>  };\n>\n> +/* Stateless VP9 controls */\n> +\n> +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED\t0x1\n> +#define\tV4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE\t0x2\n> +\n> +/**\n> + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> + *\n> + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> + * chosen reference frame. If this syntax element is not present in the bitstream,\n> + * users should pass its last value.\n> + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> + * chosen mode.\tIf this syntax element is not present in the bitstream, users should\n> + * pass its last value.\n> + * @level: indicates the loop filter strength.\n> + * @sharpness: indicates the sharpness level.\n> + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> + * @reserved: padding field. Should be zeroed by applications.\n> + *\n> + * This structure contains all loop filter related parameters. See sections\n> + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> + */\n> +struct v4l2_vp9_loop_filter {\n> +\t__s8 ref_deltas[4];\n> +\t__s8 mode_deltas[2];\n> +\t__u8 level;\n> +\t__u8 sharpness;\n> +\t__u8 flags;\n> +\t__u8 reserved[7];\n> +};\n> +\n> +/**\n> + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> + *\n> + * @base_q_idx: indicates the base frame qindex.\n> + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> + * @reserved: padding field. Should be zeroed by applications.\n> + *\n> + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> + * syntax' of the VP9 specification for more details.\n> + */\n> +struct v4l2_vp9_quantization {\n> +\t__u8 base_q_idx;\n> +\t__s8 delta_q_y_dc;\n> +\t__s8 delta_q_uv_dc;\n> +\t__s8 delta_q_uv_ac;\n> +\t__u8 reserved[4];\n> +};\n> +\n> +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED\t\t0x01\n> +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP\t\t0x02\n> +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE\t0x04\n> +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA\t\t0x08\n> +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE\t0x10\n> +\n> +#define V4L2_VP9_SEG_LVL_ALT_Q\t\t\t\t0\n> +#define V4L2_VP9_SEG_LVL_ALT_L\t\t\t\t1\n> +#define V4L2_VP9_SEG_LVL_REF_FRAME\t\t\t2\n> +#define V4L2_VP9_SEG_LVL_SKIP\t\t\t\t3\n> +#define V4L2_VP9_SEG_LVL_MAX\t\t\t\t4\n> +\n> +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\t(1 << (id))\n> +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK\t0xf\n> +\n> +/**\n> + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> + *\n> + * @feature_data: data attached to each feature. Data entry is only valid if\n> + * the feature is enabled. The array shall be indexed with segment number as\n> + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> + * @tree_probs: specifies the probability values to be used when decoding a\n> + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> + * for more details.\n> + * @pred_probs: specifies the probability values to be used when decoding a\n> + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> + * for more details.\n> + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> + * @reserved: padding field. Should be zeroed by applications.\n> + *\n> + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> + * the VP9 specification for more details.\n> + */\n> +struct v4l2_vp9_segmentation {\n> +\t__s16 feature_data[8][4];\n> +\t__u8 feature_enabled[8];\n> +\t__u8 tree_probs[7];\n> +\t__u8 pred_probs[3];\n> +\t__u8 flags;\n> +\t__u8 reserved[5];\n> +};\n> +\n> +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME\t\t\t0x001\n> +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME\t\t\t0x002\n> +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT\t\t0x004\n> +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY\t\t\t0x008\n> +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV\t\t0x010\n> +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX\t\t0x020\n> +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE\t\t0x040\n> +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING\t\t0x080\n> +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING\t\t0x100\n> +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING\t0x200\n> +\n> +#define V4L2_VP9_SIGN_BIAS_LAST\t\t\t\t0x1\n> +#define V4L2_VP9_SIGN_BIAS_GOLDEN\t\t\t0x2\n> +#define V4L2_VP9_SIGN_BIAS_ALT\t\t\t\t0x4\n> +\n> +#define V4L2_VP9_RESET_FRAME_CTX_NONE\t\t\t0\n> +#define V4L2_VP9_RESET_FRAME_CTX_SPEC\t\t\t1\n> +#define V4L2_VP9_RESET_FRAME_CTX_ALL\t\t\t2\n> +\n> +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP\t\t\t0\n> +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH\t\t1\n> +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP\t\t2\n> +#define V4L2_VP9_INTERP_FILTER_BILINEAR\t\t\t3\n> +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE\t\t4\n> +\n> +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE\t0\n> +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE\t1\n> +#define V4L2_VP9_REFERENCE_MODE_SELECT\t\t\t2\n> +\n> +#define V4L2_VP9_PROFILE_MAX\t\t\t\t3\n> +\n> +#define V4L2_CID_STATELESS_VP9_FRAME\t(V4L2_CID_CODEC_STATELESS_BASE + 300)\n> +/**\n> + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> + *\n> + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> + * @compressed_header_size: compressed header size in bytes.\n> + * @uncompressed_header_size: uncompressed header size in bytes.\n> + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> + * pixels. This is not used during the decoding process but might be used by HW scalers\n> + * to prepare a frame that's ready for scanout.\n> + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> + * pixels. This is not used during the decoding process but might be used by HW scalers\n> + * to prepare a frame that's ready for scanout.\n> + * @last_frame_ts: \"last\" reference buffer timestamp.\n> + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> + * @frame_context_idx: frame context that should be used/updated.\n> + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> + * 10 and/or 12 bits depths.\n> + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> + * is measured in units of 8x8 blocks).\n> + * @reference_mode: specifies the type of inter prediction to be used.\n> + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> + * @reserved: padding field. Should be zeroed by applications.\n> + */\n> +struct v4l2_ctrl_vp9_frame {\n> +\tstruct v4l2_vp9_loop_filter lf;\n> +\tstruct v4l2_vp9_quantization quant;\n> +\tstruct v4l2_vp9_segmentation seg;\n> +\t__u32 flags;\n> +\t__u16 compressed_header_size;\n> +\t__u16 uncompressed_header_size;\n> +\t__u16 frame_width_minus_1;\n> +\t__u16 frame_height_minus_1;\n> +\t__u16 render_width_minus_1;\n> +\t__u16 render_height_minus_1;\n> +\t__u64 last_frame_ts;\n> +\t__u64 golden_frame_ts;\n> +\t__u64 alt_frame_ts;\n> +\t__u8 ref_frame_sign_bias;\n> +\t__u8 reset_frame_context;\n> +\t__u8 frame_context_idx;\n> +\t__u8 profile;\n> +\t__u8 bit_depth;\n> +\t__u8 interpolation_filter;\n> +\t__u8 tile_cols_log2;\n> +\t__u8 tile_rows_log2;\n> +\t__u8 reference_mode;\n> +\t__u8 reserved[7];\n> +};\n> +\n> +#define V4L2_VP9_NUM_FRAME_CTX\t4\n> +\n> +/**\n> + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> + * @joint: motion vector joint probability updates.\n> + * @sign: motion vector sign probability updates.\n> + * @classes: motion vector class probability updates.\n> + * @class0_bit: motion vector class0 bit probability updates.\n> + * @bits: motion vector bits probability updates.\n> + * @class0_fr: motion vector class0 fractional bit probability updates.\n> + * @fr: motion vector fractional bit probability updates.\n> + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> + * @hp: motion vector high precision fractional bit probability updates.\n> + *\n> + * This structure contains new values of motion vector probabilities.\n> + * A value of zero in an array element means there is no update of the relevant probability.\n> + * See `struct v4l2_vp9_prob_updates` for details.\n> + */\n> +struct v4l2_vp9_mv_probs {\n> +\t__u8 joint[3];\n> +\t__u8 sign[2];\n> +\t__u8 classes[2][10];\n> +\t__u8 class0_bit[2];\n> +\t__u8 bits[2][10];\n> +\t__u8 class0_fr[2][2][3];\n> +\t__u8 fr[2][3];\n> +\t__u8 class0_hp[2];\n> +\t__u8 hp[2];\n> +};\n> +\n> +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR\t(V4L2_CID_CODEC_STATELESS_BASE + 301)\n> +\n> +#define V4L2_VP9_TX_MODE_ONLY_4X4\t\t\t0\n> +#define V4L2_VP9_TX_MODE_ALLOW_8X8\t\t\t1\n> +#define V4L2_VP9_TX_MODE_ALLOW_16X16\t\t\t2\n> +#define V4L2_VP9_TX_MODE_ALLOW_32X32\t\t\t3\n> +#define V4L2_VP9_TX_MODE_SELECT\t\t\t\t4\n> +\n> +/**\n> + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> + * @tx8: TX 8x8 probability updates.\n> + * @tx16: TX 16x16 probability updates.\n> + * @tx32: TX 32x32 probability updates.\n> + * @coef: coefficient probability updates.\n> + * @skip: skip probability updates.\n> + * @inter_mode: inter mode probability updates.\n> + * @interp_filter: interpolation filter probability updates.\n> + * @is_inter: is inter-block probability updates.\n> + * @comp_mode: compound prediction mode probability updates.\n> + * @single_ref: single ref probability updates.\n> + * @comp_ref: compound ref probability updates.\n> + * @y_mode: Y prediction mode probability updates.\n> + * @uv_mode: UV prediction mode probability updates.\n> + * @partition: partition probability updates.\n> + * @mv: motion vector probability updates.\n> + *\n> + * This structure holds the probabilities update as parsed in the compressed\n> + * header (Spec 6.3). These values represent the value of probability update after\n> + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> + * means that there is no update of the relevant probability.\n> + *\n> + * This control is optional and needs to be used when dealing with the hardware which is\n> + * not capable of parsing the compressed header itself. Only drivers which need it will\n> + * implement it.\n> + */\n> +struct v4l2_ctrl_vp9_compressed_hdr {\n> +\t__u8 tx_mode;\n> +\t__u8 tx8[2][1];\n> +\t__u8 tx16[2][2];\n> +\t__u8 tx32[2][3];\n> +\t__u8 coef[4][2][2][6][6][3];\n> +\t__u8 skip[3];\n> +\t__u8 inter_mode[7][3];\n> +\t__u8 interp_filter[4][2];\n> +\t__u8 is_inter[4];\n> +\t__u8 comp_mode[5];\n> +\t__u8 single_ref[5][2];\n> +\t__u8 comp_ref[5];\n> +\t__u8 y_mode[4][9];\n> +\t__u8 uv_mode[10][9];\n> +\t__u8 partition[16][3];\n> +\n> +\tstruct v4l2_vp9_mv_probs mv;\n> +};\n> +\n>  /* MPEG-compression definitions kept for backwards compatibility */\n>  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n>  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> --- a/include/linux/videodev2.h\n> +++ b/include/linux/videodev2.h\n> @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n>  /* Grey bit-packed formats */\n>  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n>  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> +#define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n>\n>  /* Palette formats */\n>  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n>  /* Tiled YUV formats, non contiguous planes */\n>  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n>  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n>\n>  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n>  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n>  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n>  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n>  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n>  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n>  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n>  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n>  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n>  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n>  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n>\n> -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n>  #define V4L2_PIX_FMT_IPU3_SBGGR10\tv4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n>  #define V4L2_PIX_FMT_IPU3_SGBRG10\tv4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n>  #define V4L2_PIX_FMT_IPU3_SGRBG10\tv4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n>  \t\tstruct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n>  \t\tstruct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n>  \t\tstruct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> +\t\tstruct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> +\t\tstruct v4l2_ctrl_vp9_frame *p_vp9_frame;\n>  \t\tvoid *ptr;\n>  \t};\n>  } __attribute__ ((packed));\n> @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n>  \tV4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n>  \tV4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n>  \tV4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> +\n> +\tV4L2_CTRL_TYPE_VP9_COMPRESSED_HDR\t= 0x0260,\n> +\tV4L2_CTRL_TYPE_VP9_FRAME\t\t= 0x0261,\n>  };\n>\n>  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 77423C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Aug 2022 15:16:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D7CEB603E8;\n\tMon,  1 Aug 2022 17:16:34 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::223])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 737B3603E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Aug 2022 17:16:33 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 7210460005;\n\tMon,  1 Aug 2022 15:16:31 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659366994;\n\tbh=ZA52V4WTohtSumrD5YZ1LZ0QhFgFadIYwt3GNSCoJ1E=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=p1f/Wfp5ZEjYd/mi5W9picjjC1Z/IOwOu0NBxci+8pUdrvvKMt8vaI1z6QA+LntGt\n\tiCwgYYSbVy+ySZn/nTBMUTOTzh1n3DqN5frBuNRCnulH1Y2UHBfkrgNDvn+CbkuI+I\n\tKmvxKGC4qxbuA0HonKnmCLDNG1H7rnNJSsveymRJj7XQl5wAa/u5hFYRPVCTj2/1Bi\n\tVwg7TJkS8OGI/2xAHJU8HBC3xOehgvgFIhj2mh3Tq5THvYddCoXIO+C/Q3vWENJCAG\n\ttKlbJcND5cqOV9taDMa+Y2Bq6u0mvQYlWG/xxo5AeS9a2X01rdzzfLTPh6Fu/ZB77w\n\tGRKKPVe1UczFQ==","Date":"Mon, 1 Aug 2022 17:16:29 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220801151629.spsoekliqb6kxp4c@uno.localdomain>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24276,"web_url":"https://patchwork.libcamera.org/comment/24276/","msgid":"<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","date":"2022-08-01T19:47:04","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > re-instating libcamera local modifications.\n> \n> Don't we need something better than this ?\n> \n> should we regularly rebase the libcamera-changes on top of a new\n> header export per each kernel release ?\n> \n> Otherwise updating headers and re-applying the local modifications in\n> one go makes it impossible to actually track what's local and what's\n> upstream ?\n\nThis patch was possibly easier to generate than it is to review. The\nupdate-kernel-headers.sh script undoes all the local changes, and I've\nthen used git add -p to avoid picking up the reverts. This is a manual\nprocess that can lead to errors.\n\nOn the review side, it's really about making sure that the update\ndoesn't drop any of the features we depend on. It may seem error-prone\ntoo, but most (not all though) of the local changes we carry will be\ndetected at compilation time of reverted.\n\nThe best way to avoid all this is of course to upstream all the changes,\nand that's something we keep working on, with various delays depending\non the features. For instance, patches 02/13 and 03/13 in this series\nwill effectively disappear once we upgrade to the v5.20 kernel headers.\nOther changes take longer to upstream.\n\nI'm open to other ideas to improve the process, but completely\noverwriting the headers and then reapplying local changes on top will\nbreak compilation during bisection.\n\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  include/linux/README          |   2 +-\n> >  include/linux/dma-buf.h       |   4 +-\n> >  include/linux/drm_fourcc.h    |  86 +++++++++-\n> >  include/linux/intel-ipu3.h    |  35 ++--\n> >  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n> >  include/linux/videodev2.h     |  13 +-\n> >  6 files changed, 418 insertions(+), 23 deletions(-)\n> >\n> > diff --git a/include/linux/README b/include/linux/README\n> > index 4e314b9820ce..9f61517a119a 100644\n> > --- a/include/linux/README\n> > +++ b/include/linux/README\n> > @@ -1,4 +1,4 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >\n> > -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> > +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n> >  modify them manually.\n> > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> > index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> > --- a/include/linux/dma-buf.h\n> > +++ b/include/linux/dma-buf.h\n> > @@ -92,7 +92,7 @@ struct dma_buf_sync {\n> >   * between them in actual uapi, they're just different numbers.\n> >   */\n> >  #define DMA_BUF_SET_NAME\t_IOW(DMA_BUF_BASE, 1, const char *)\n> > -#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, u32)\n> > -#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, u64)\n> > +#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, __u32)\n> > +#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, __u64)\n> >\n> >  #endif\n> > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > index ea11dcb405e5..cc69eecc606f 100644\n> > --- a/include/linux/drm_fourcc.h\n> > +++ b/include/linux/drm_fourcc.h\n> > @@ -314,6 +314,13 @@ extern \"C\" {\n> >   */\n> >  #define DRM_FORMAT_P016\t\tfourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n> >\n> > +/* 2 plane YCbCr420.\n> > + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> > + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> > + */\n> > +#define DRM_FORMAT_P030\t\tfourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> > +\n> >  /* 3 plane non-subsampled (444) YCbCr\n> >   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n> >   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> > @@ -630,6 +637,53 @@ extern \"C\" {\n> >   */\n> >  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n> >\n> > +/*\n> > + * Intel Tile 4 layout\n> > + *\n> > + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> > + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> > + * only differs from Tile Y at the 256B granularity in between. At this\n> > + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> > + * of 64B x 8 rows.\n> > + */\n> > +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> > +\n> > +/*\n> > + * Intel color control surfaces (CCS) for DG2 render compression.\n> > + *\n> > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > + * outside of the GEM object in a reserved memory area dedicated for the\n> > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> > + */\n> > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> > +\n> > +/*\n> > + * Intel color control surfaces (CCS) for DG2 media compression.\n> > + *\n> > + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> > + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> > + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> > + * GEM object in a reserved memory area dedicated for the storage of the\n> > + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> > + * pitch is required to be a multiple of four Tile 4 widths.\n> > + */\n> > +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> > +\n> > +/*\n> > + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> > + *\n> > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > + * outside of the GEM object in a reserved memory area dedicated for the\n> > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> > + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> > + * format of the 256 bits of clear color data matches the one used for the\n> > + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> > + * for details.\n> > + */\n> > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> > +\n> >  /*\n> >   * IPU3 Bayer packing layout\n> >   *\n> > @@ -638,7 +692,7 @@ extern \"C\" {\n> >   * the 6 most significant bits in the last byte unused. The format is little\n> >   * endian.\n> >   */\n> > -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> > +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n> >\n> >  /*\n> >   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> > @@ -677,6 +731,28 @@ extern \"C\" {\n> >   */\n> >  #define DRM_FORMAT_MOD_QCOM_COMPRESSED\tfourcc_mod_code(QCOM, 1)\n> >\n> > +/*\n> > + * Qualcomm Tiled Format\n> > + *\n> > + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> > + * Implementation may be platform and base-format specific.\n> > + *\n> > + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> > + * Pixel data pitch/stride is aligned with macrotile width.\n> > + * Pixel data height is aligned with macrotile height.\n> > + * Entire pixel data buffer is aligned with 4k(bytes).\n> > + */\n> > +#define DRM_FORMAT_MOD_QCOM_TILED3\tfourcc_mod_code(QCOM, 3)\n> > +\n> > +/*\n> > + * Qualcomm Alternate Tiled Format\n> > + *\n> > + * Alternate tiled format typically only used within GMEM.\n> > + * Implementation may be platform and base-format specific.\n> > + */\n> > +#define DRM_FORMAT_MOD_QCOM_TILED2\tfourcc_mod_code(QCOM, 2)\n> > +\n> > +\n> >  /* Vivante framebuffer modifiers */\n> >\n> >  /*\n> > @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> >   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n> >   * image from Y to reduce the column height, which is not supported\n> >   * with these modifiers.\n> > + *\n> > + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> > + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> > + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n> >   */\n> >\n> >  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> > @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> >  #define AMD_FMT_MOD_PIPE_MASK 0x7\n> >\n> >  #define AMD_FMT_MOD_SET(field, value) \\\n> > -\t((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > +\t((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> >  #define AMD_FMT_MOD_GET(field, value) \\\n> >  \t(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n> >  #define AMD_FMT_MOD_CLEAR(field) \\\n> > -\t(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > +\t(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> >\n> >  /* Mobile Industry Processor Interface (MIPI) modifiers */\n> >\n> > diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> > index f30dce43d1d8..5c298ec557fa 100644\n> > --- a/include/linux/intel-ipu3.h\n> > +++ b/include/linux/intel-ipu3.h\n> > @@ -34,11 +34,17 @@\n> >   * struct ipu3_uapi_grid_config - Grid plane config\n> >   *\n> >   * @width:\tGrid horizontal dimensions, in number of grid blocks(cells).\n> > + *\t\tFor AWB, the range is (16, 80).\n> > + *\t\tFor AF/AE, the range is (16, 32).\n> >   * @height:\tGrid vertical dimensions, in number of grid cells.\n> > + *\t\tFor AWB, the range is (16, 60).\n> > + *\t\tFor AF/AE, the range is (16, 24).\n> >   * @block_width_log2:\tLog2 of the width of each cell in pixels.\n> > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > + *\t\t\tFor AWB, the range is [3, 6].\n> > + *\t\t\tFor AF/AE, the range is [3, 7].\n> >   * @block_height_log2:\tLog2 of the height of each cell in pixels.\n> > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > + *\t\t\tFor AWB, the range is [3, 6].\n> > + *\t\t\tFor AF/AE, the range is [3, 7].\n> >   * @height_per_slice:\tThe number of blocks in vertical axis per slice.\n> >   *\t\t\tDefault 2.\n> >   * @x_start: X value of top left corner of Region of Interest(ROI).\n> > @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n> >   * @R_avg:\tRed average in the cell.\n> >   * @B_avg:\tBlue average in the cell.\n> >   * @Gb_avg:\tGreen average for blue lines in the cell.\n> > - * @sat_ratio:\tPercentage of pixels over a given threshold set in\n> > + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n> >   *\t\tipu3_uapi_awb_config_s, coded from 0 to 255.\n> > - * @padding0:\tUnused byte for padding.\n> > - * @padding1:\tUnused byte for padding.\n> > - * @padding2:\tUnused byte for padding.\n> > + * @padding0:   Unused byte for padding.\n> > + * @padding1:   Unused byte for padding.\n> > + * @padding2:   Unused byte for padding.\n> >   */\n> >  struct ipu3_uapi_awb_set_item {\n> > -\tunsigned char Gr_avg;\n> > -\tunsigned char R_avg;\n> > -\tunsigned char B_avg;\n> > -\tunsigned char Gb_avg;\n> > -\tunsigned char sat_ratio;\n> > -\tunsigned char padding0;\n> > -\tunsigned char padding1;\n> > -\tunsigned char padding2;\n> > +\t__u8 Gr_avg;\n> > +\t__u8 R_avg;\n> > +\t__u8 B_avg;\n> > +\t__u8 Gb_avg;\n> > +\t__u8 sat_ratio;\n> > +\t__u8 padding0;\n> > +\t__u8 padding1;\n> > +\t__u8 padding2;\n> >  } __attribute__((packed));\n> >\n> >  /*\n> > @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n> >  \t(IPU3_UAPI_AWB_MAX_SETS * \\\n> >  \t (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n> >\n> > -\n> >  /**\n> >   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n> >   *\n> > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > index a055d2576253..9d2a8237e712 100644\n> > --- a/include/linux/v4l2-controls.h\n> > +++ b/include/linux/v4l2-controls.h\n> > @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n> >  \tV4L2_COLORFX_SOLARIZATION\t\t= 13,\n> >  \tV4L2_COLORFX_ANTIQUE\t\t\t= 14,\n> >  \tV4L2_COLORFX_SET_CBCR\t\t\t= 15,\n> > +\tV4L2_COLORFX_SET_RGB\t\t\t= 16,\n> >  };\n> >  #define V4L2_CID_AUTOBRIGHTNESS\t\t\t(V4L2_CID_BASE+32)\n> >  #define V4L2_CID_BAND_STOP_FILTER\t\t(V4L2_CID_BASE+33)\n> > @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n> >\n> >  #define V4L2_CID_ALPHA_COMPONENT\t\t(V4L2_CID_BASE+41)\n> >  #define V4L2_CID_COLORFX_CBCR\t\t\t(V4L2_CID_BASE+42)\n> > +#define V4L2_CID_COLORFX_RGB\t\t\t(V4L2_CID_BASE+43)\n> >\n> >  /* last CID + 1 */\n> > -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> > +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n> >\n> >  /* USER-class private control IDs */\n> >\n> > @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n> >   */\n> >  #define V4L2_CID_USER_ALLEGRO_BASE\t\t(V4L2_CID_USER_BASE + 0x1170)\n> >\n> > +/*\n> > + * The base for the isl7998x driver controls.\n> > + * We reserve 16 controls for this driver.\n> > + */\n> > +#define V4L2_CID_USER_ISL7998X_BASE\t\t(V4L2_CID_USER_BASE + 0x1180)\n> > +\n> >  /* MPEG-class control IDs */\n> >  /* The MPEG controls are applicable to all codec controls\n> >   * and the 'MPEG' part of the define is historical */\n> > @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n> >  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES\t\t(V4L2_CID_CODEC_BASE+234)\n> >  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR\t\t(V4L2_CID_CODEC_BASE+235)\n> >  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD\t(V4L2_CID_CODEC_BASE+236)\n> > +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE\t(V4L2_CID_CODEC_BASE+237)\n> > +enum v4l2_mpeg_video_intra_refresh_period_type {\n> > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM\t= 0,\n> > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC\t= 1,\n> > +};\n> >\n> >  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n> >  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL\t\t\t(V4L2_CID_CODEC_BASE+270)\n> > @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n> >  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC\t\t0x01\n> >  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC\t\t0x02\n> >  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD\t0x04\n> > +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME\t\t0x08\n> > +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME\t\t0x10\n> >\n> >  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 7)\n> >  /**\n> > @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n> >  \t__u32 min_display_mastering_luminance;\n> >  };\n> >\n> > +/* Stateless VP9 controls */\n> > +\n> > +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED\t0x1\n> > +#define\tV4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE\t0x2\n> > +\n> > +/**\n> > + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> > + *\n> > + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> > + * chosen reference frame. If this syntax element is not present in the bitstream,\n> > + * users should pass its last value.\n> > + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> > + * chosen mode.\tIf this syntax element is not present in the bitstream, users should\n> > + * pass its last value.\n> > + * @level: indicates the loop filter strength.\n> > + * @sharpness: indicates the sharpness level.\n> > + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> > + * @reserved: padding field. Should be zeroed by applications.\n> > + *\n> > + * This structure contains all loop filter related parameters. See sections\n> > + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> > + */\n> > +struct v4l2_vp9_loop_filter {\n> > +\t__s8 ref_deltas[4];\n> > +\t__s8 mode_deltas[2];\n> > +\t__u8 level;\n> > +\t__u8 sharpness;\n> > +\t__u8 flags;\n> > +\t__u8 reserved[7];\n> > +};\n> > +\n> > +/**\n> > + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> > + *\n> > + * @base_q_idx: indicates the base frame qindex.\n> > + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> > + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> > + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> > + * @reserved: padding field. Should be zeroed by applications.\n> > + *\n> > + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> > + * syntax' of the VP9 specification for more details.\n> > + */\n> > +struct v4l2_vp9_quantization {\n> > +\t__u8 base_q_idx;\n> > +\t__s8 delta_q_y_dc;\n> > +\t__s8 delta_q_uv_dc;\n> > +\t__s8 delta_q_uv_ac;\n> > +\t__u8 reserved[4];\n> > +};\n> > +\n> > +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED\t\t0x01\n> > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP\t\t0x02\n> > +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE\t0x04\n> > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA\t\t0x08\n> > +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE\t0x10\n> > +\n> > +#define V4L2_VP9_SEG_LVL_ALT_Q\t\t\t\t0\n> > +#define V4L2_VP9_SEG_LVL_ALT_L\t\t\t\t1\n> > +#define V4L2_VP9_SEG_LVL_REF_FRAME\t\t\t2\n> > +#define V4L2_VP9_SEG_LVL_SKIP\t\t\t\t3\n> > +#define V4L2_VP9_SEG_LVL_MAX\t\t\t\t4\n> > +\n> > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\t(1 << (id))\n> > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK\t0xf\n> > +\n> > +/**\n> > + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> > + *\n> > + * @feature_data: data attached to each feature. Data entry is only valid if\n> > + * the feature is enabled. The array shall be indexed with segment number as\n> > + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> > + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> > + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> > + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> > + * @tree_probs: specifies the probability values to be used when decoding a\n> > + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> > + * for more details.\n> > + * @pred_probs: specifies the probability values to be used when decoding a\n> > + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> > + * for more details.\n> > + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> > + * @reserved: padding field. Should be zeroed by applications.\n> > + *\n> > + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> > + * the VP9 specification for more details.\n> > + */\n> > +struct v4l2_vp9_segmentation {\n> > +\t__s16 feature_data[8][4];\n> > +\t__u8 feature_enabled[8];\n> > +\t__u8 tree_probs[7];\n> > +\t__u8 pred_probs[3];\n> > +\t__u8 flags;\n> > +\t__u8 reserved[5];\n> > +};\n> > +\n> > +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME\t\t\t0x001\n> > +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME\t\t\t0x002\n> > +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT\t\t0x004\n> > +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY\t\t\t0x008\n> > +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV\t\t0x010\n> > +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX\t\t0x020\n> > +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE\t\t0x040\n> > +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING\t\t0x080\n> > +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING\t\t0x100\n> > +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING\t0x200\n> > +\n> > +#define V4L2_VP9_SIGN_BIAS_LAST\t\t\t\t0x1\n> > +#define V4L2_VP9_SIGN_BIAS_GOLDEN\t\t\t0x2\n> > +#define V4L2_VP9_SIGN_BIAS_ALT\t\t\t\t0x4\n> > +\n> > +#define V4L2_VP9_RESET_FRAME_CTX_NONE\t\t\t0\n> > +#define V4L2_VP9_RESET_FRAME_CTX_SPEC\t\t\t1\n> > +#define V4L2_VP9_RESET_FRAME_CTX_ALL\t\t\t2\n> > +\n> > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP\t\t\t0\n> > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH\t\t1\n> > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP\t\t2\n> > +#define V4L2_VP9_INTERP_FILTER_BILINEAR\t\t\t3\n> > +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE\t\t4\n> > +\n> > +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE\t0\n> > +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE\t1\n> > +#define V4L2_VP9_REFERENCE_MODE_SELECT\t\t\t2\n> > +\n> > +#define V4L2_VP9_PROFILE_MAX\t\t\t\t3\n> > +\n> > +#define V4L2_CID_STATELESS_VP9_FRAME\t(V4L2_CID_CODEC_STATELESS_BASE + 300)\n> > +/**\n> > + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> > + *\n> > + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> > + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> > + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> > + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> > + * @compressed_header_size: compressed header size in bytes.\n> > + * @uncompressed_header_size: uncompressed header size in bytes.\n> > + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> > + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> > + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > + * to prepare a frame that's ready for scanout.\n> > + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > + * to prepare a frame that's ready for scanout.\n> > + * @last_frame_ts: \"last\" reference buffer timestamp.\n> > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> > + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> > + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> > + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> > + * @frame_context_idx: frame context that should be used/updated.\n> > + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> > + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> > + * 10 and/or 12 bits depths.\n> > + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> > + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> > + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> > + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> > + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> > + * is measured in units of 8x8 blocks).\n> > + * @reference_mode: specifies the type of inter prediction to be used.\n> > + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> > + * @reserved: padding field. Should be zeroed by applications.\n> > + */\n> > +struct v4l2_ctrl_vp9_frame {\n> > +\tstruct v4l2_vp9_loop_filter lf;\n> > +\tstruct v4l2_vp9_quantization quant;\n> > +\tstruct v4l2_vp9_segmentation seg;\n> > +\t__u32 flags;\n> > +\t__u16 compressed_header_size;\n> > +\t__u16 uncompressed_header_size;\n> > +\t__u16 frame_width_minus_1;\n> > +\t__u16 frame_height_minus_1;\n> > +\t__u16 render_width_minus_1;\n> > +\t__u16 render_height_minus_1;\n> > +\t__u64 last_frame_ts;\n> > +\t__u64 golden_frame_ts;\n> > +\t__u64 alt_frame_ts;\n> > +\t__u8 ref_frame_sign_bias;\n> > +\t__u8 reset_frame_context;\n> > +\t__u8 frame_context_idx;\n> > +\t__u8 profile;\n> > +\t__u8 bit_depth;\n> > +\t__u8 interpolation_filter;\n> > +\t__u8 tile_cols_log2;\n> > +\t__u8 tile_rows_log2;\n> > +\t__u8 reference_mode;\n> > +\t__u8 reserved[7];\n> > +};\n> > +\n> > +#define V4L2_VP9_NUM_FRAME_CTX\t4\n> > +\n> > +/**\n> > + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> > + * @joint: motion vector joint probability updates.\n> > + * @sign: motion vector sign probability updates.\n> > + * @classes: motion vector class probability updates.\n> > + * @class0_bit: motion vector class0 bit probability updates.\n> > + * @bits: motion vector bits probability updates.\n> > + * @class0_fr: motion vector class0 fractional bit probability updates.\n> > + * @fr: motion vector fractional bit probability updates.\n> > + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> > + * @hp: motion vector high precision fractional bit probability updates.\n> > + *\n> > + * This structure contains new values of motion vector probabilities.\n> > + * A value of zero in an array element means there is no update of the relevant probability.\n> > + * See `struct v4l2_vp9_prob_updates` for details.\n> > + */\n> > +struct v4l2_vp9_mv_probs {\n> > +\t__u8 joint[3];\n> > +\t__u8 sign[2];\n> > +\t__u8 classes[2][10];\n> > +\t__u8 class0_bit[2];\n> > +\t__u8 bits[2][10];\n> > +\t__u8 class0_fr[2][2][3];\n> > +\t__u8 fr[2][3];\n> > +\t__u8 class0_hp[2];\n> > +\t__u8 hp[2];\n> > +};\n> > +\n> > +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR\t(V4L2_CID_CODEC_STATELESS_BASE + 301)\n> > +\n> > +#define V4L2_VP9_TX_MODE_ONLY_4X4\t\t\t0\n> > +#define V4L2_VP9_TX_MODE_ALLOW_8X8\t\t\t1\n> > +#define V4L2_VP9_TX_MODE_ALLOW_16X16\t\t\t2\n> > +#define V4L2_VP9_TX_MODE_ALLOW_32X32\t\t\t3\n> > +#define V4L2_VP9_TX_MODE_SELECT\t\t\t\t4\n> > +\n> > +/**\n> > + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> > + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> > + * @tx8: TX 8x8 probability updates.\n> > + * @tx16: TX 16x16 probability updates.\n> > + * @tx32: TX 32x32 probability updates.\n> > + * @coef: coefficient probability updates.\n> > + * @skip: skip probability updates.\n> > + * @inter_mode: inter mode probability updates.\n> > + * @interp_filter: interpolation filter probability updates.\n> > + * @is_inter: is inter-block probability updates.\n> > + * @comp_mode: compound prediction mode probability updates.\n> > + * @single_ref: single ref probability updates.\n> > + * @comp_ref: compound ref probability updates.\n> > + * @y_mode: Y prediction mode probability updates.\n> > + * @uv_mode: UV prediction mode probability updates.\n> > + * @partition: partition probability updates.\n> > + * @mv: motion vector probability updates.\n> > + *\n> > + * This structure holds the probabilities update as parsed in the compressed\n> > + * header (Spec 6.3). These values represent the value of probability update after\n> > + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> > + * means that there is no update of the relevant probability.\n> > + *\n> > + * This control is optional and needs to be used when dealing with the hardware which is\n> > + * not capable of parsing the compressed header itself. Only drivers which need it will\n> > + * implement it.\n> > + */\n> > +struct v4l2_ctrl_vp9_compressed_hdr {\n> > +\t__u8 tx_mode;\n> > +\t__u8 tx8[2][1];\n> > +\t__u8 tx16[2][2];\n> > +\t__u8 tx32[2][3];\n> > +\t__u8 coef[4][2][2][6][6][3];\n> > +\t__u8 skip[3];\n> > +\t__u8 inter_mode[7][3];\n> > +\t__u8 interp_filter[4][2];\n> > +\t__u8 is_inter[4];\n> > +\t__u8 comp_mode[5];\n> > +\t__u8 single_ref[5][2];\n> > +\t__u8 comp_ref[5];\n> > +\t__u8 y_mode[4][9];\n> > +\t__u8 uv_mode[10][9];\n> > +\t__u8 partition[16][3];\n> > +\n> > +\tstruct v4l2_vp9_mv_probs mv;\n> > +};\n> > +\n> >  /* MPEG-compression definitions kept for backwards compatibility */\n> >  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n> >  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> > index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> > --- a/include/linux/videodev2.h\n> > +++ b/include/linux/videodev2.h\n> > @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n> >  /* Grey bit-packed formats */\n> >  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n> >  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> > +#define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n> >\n> >  /* Palette formats */\n> >  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> > @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n> >  /* Tiled YUV formats, non contiguous planes */\n> >  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n> >  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> > +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> > +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n> >\n> >  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n> >  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> > @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n> >  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n> >  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n> >  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> > +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n> >  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n> >  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n> >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> > @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n> >  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n> >  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n> >  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> > +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> > +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n> >\n> > -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> >  #define V4L2_PIX_FMT_IPU3_SBGGR10\tv4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n> >  #define V4L2_PIX_FMT_IPU3_SGBRG10\tv4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n> >  #define V4L2_PIX_FMT_IPU3_SGRBG10\tv4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> > @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n> >  \t\tstruct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n> >  \t\tstruct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n> >  \t\tstruct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> > +\t\tstruct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> > +\t\tstruct v4l2_ctrl_vp9_frame *p_vp9_frame;\n> >  \t\tvoid *ptr;\n> >  \t};\n> >  } __attribute__ ((packed));\n> > @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n> >  \tV4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n> >  \tV4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n> >  \tV4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> > +\n> > +\tV4L2_CTRL_TYPE_VP9_COMPRESSED_HDR\t= 0x0260,\n> > +\tV4L2_CTRL_TYPE_VP9_FRAME\t\t= 0x0261,\n> >  };\n> >\n> >  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9EF19BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Aug 2022 19:47:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C8C3563312;\n\tMon,  1 Aug 2022 21:47:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 60816603E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Aug 2022 21:47:09 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9A6ED48F;\n\tMon,  1 Aug 2022 21:47:08 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659383230;\n\tbh=o1nDTAx89mcuRsqqqimbOGGfQdvMkqYacofaFFe5PVo=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=BMpQPHT1OEcwd0qmhjD2hvExL++5TKNpJir9vxDR8UmFWggYh8pcK+v5bXJt/lxlO\n\t3oqeIx6kH7Cv9DShY8y5SyDmfeh3WCVYTZ0KgQRelrbtFj7oH8pCiEAH/42cxb2voB\n\tQ83LeXG3Jud0e3K0NsRtlhYLu67aonLQveNiRJ6UBNdlpEOHvF8aiC87Owos4HEZl2\n\t062L+vj3h80GM6GB/HcALVxwiWw/o6PXSp5rMd6+2X2dkMGEAJOXEVgrjvW46obg+l\n\t2v+lYvf6I7QbRjOg2GwN7mniYl6HqstdSQXlvDRY4+VT0hr+my1YQz/cQ79de1zUAO\n\tLa5O1Btmg1BTQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659383228;\n\tbh=o1nDTAx89mcuRsqqqimbOGGfQdvMkqYacofaFFe5PVo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ou349z0Er57gyenhiGplwwVlqC98UCeYJMqYYbOepR0yo7tOxKancqum97ftZeKJN\n\t1en+mRatEP41YBqcuipyUaDZc1tLLGFGHnsqM5ehImUOrLum9iUxcsHy9qgaa+5WNx\n\t1maFRJFvv+SRZHz2uDkyoeI2l70j6TfcsSffrtrQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ou349z0E\"; dkim-atps=neutral","Date":"Mon, 1 Aug 2022 22:47:04 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220801151629.spsoekliqb6kxp4c@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24285,"web_url":"https://patchwork.libcamera.org/comment/24285/","msgid":"<20220802074232.enc6jufiker6ncur@uno.localdomain>","date":"2022-08-02T07:42:32","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Ups, forgot\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nChecked that the local changes applied on the previous v5.16-rc7\nversion are still there\n\nOn Mon, Aug 01, 2022 at 10:47:04PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> > On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > > re-instating libcamera local modifications.\n> >\n> > Don't we need something better than this ?\n> >\n> > should we regularly rebase the libcamera-changes on top of a new\n> > header export per each kernel release ?\n> >\n> > Otherwise updating headers and re-applying the local modifications in\n> > one go makes it impossible to actually track what's local and what's\n> > upstream ?\n>\n> This patch was possibly easier to generate than it is to review. The\n> update-kernel-headers.sh script undoes all the local changes, and I've\n> then used git add -p to avoid picking up the reverts. This is a manual\n> process that can lead to errors.\n>\n> On the review side, it's really about making sure that the update\n> doesn't drop any of the features we depend on. It may seem error-prone\n> too, but most (not all though) of the local changes we carry will be\n> detected at compilation time of reverted.\n>\n> The best way to avoid all this is of course to upstream all the changes,\n> and that's something we keep working on, with various delays depending\n> on the features. For instance, patches 02/13 and 03/13 in this series\n> will effectively disappear once we upgrade to the v5.20 kernel headers.\n> Other changes take longer to upstream.\n>\n> I'm open to other ideas to improve the process, but completely\n> overwriting the headers and then reapplying local changes on top will\n> break compilation during bisection.\n>\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  include/linux/README          |   2 +-\n> > >  include/linux/dma-buf.h       |   4 +-\n> > >  include/linux/drm_fourcc.h    |  86 +++++++++-\n> > >  include/linux/intel-ipu3.h    |  35 ++--\n> > >  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n> > >  include/linux/videodev2.h     |  13 +-\n> > >  6 files changed, 418 insertions(+), 23 deletions(-)\n> > >\n> > > diff --git a/include/linux/README b/include/linux/README\n> > > index 4e314b9820ce..9f61517a119a 100644\n> > > --- a/include/linux/README\n> > > +++ b/include/linux/README\n> > > @@ -1,4 +1,4 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >\n> > > -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> > > +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n> > >  modify them manually.\n> > > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> > > index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> > > --- a/include/linux/dma-buf.h\n> > > +++ b/include/linux/dma-buf.h\n> > > @@ -92,7 +92,7 @@ struct dma_buf_sync {\n> > >   * between them in actual uapi, they're just different numbers.\n> > >   */\n> > >  #define DMA_BUF_SET_NAME\t_IOW(DMA_BUF_BASE, 1, const char *)\n> > > -#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, u32)\n> > > -#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, u64)\n> > > +#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, __u32)\n> > > +#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, __u64)\n> > >\n> > >  #endif\n> > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > index ea11dcb405e5..cc69eecc606f 100644\n> > > --- a/include/linux/drm_fourcc.h\n> > > +++ b/include/linux/drm_fourcc.h\n> > > @@ -314,6 +314,13 @@ extern \"C\" {\n> > >   */\n> > >  #define DRM_FORMAT_P016\t\tfourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n> > >\n> > > +/* 2 plane YCbCr420.\n> > > + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> > > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> > > + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> > > + */\n> > > +#define DRM_FORMAT_P030\t\tfourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> > > +\n> > >  /* 3 plane non-subsampled (444) YCbCr\n> > >   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n> > >   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> > > @@ -630,6 +637,53 @@ extern \"C\" {\n> > >   */\n> > >  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n> > >\n> > > +/*\n> > > + * Intel Tile 4 layout\n> > > + *\n> > > + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> > > + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> > > + * only differs from Tile Y at the 256B granularity in between. At this\n> > > + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> > > + * of 64B x 8 rows.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> > > +\n> > > +/*\n> > > + * Intel color control surfaces (CCS) for DG2 render compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> > > +\n> > > +/*\n> > > + * Intel color control surfaces (CCS) for DG2 media compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> > > + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> > > + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> > > + * GEM object in a reserved memory area dedicated for the storage of the\n> > > + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> > > + * pitch is required to be a multiple of four Tile 4 widths.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> > > +\n> > > +/*\n> > > + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> > > + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> > > + * format of the 256 bits of clear color data matches the one used for the\n> > > + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> > > + * for details.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> > > +\n> > >  /*\n> > >   * IPU3 Bayer packing layout\n> > >   *\n> > > @@ -638,7 +692,7 @@ extern \"C\" {\n> > >   * the 6 most significant bits in the last byte unused. The format is little\n> > >   * endian.\n> > >   */\n> > > -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> > > +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n> > >\n> > >  /*\n> > >   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> > > @@ -677,6 +731,28 @@ extern \"C\" {\n> > >   */\n> > >  #define DRM_FORMAT_MOD_QCOM_COMPRESSED\tfourcc_mod_code(QCOM, 1)\n> > >\n> > > +/*\n> > > + * Qualcomm Tiled Format\n> > > + *\n> > > + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> > > + * Implementation may be platform and base-format specific.\n> > > + *\n> > > + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> > > + * Pixel data pitch/stride is aligned with macrotile width.\n> > > + * Pixel data height is aligned with macrotile height.\n> > > + * Entire pixel data buffer is aligned with 4k(bytes).\n> > > + */\n> > > +#define DRM_FORMAT_MOD_QCOM_TILED3\tfourcc_mod_code(QCOM, 3)\n> > > +\n> > > +/*\n> > > + * Qualcomm Alternate Tiled Format\n> > > + *\n> > > + * Alternate tiled format typically only used within GMEM.\n> > > + * Implementation may be platform and base-format specific.\n> > > + */\n> > > +#define DRM_FORMAT_MOD_QCOM_TILED2\tfourcc_mod_code(QCOM, 2)\n> > > +\n> > > +\n> > >  /* Vivante framebuffer modifiers */\n> > >\n> > >  /*\n> > > @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n> > >   * image from Y to reduce the column height, which is not supported\n> > >   * with these modifiers.\n> > > + *\n> > > + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> > > + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> > > + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n> > >   */\n> > >\n> > >  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> > > @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >  #define AMD_FMT_MOD_PIPE_MASK 0x7\n> > >\n> > >  #define AMD_FMT_MOD_SET(field, value) \\\n> > > -\t((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > +\t((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > >  #define AMD_FMT_MOD_GET(field, value) \\\n> > >  \t(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n> > >  #define AMD_FMT_MOD_CLEAR(field) \\\n> > > -\t(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > +\t(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > >\n> > >  /* Mobile Industry Processor Interface (MIPI) modifiers */\n> > >\n> > > diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> > > index f30dce43d1d8..5c298ec557fa 100644\n> > > --- a/include/linux/intel-ipu3.h\n> > > +++ b/include/linux/intel-ipu3.h\n> > > @@ -34,11 +34,17 @@\n> > >   * struct ipu3_uapi_grid_config - Grid plane config\n> > >   *\n> > >   * @width:\tGrid horizontal dimensions, in number of grid blocks(cells).\n> > > + *\t\tFor AWB, the range is (16, 80).\n> > > + *\t\tFor AF/AE, the range is (16, 32).\n> > >   * @height:\tGrid vertical dimensions, in number of grid cells.\n> > > + *\t\tFor AWB, the range is (16, 60).\n> > > + *\t\tFor AF/AE, the range is (16, 24).\n> > >   * @block_width_log2:\tLog2 of the width of each cell in pixels.\n> > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > >   * @block_height_log2:\tLog2 of the height of each cell in pixels.\n> > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > >   * @height_per_slice:\tThe number of blocks in vertical axis per slice.\n> > >   *\t\t\tDefault 2.\n> > >   * @x_start: X value of top left corner of Region of Interest(ROI).\n> > > @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n> > >   * @R_avg:\tRed average in the cell.\n> > >   * @B_avg:\tBlue average in the cell.\n> > >   * @Gb_avg:\tGreen average for blue lines in the cell.\n> > > - * @sat_ratio:\tPercentage of pixels over a given threshold set in\n> > > + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n> > >   *\t\tipu3_uapi_awb_config_s, coded from 0 to 255.\n> > > - * @padding0:\tUnused byte for padding.\n> > > - * @padding1:\tUnused byte for padding.\n> > > - * @padding2:\tUnused byte for padding.\n> > > + * @padding0:   Unused byte for padding.\n> > > + * @padding1:   Unused byte for padding.\n> > > + * @padding2:   Unused byte for padding.\n> > >   */\n> > >  struct ipu3_uapi_awb_set_item {\n> > > -\tunsigned char Gr_avg;\n> > > -\tunsigned char R_avg;\n> > > -\tunsigned char B_avg;\n> > > -\tunsigned char Gb_avg;\n> > > -\tunsigned char sat_ratio;\n> > > -\tunsigned char padding0;\n> > > -\tunsigned char padding1;\n> > > -\tunsigned char padding2;\n> > > +\t__u8 Gr_avg;\n> > > +\t__u8 R_avg;\n> > > +\t__u8 B_avg;\n> > > +\t__u8 Gb_avg;\n> > > +\t__u8 sat_ratio;\n> > > +\t__u8 padding0;\n> > > +\t__u8 padding1;\n> > > +\t__u8 padding2;\n> > >  } __attribute__((packed));\n> > >\n> > >  /*\n> > > @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n> > >  \t(IPU3_UAPI_AWB_MAX_SETS * \\\n> > >  \t (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n> > >\n> > > -\n> > >  /**\n> > >   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n> > >   *\n> > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > index a055d2576253..9d2a8237e712 100644\n> > > --- a/include/linux/v4l2-controls.h\n> > > +++ b/include/linux/v4l2-controls.h\n> > > @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n> > >  \tV4L2_COLORFX_SOLARIZATION\t\t= 13,\n> > >  \tV4L2_COLORFX_ANTIQUE\t\t\t= 14,\n> > >  \tV4L2_COLORFX_SET_CBCR\t\t\t= 15,\n> > > +\tV4L2_COLORFX_SET_RGB\t\t\t= 16,\n> > >  };\n> > >  #define V4L2_CID_AUTOBRIGHTNESS\t\t\t(V4L2_CID_BASE+32)\n> > >  #define V4L2_CID_BAND_STOP_FILTER\t\t(V4L2_CID_BASE+33)\n> > > @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n> > >\n> > >  #define V4L2_CID_ALPHA_COMPONENT\t\t(V4L2_CID_BASE+41)\n> > >  #define V4L2_CID_COLORFX_CBCR\t\t\t(V4L2_CID_BASE+42)\n> > > +#define V4L2_CID_COLORFX_RGB\t\t\t(V4L2_CID_BASE+43)\n> > >\n> > >  /* last CID + 1 */\n> > > -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> > > +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n> > >\n> > >  /* USER-class private control IDs */\n> > >\n> > > @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n> > >   */\n> > >  #define V4L2_CID_USER_ALLEGRO_BASE\t\t(V4L2_CID_USER_BASE + 0x1170)\n> > >\n> > > +/*\n> > > + * The base for the isl7998x driver controls.\n> > > + * We reserve 16 controls for this driver.\n> > > + */\n> > > +#define V4L2_CID_USER_ISL7998X_BASE\t\t(V4L2_CID_USER_BASE + 0x1180)\n> > > +\n> > >  /* MPEG-class control IDs */\n> > >  /* The MPEG controls are applicable to all codec controls\n> > >   * and the 'MPEG' part of the define is historical */\n> > > @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n> > >  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES\t\t(V4L2_CID_CODEC_BASE+234)\n> > >  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR\t\t(V4L2_CID_CODEC_BASE+235)\n> > >  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD\t(V4L2_CID_CODEC_BASE+236)\n> > > +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE\t(V4L2_CID_CODEC_BASE+237)\n> > > +enum v4l2_mpeg_video_intra_refresh_period_type {\n> > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM\t= 0,\n> > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC\t= 1,\n> > > +};\n> > >\n> > >  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n> > >  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL\t\t\t(V4L2_CID_CODEC_BASE+270)\n> > > @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC\t\t0x01\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC\t\t0x02\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD\t0x04\n> > > +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME\t\t0x08\n> > > +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME\t\t0x10\n> > >\n> > >  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 7)\n> > >  /**\n> > > @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n> > >  \t__u32 min_display_mastering_luminance;\n> > >  };\n> > >\n> > > +/* Stateless VP9 controls */\n> > > +\n> > > +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED\t0x1\n> > > +#define\tV4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE\t0x2\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> > > + *\n> > > + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> > > + * chosen reference frame. If this syntax element is not present in the bitstream,\n> > > + * users should pass its last value.\n> > > + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> > > + * chosen mode.\tIf this syntax element is not present in the bitstream, users should\n> > > + * pass its last value.\n> > > + * @level: indicates the loop filter strength.\n> > > + * @sharpness: indicates the sharpness level.\n> > > + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * This structure contains all loop filter related parameters. See sections\n> > > + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_loop_filter {\n> > > +\t__s8 ref_deltas[4];\n> > > +\t__s8 mode_deltas[2];\n> > > +\t__u8 level;\n> > > +\t__u8 sharpness;\n> > > +\t__u8 flags;\n> > > +\t__u8 reserved[7];\n> > > +};\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> > > + *\n> > > + * @base_q_idx: indicates the base frame qindex.\n> > > + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> > > + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> > > + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> > > + * syntax' of the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_quantization {\n> > > +\t__u8 base_q_idx;\n> > > +\t__s8 delta_q_y_dc;\n> > > +\t__s8 delta_q_uv_dc;\n> > > +\t__s8 delta_q_uv_ac;\n> > > +\t__u8 reserved[4];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED\t\t0x01\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP\t\t0x02\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE\t0x04\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA\t\t0x08\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE\t0x10\n> > > +\n> > > +#define V4L2_VP9_SEG_LVL_ALT_Q\t\t\t\t0\n> > > +#define V4L2_VP9_SEG_LVL_ALT_L\t\t\t\t1\n> > > +#define V4L2_VP9_SEG_LVL_REF_FRAME\t\t\t2\n> > > +#define V4L2_VP9_SEG_LVL_SKIP\t\t\t\t3\n> > > +#define V4L2_VP9_SEG_LVL_MAX\t\t\t\t4\n> > > +\n> > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\t(1 << (id))\n> > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK\t0xf\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> > > + *\n> > > + * @feature_data: data attached to each feature. Data entry is only valid if\n> > > + * the feature is enabled. The array shall be indexed with segment number as\n> > > + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> > > + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> > > + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> > > + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> > > + * @tree_probs: specifies the probability values to be used when decoding a\n> > > + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> > > + * for more details.\n> > > + * @pred_probs: specifies the probability values to be used when decoding a\n> > > + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> > > + * for more details.\n> > > + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> > > + * the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_segmentation {\n> > > +\t__s16 feature_data[8][4];\n> > > +\t__u8 feature_enabled[8];\n> > > +\t__u8 tree_probs[7];\n> > > +\t__u8 pred_probs[3];\n> > > +\t__u8 flags;\n> > > +\t__u8 reserved[5];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME\t\t\t0x001\n> > > +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME\t\t\t0x002\n> > > +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT\t\t0x004\n> > > +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY\t\t\t0x008\n> > > +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV\t\t0x010\n> > > +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX\t\t0x020\n> > > +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE\t\t0x040\n> > > +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING\t\t0x080\n> > > +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING\t\t0x100\n> > > +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING\t0x200\n> > > +\n> > > +#define V4L2_VP9_SIGN_BIAS_LAST\t\t\t\t0x1\n> > > +#define V4L2_VP9_SIGN_BIAS_GOLDEN\t\t\t0x2\n> > > +#define V4L2_VP9_SIGN_BIAS_ALT\t\t\t\t0x4\n> > > +\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_NONE\t\t\t0\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_SPEC\t\t\t1\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_ALL\t\t\t2\n> > > +\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP\t\t\t0\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH\t\t1\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP\t\t2\n> > > +#define V4L2_VP9_INTERP_FILTER_BILINEAR\t\t\t3\n> > > +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE\t\t4\n> > > +\n> > > +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE\t0\n> > > +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE\t1\n> > > +#define V4L2_VP9_REFERENCE_MODE_SELECT\t\t\t2\n> > > +\n> > > +#define V4L2_VP9_PROFILE_MAX\t\t\t\t3\n> > > +\n> > > +#define V4L2_CID_STATELESS_VP9_FRAME\t(V4L2_CID_CODEC_STATELESS_BASE + 300)\n> > > +/**\n> > > + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> > > + *\n> > > + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> > > + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> > > + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> > > + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> > > + * @compressed_header_size: compressed header size in bytes.\n> > > + * @uncompressed_header_size: uncompressed header size in bytes.\n> > > + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> > > + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> > > + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > + * to prepare a frame that's ready for scanout.\n> > > + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > + * to prepare a frame that's ready for scanout.\n> > > + * @last_frame_ts: \"last\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> > > + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> > > + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> > > + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> > > + * @frame_context_idx: frame context that should be used/updated.\n> > > + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> > > + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> > > + * 10 and/or 12 bits depths.\n> > > + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> > > + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> > > + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> > > + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> > > + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> > > + * is measured in units of 8x8 blocks).\n> > > + * @reference_mode: specifies the type of inter prediction to be used.\n> > > + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + */\n> > > +struct v4l2_ctrl_vp9_frame {\n> > > +\tstruct v4l2_vp9_loop_filter lf;\n> > > +\tstruct v4l2_vp9_quantization quant;\n> > > +\tstruct v4l2_vp9_segmentation seg;\n> > > +\t__u32 flags;\n> > > +\t__u16 compressed_header_size;\n> > > +\t__u16 uncompressed_header_size;\n> > > +\t__u16 frame_width_minus_1;\n> > > +\t__u16 frame_height_minus_1;\n> > > +\t__u16 render_width_minus_1;\n> > > +\t__u16 render_height_minus_1;\n> > > +\t__u64 last_frame_ts;\n> > > +\t__u64 golden_frame_ts;\n> > > +\t__u64 alt_frame_ts;\n> > > +\t__u8 ref_frame_sign_bias;\n> > > +\t__u8 reset_frame_context;\n> > > +\t__u8 frame_context_idx;\n> > > +\t__u8 profile;\n> > > +\t__u8 bit_depth;\n> > > +\t__u8 interpolation_filter;\n> > > +\t__u8 tile_cols_log2;\n> > > +\t__u8 tile_rows_log2;\n> > > +\t__u8 reference_mode;\n> > > +\t__u8 reserved[7];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_NUM_FRAME_CTX\t4\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> > > + * @joint: motion vector joint probability updates.\n> > > + * @sign: motion vector sign probability updates.\n> > > + * @classes: motion vector class probability updates.\n> > > + * @class0_bit: motion vector class0 bit probability updates.\n> > > + * @bits: motion vector bits probability updates.\n> > > + * @class0_fr: motion vector class0 fractional bit probability updates.\n> > > + * @fr: motion vector fractional bit probability updates.\n> > > + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> > > + * @hp: motion vector high precision fractional bit probability updates.\n> > > + *\n> > > + * This structure contains new values of motion vector probabilities.\n> > > + * A value of zero in an array element means there is no update of the relevant probability.\n> > > + * See `struct v4l2_vp9_prob_updates` for details.\n> > > + */\n> > > +struct v4l2_vp9_mv_probs {\n> > > +\t__u8 joint[3];\n> > > +\t__u8 sign[2];\n> > > +\t__u8 classes[2][10];\n> > > +\t__u8 class0_bit[2];\n> > > +\t__u8 bits[2][10];\n> > > +\t__u8 class0_fr[2][2][3];\n> > > +\t__u8 fr[2][3];\n> > > +\t__u8 class0_hp[2];\n> > > +\t__u8 hp[2];\n> > > +};\n> > > +\n> > > +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR\t(V4L2_CID_CODEC_STATELESS_BASE + 301)\n> > > +\n> > > +#define V4L2_VP9_TX_MODE_ONLY_4X4\t\t\t0\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_8X8\t\t\t1\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_16X16\t\t\t2\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_32X32\t\t\t3\n> > > +#define V4L2_VP9_TX_MODE_SELECT\t\t\t\t4\n> > > +\n> > > +/**\n> > > + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> > > + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> > > + * @tx8: TX 8x8 probability updates.\n> > > + * @tx16: TX 16x16 probability updates.\n> > > + * @tx32: TX 32x32 probability updates.\n> > > + * @coef: coefficient probability updates.\n> > > + * @skip: skip probability updates.\n> > > + * @inter_mode: inter mode probability updates.\n> > > + * @interp_filter: interpolation filter probability updates.\n> > > + * @is_inter: is inter-block probability updates.\n> > > + * @comp_mode: compound prediction mode probability updates.\n> > > + * @single_ref: single ref probability updates.\n> > > + * @comp_ref: compound ref probability updates.\n> > > + * @y_mode: Y prediction mode probability updates.\n> > > + * @uv_mode: UV prediction mode probability updates.\n> > > + * @partition: partition probability updates.\n> > > + * @mv: motion vector probability updates.\n> > > + *\n> > > + * This structure holds the probabilities update as parsed in the compressed\n> > > + * header (Spec 6.3). These values represent the value of probability update after\n> > > + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> > > + * means that there is no update of the relevant probability.\n> > > + *\n> > > + * This control is optional and needs to be used when dealing with the hardware which is\n> > > + * not capable of parsing the compressed header itself. Only drivers which need it will\n> > > + * implement it.\n> > > + */\n> > > +struct v4l2_ctrl_vp9_compressed_hdr {\n> > > +\t__u8 tx_mode;\n> > > +\t__u8 tx8[2][1];\n> > > +\t__u8 tx16[2][2];\n> > > +\t__u8 tx32[2][3];\n> > > +\t__u8 coef[4][2][2][6][6][3];\n> > > +\t__u8 skip[3];\n> > > +\t__u8 inter_mode[7][3];\n> > > +\t__u8 interp_filter[4][2];\n> > > +\t__u8 is_inter[4];\n> > > +\t__u8 comp_mode[5];\n> > > +\t__u8 single_ref[5][2];\n> > > +\t__u8 comp_ref[5];\n> > > +\t__u8 y_mode[4][9];\n> > > +\t__u8 uv_mode[10][9];\n> > > +\t__u8 partition[16][3];\n> > > +\n> > > +\tstruct v4l2_vp9_mv_probs mv;\n> > > +};\n> > > +\n> > >  /* MPEG-compression definitions kept for backwards compatibility */\n> > >  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n> > >  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> > > index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> > > --- a/include/linux/videodev2.h\n> > > +++ b/include/linux/videodev2.h\n> > > @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n> > >  /* Grey bit-packed formats */\n> > >  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n> > >  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> > > +#define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n> > >\n> > >  /* Palette formats */\n> > >  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> > > @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n> > >  /* Tiled YUV formats, non contiguous planes */\n> > >  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n> > >  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> > > +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> > > +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n> > >\n> > >  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n> > >  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> > > @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n> > >  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n> > >  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n> > >  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> > > +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n> > >  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n> > >  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n> > >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> > > @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n> > >  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n> > >  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n> > >  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> > > +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> > > +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n> > >\n> > > -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > >  #define V4L2_PIX_FMT_IPU3_SBGGR10\tv4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n> > >  #define V4L2_PIX_FMT_IPU3_SGBRG10\tv4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n> > >  #define V4L2_PIX_FMT_IPU3_SGRBG10\tv4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> > > @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n> > >  \t\tstruct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n> > >  \t\tstruct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n> > >  \t\tstruct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> > > +\t\tstruct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> > > +\t\tstruct v4l2_ctrl_vp9_frame *p_vp9_frame;\n> > >  \t\tvoid *ptr;\n> > >  \t};\n> > >  } __attribute__ ((packed));\n> > > @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n> > >  \tV4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n> > >  \tV4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n> > >  \tV4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> > > +\n> > > +\tV4L2_CTRL_TYPE_VP9_COMPRESSED_HDR\t= 0x0260,\n> > > +\tV4L2_CTRL_TYPE_VP9_FRAME\t\t= 0x0261,\n> > >  };\n> > >\n> > >  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 81AD8BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 07:42:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DF2DA63312;\n\tTue,  2 Aug 2022 09:42:37 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::223])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2DEC16330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 09:42:36 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 213FD60007;\n\tTue,  2 Aug 2022 07:42:33 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659426157;\n\tbh=tYBWTAqvy9JSn97eeIM1ltJJQZKSRrAREePpJCebiOk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=O8ZrWH4llqjumZAFsxc5K3tMoxlHyXOYj+PPxV3GOI4qnsqwkF98Vk063Yhi5i9Pg\n\tHPjOwNK2ariiKzJihHpQd1ypr5fFfFQosKmSKv3gRpCJ6XTHICt8npXWEP+LpcTUgU\n\tHDI0NUHywGs/qwzA8qSGQHXGh/dHmJQUHQnmGn7o6m2zpaVoKZeG/7HYXcFMLqmvDT\n\t2AltWEfC3kfXwq4L7zd6Q6eO1eJi/+GIuohHi942aEbsD/dUYSNs1zvCVsmhC/uBtJ\n\tN8zZot5EnG/zciOI6DjZ746NDLBLqrYr7TMF0borZYEf0COWvkx1MDK7ShAWPrYr0Q\n\tdVgcqRjjexfzQ==","Date":"Tue, 2 Aug 2022 09:42:32 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220802074232.enc6jufiker6ncur@uno.localdomain>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>\n\t<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24289,"web_url":"https://patchwork.libcamera.org/comment/24289/","msgid":"<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>","date":"2022-08-02T07:52:08","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent\n\nOn Mon, Aug 01, 2022 at 10:47:04PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> On Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> > On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > > re-instating libcamera local modifications.\n> >\n> > Don't we need something better than this ?\n> >\n> > should we regularly rebase the libcamera-changes on top of a new\n> > header export per each kernel release ?\n> >\n> > Otherwise updating headers and re-applying the local modifications in\n> > one go makes it impossible to actually track what's local and what's\n> > upstream ?\n>\n> This patch was possibly easier to generate than it is to review. The\n> update-kernel-headers.sh script undoes all the local changes, and I've\n> then used git add -p to avoid picking up the reverts. This is a manual\n> process that can lead to errors.\n>\n\nThe error-proness is what I'm concerned with\n\n> On the review side, it's really about making sure that the update\n> doesn't drop any of the features we depend on. It may seem error-prone\n> too, but most (not all though) of the local changes we carry will be\n> detected at compilation time of reverted.\n>\n\nTrue that\n\n> The best way to avoid all this is of course to upstream all the changes,\n> and that's something we keep working on, with various delays depending\n> on the features. For instance, patches 02/13 and 03/13 in this series\n> will effectively disappear once we upgrade to the v5.20 kernel headers.\n> Other changes take longer to upstream.\n>\n> I'm open to other ideas to improve the process, but completely\n> overwriting the headers and then reapplying local changes on top will\n> break compilation during bisection.\n\nI can only suggest to do that on the side and compare the output.\nBut that's a suggestion for review more than for development.\n\n\n>\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  include/linux/README          |   2 +-\n> > >  include/linux/dma-buf.h       |   4 +-\n> > >  include/linux/drm_fourcc.h    |  86 +++++++++-\n> > >  include/linux/intel-ipu3.h    |  35 ++--\n> > >  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n> > >  include/linux/videodev2.h     |  13 +-\n> > >  6 files changed, 418 insertions(+), 23 deletions(-)\n> > >\n> > > diff --git a/include/linux/README b/include/linux/README\n> > > index 4e314b9820ce..9f61517a119a 100644\n> > > --- a/include/linux/README\n> > > +++ b/include/linux/README\n> > > @@ -1,4 +1,4 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >\n> > > -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> > > +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n> > >  modify them manually.\n> > > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> > > index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> > > --- a/include/linux/dma-buf.h\n> > > +++ b/include/linux/dma-buf.h\n> > > @@ -92,7 +92,7 @@ struct dma_buf_sync {\n> > >   * between them in actual uapi, they're just different numbers.\n> > >   */\n> > >  #define DMA_BUF_SET_NAME\t_IOW(DMA_BUF_BASE, 1, const char *)\n> > > -#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, u32)\n> > > -#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, u64)\n> > > +#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, __u32)\n> > > +#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, __u64)\n> > >\n> > >  #endif\n> > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > index ea11dcb405e5..cc69eecc606f 100644\n> > > --- a/include/linux/drm_fourcc.h\n> > > +++ b/include/linux/drm_fourcc.h\n> > > @@ -314,6 +314,13 @@ extern \"C\" {\n> > >   */\n> > >  #define DRM_FORMAT_P016\t\tfourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n> > >\n> > > +/* 2 plane YCbCr420.\n> > > + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> > > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> > > + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> > > + */\n> > > +#define DRM_FORMAT_P030\t\tfourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> > > +\n> > >  /* 3 plane non-subsampled (444) YCbCr\n> > >   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n> > >   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> > > @@ -630,6 +637,53 @@ extern \"C\" {\n> > >   */\n> > >  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n> > >\n> > > +/*\n> > > + * Intel Tile 4 layout\n> > > + *\n> > > + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> > > + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> > > + * only differs from Tile Y at the 256B granularity in between. At this\n> > > + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> > > + * of 64B x 8 rows.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> > > +\n> > > +/*\n> > > + * Intel color control surfaces (CCS) for DG2 render compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> > > +\n> > > +/*\n> > > + * Intel color control surfaces (CCS) for DG2 media compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> > > + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> > > + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> > > + * GEM object in a reserved memory area dedicated for the storage of the\n> > > + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> > > + * pitch is required to be a multiple of four Tile 4 widths.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> > > +\n> > > +/*\n> > > + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> > > + *\n> > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> > > + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> > > + * format of the 256 bits of clear color data matches the one used for the\n> > > + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> > > + * for details.\n> > > + */\n> > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> > > +\n> > >  /*\n> > >   * IPU3 Bayer packing layout\n> > >   *\n> > > @@ -638,7 +692,7 @@ extern \"C\" {\n> > >   * the 6 most significant bits in the last byte unused. The format is little\n> > >   * endian.\n> > >   */\n> > > -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> > > +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n> > >\n> > >  /*\n> > >   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> > > @@ -677,6 +731,28 @@ extern \"C\" {\n> > >   */\n> > >  #define DRM_FORMAT_MOD_QCOM_COMPRESSED\tfourcc_mod_code(QCOM, 1)\n> > >\n> > > +/*\n> > > + * Qualcomm Tiled Format\n> > > + *\n> > > + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> > > + * Implementation may be platform and base-format specific.\n> > > + *\n> > > + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> > > + * Pixel data pitch/stride is aligned with macrotile width.\n> > > + * Pixel data height is aligned with macrotile height.\n> > > + * Entire pixel data buffer is aligned with 4k(bytes).\n> > > + */\n> > > +#define DRM_FORMAT_MOD_QCOM_TILED3\tfourcc_mod_code(QCOM, 3)\n> > > +\n> > > +/*\n> > > + * Qualcomm Alternate Tiled Format\n> > > + *\n> > > + * Alternate tiled format typically only used within GMEM.\n> > > + * Implementation may be platform and base-format specific.\n> > > + */\n> > > +#define DRM_FORMAT_MOD_QCOM_TILED2\tfourcc_mod_code(QCOM, 2)\n> > > +\n> > > +\n> > >  /* Vivante framebuffer modifiers */\n> > >\n> > >  /*\n> > > @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n> > >   * image from Y to reduce the column height, which is not supported\n> > >   * with these modifiers.\n> > > + *\n> > > + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> > > + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> > > + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n> > >   */\n> > >\n> > >  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> > > @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >  #define AMD_FMT_MOD_PIPE_MASK 0x7\n> > >\n> > >  #define AMD_FMT_MOD_SET(field, value) \\\n> > > -\t((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > +\t((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > >  #define AMD_FMT_MOD_GET(field, value) \\\n> > >  \t(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n> > >  #define AMD_FMT_MOD_CLEAR(field) \\\n> > > -\t(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > +\t(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > >\n> > >  /* Mobile Industry Processor Interface (MIPI) modifiers */\n> > >\n> > > diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> > > index f30dce43d1d8..5c298ec557fa 100644\n> > > --- a/include/linux/intel-ipu3.h\n> > > +++ b/include/linux/intel-ipu3.h\n> > > @@ -34,11 +34,17 @@\n> > >   * struct ipu3_uapi_grid_config - Grid plane config\n> > >   *\n> > >   * @width:\tGrid horizontal dimensions, in number of grid blocks(cells).\n> > > + *\t\tFor AWB, the range is (16, 80).\n> > > + *\t\tFor AF/AE, the range is (16, 32).\n> > >   * @height:\tGrid vertical dimensions, in number of grid cells.\n> > > + *\t\tFor AWB, the range is (16, 60).\n> > > + *\t\tFor AF/AE, the range is (16, 24).\n> > >   * @block_width_log2:\tLog2 of the width of each cell in pixels.\n> > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > >   * @block_height_log2:\tLog2 of the height of each cell in pixels.\n> > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > >   * @height_per_slice:\tThe number of blocks in vertical axis per slice.\n> > >   *\t\t\tDefault 2.\n> > >   * @x_start: X value of top left corner of Region of Interest(ROI).\n> > > @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n> > >   * @R_avg:\tRed average in the cell.\n> > >   * @B_avg:\tBlue average in the cell.\n> > >   * @Gb_avg:\tGreen average for blue lines in the cell.\n> > > - * @sat_ratio:\tPercentage of pixels over a given threshold set in\n> > > + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n> > >   *\t\tipu3_uapi_awb_config_s, coded from 0 to 255.\n> > > - * @padding0:\tUnused byte for padding.\n> > > - * @padding1:\tUnused byte for padding.\n> > > - * @padding2:\tUnused byte for padding.\n> > > + * @padding0:   Unused byte for padding.\n> > > + * @padding1:   Unused byte for padding.\n> > > + * @padding2:   Unused byte for padding.\n> > >   */\n> > >  struct ipu3_uapi_awb_set_item {\n> > > -\tunsigned char Gr_avg;\n> > > -\tunsigned char R_avg;\n> > > -\tunsigned char B_avg;\n> > > -\tunsigned char Gb_avg;\n> > > -\tunsigned char sat_ratio;\n> > > -\tunsigned char padding0;\n> > > -\tunsigned char padding1;\n> > > -\tunsigned char padding2;\n> > > +\t__u8 Gr_avg;\n> > > +\t__u8 R_avg;\n> > > +\t__u8 B_avg;\n> > > +\t__u8 Gb_avg;\n> > > +\t__u8 sat_ratio;\n> > > +\t__u8 padding0;\n> > > +\t__u8 padding1;\n> > > +\t__u8 padding2;\n> > >  } __attribute__((packed));\n> > >\n> > >  /*\n> > > @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n> > >  \t(IPU3_UAPI_AWB_MAX_SETS * \\\n> > >  \t (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n> > >\n> > > -\n> > >  /**\n> > >   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n> > >   *\n> > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > index a055d2576253..9d2a8237e712 100644\n> > > --- a/include/linux/v4l2-controls.h\n> > > +++ b/include/linux/v4l2-controls.h\n> > > @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n> > >  \tV4L2_COLORFX_SOLARIZATION\t\t= 13,\n> > >  \tV4L2_COLORFX_ANTIQUE\t\t\t= 14,\n> > >  \tV4L2_COLORFX_SET_CBCR\t\t\t= 15,\n> > > +\tV4L2_COLORFX_SET_RGB\t\t\t= 16,\n> > >  };\n> > >  #define V4L2_CID_AUTOBRIGHTNESS\t\t\t(V4L2_CID_BASE+32)\n> > >  #define V4L2_CID_BAND_STOP_FILTER\t\t(V4L2_CID_BASE+33)\n> > > @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n> > >\n> > >  #define V4L2_CID_ALPHA_COMPONENT\t\t(V4L2_CID_BASE+41)\n> > >  #define V4L2_CID_COLORFX_CBCR\t\t\t(V4L2_CID_BASE+42)\n> > > +#define V4L2_CID_COLORFX_RGB\t\t\t(V4L2_CID_BASE+43)\n> > >\n> > >  /* last CID + 1 */\n> > > -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> > > +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n> > >\n> > >  /* USER-class private control IDs */\n> > >\n> > > @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n> > >   */\n> > >  #define V4L2_CID_USER_ALLEGRO_BASE\t\t(V4L2_CID_USER_BASE + 0x1170)\n> > >\n> > > +/*\n> > > + * The base for the isl7998x driver controls.\n> > > + * We reserve 16 controls for this driver.\n> > > + */\n> > > +#define V4L2_CID_USER_ISL7998X_BASE\t\t(V4L2_CID_USER_BASE + 0x1180)\n> > > +\n> > >  /* MPEG-class control IDs */\n> > >  /* The MPEG controls are applicable to all codec controls\n> > >   * and the 'MPEG' part of the define is historical */\n> > > @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n> > >  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES\t\t(V4L2_CID_CODEC_BASE+234)\n> > >  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR\t\t(V4L2_CID_CODEC_BASE+235)\n> > >  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD\t(V4L2_CID_CODEC_BASE+236)\n> > > +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE\t(V4L2_CID_CODEC_BASE+237)\n> > > +enum v4l2_mpeg_video_intra_refresh_period_type {\n> > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM\t= 0,\n> > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC\t= 1,\n> > > +};\n> > >\n> > >  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n> > >  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL\t\t\t(V4L2_CID_CODEC_BASE+270)\n> > > @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC\t\t0x01\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC\t\t0x02\n> > >  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD\t0x04\n> > > +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME\t\t0x08\n> > > +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME\t\t0x10\n> > >\n> > >  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 7)\n> > >  /**\n> > > @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n> > >  \t__u32 min_display_mastering_luminance;\n> > >  };\n> > >\n> > > +/* Stateless VP9 controls */\n> > > +\n> > > +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED\t0x1\n> > > +#define\tV4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE\t0x2\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> > > + *\n> > > + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> > > + * chosen reference frame. If this syntax element is not present in the bitstream,\n> > > + * users should pass its last value.\n> > > + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> > > + * chosen mode.\tIf this syntax element is not present in the bitstream, users should\n> > > + * pass its last value.\n> > > + * @level: indicates the loop filter strength.\n> > > + * @sharpness: indicates the sharpness level.\n> > > + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * This structure contains all loop filter related parameters. See sections\n> > > + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_loop_filter {\n> > > +\t__s8 ref_deltas[4];\n> > > +\t__s8 mode_deltas[2];\n> > > +\t__u8 level;\n> > > +\t__u8 sharpness;\n> > > +\t__u8 flags;\n> > > +\t__u8 reserved[7];\n> > > +};\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> > > + *\n> > > + * @base_q_idx: indicates the base frame qindex.\n> > > + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> > > + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> > > + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> > > + * syntax' of the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_quantization {\n> > > +\t__u8 base_q_idx;\n> > > +\t__s8 delta_q_y_dc;\n> > > +\t__s8 delta_q_uv_dc;\n> > > +\t__s8 delta_q_uv_ac;\n> > > +\t__u8 reserved[4];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED\t\t0x01\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP\t\t0x02\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE\t0x04\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA\t\t0x08\n> > > +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE\t0x10\n> > > +\n> > > +#define V4L2_VP9_SEG_LVL_ALT_Q\t\t\t\t0\n> > > +#define V4L2_VP9_SEG_LVL_ALT_L\t\t\t\t1\n> > > +#define V4L2_VP9_SEG_LVL_REF_FRAME\t\t\t2\n> > > +#define V4L2_VP9_SEG_LVL_SKIP\t\t\t\t3\n> > > +#define V4L2_VP9_SEG_LVL_MAX\t\t\t\t4\n> > > +\n> > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\t(1 << (id))\n> > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK\t0xf\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> > > + *\n> > > + * @feature_data: data attached to each feature. Data entry is only valid if\n> > > + * the feature is enabled. The array shall be indexed with segment number as\n> > > + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> > > + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> > > + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> > > + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> > > + * @tree_probs: specifies the probability values to be used when decoding a\n> > > + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> > > + * for more details.\n> > > + * @pred_probs: specifies the probability values to be used when decoding a\n> > > + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> > > + * for more details.\n> > > + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + *\n> > > + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> > > + * the VP9 specification for more details.\n> > > + */\n> > > +struct v4l2_vp9_segmentation {\n> > > +\t__s16 feature_data[8][4];\n> > > +\t__u8 feature_enabled[8];\n> > > +\t__u8 tree_probs[7];\n> > > +\t__u8 pred_probs[3];\n> > > +\t__u8 flags;\n> > > +\t__u8 reserved[5];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME\t\t\t0x001\n> > > +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME\t\t\t0x002\n> > > +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT\t\t0x004\n> > > +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY\t\t\t0x008\n> > > +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV\t\t0x010\n> > > +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX\t\t0x020\n> > > +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE\t\t0x040\n> > > +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING\t\t0x080\n> > > +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING\t\t0x100\n> > > +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING\t0x200\n> > > +\n> > > +#define V4L2_VP9_SIGN_BIAS_LAST\t\t\t\t0x1\n> > > +#define V4L2_VP9_SIGN_BIAS_GOLDEN\t\t\t0x2\n> > > +#define V4L2_VP9_SIGN_BIAS_ALT\t\t\t\t0x4\n> > > +\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_NONE\t\t\t0\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_SPEC\t\t\t1\n> > > +#define V4L2_VP9_RESET_FRAME_CTX_ALL\t\t\t2\n> > > +\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP\t\t\t0\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH\t\t1\n> > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP\t\t2\n> > > +#define V4L2_VP9_INTERP_FILTER_BILINEAR\t\t\t3\n> > > +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE\t\t4\n> > > +\n> > > +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE\t0\n> > > +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE\t1\n> > > +#define V4L2_VP9_REFERENCE_MODE_SELECT\t\t\t2\n> > > +\n> > > +#define V4L2_VP9_PROFILE_MAX\t\t\t\t3\n> > > +\n> > > +#define V4L2_CID_STATELESS_VP9_FRAME\t(V4L2_CID_CODEC_STATELESS_BASE + 300)\n> > > +/**\n> > > + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> > > + *\n> > > + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> > > + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> > > + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> > > + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> > > + * @compressed_header_size: compressed header size in bytes.\n> > > + * @uncompressed_header_size: uncompressed header size in bytes.\n> > > + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> > > + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> > > + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > + * to prepare a frame that's ready for scanout.\n> > > + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > + * to prepare a frame that's ready for scanout.\n> > > + * @last_frame_ts: \"last\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> > > + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> > > + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> > > + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> > > + * @frame_context_idx: frame context that should be used/updated.\n> > > + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> > > + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> > > + * 10 and/or 12 bits depths.\n> > > + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> > > + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> > > + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> > > + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> > > + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> > > + * is measured in units of 8x8 blocks).\n> > > + * @reference_mode: specifies the type of inter prediction to be used.\n> > > + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> > > + * @reserved: padding field. Should be zeroed by applications.\n> > > + */\n> > > +struct v4l2_ctrl_vp9_frame {\n> > > +\tstruct v4l2_vp9_loop_filter lf;\n> > > +\tstruct v4l2_vp9_quantization quant;\n> > > +\tstruct v4l2_vp9_segmentation seg;\n> > > +\t__u32 flags;\n> > > +\t__u16 compressed_header_size;\n> > > +\t__u16 uncompressed_header_size;\n> > > +\t__u16 frame_width_minus_1;\n> > > +\t__u16 frame_height_minus_1;\n> > > +\t__u16 render_width_minus_1;\n> > > +\t__u16 render_height_minus_1;\n> > > +\t__u64 last_frame_ts;\n> > > +\t__u64 golden_frame_ts;\n> > > +\t__u64 alt_frame_ts;\n> > > +\t__u8 ref_frame_sign_bias;\n> > > +\t__u8 reset_frame_context;\n> > > +\t__u8 frame_context_idx;\n> > > +\t__u8 profile;\n> > > +\t__u8 bit_depth;\n> > > +\t__u8 interpolation_filter;\n> > > +\t__u8 tile_cols_log2;\n> > > +\t__u8 tile_rows_log2;\n> > > +\t__u8 reference_mode;\n> > > +\t__u8 reserved[7];\n> > > +};\n> > > +\n> > > +#define V4L2_VP9_NUM_FRAME_CTX\t4\n> > > +\n> > > +/**\n> > > + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> > > + * @joint: motion vector joint probability updates.\n> > > + * @sign: motion vector sign probability updates.\n> > > + * @classes: motion vector class probability updates.\n> > > + * @class0_bit: motion vector class0 bit probability updates.\n> > > + * @bits: motion vector bits probability updates.\n> > > + * @class0_fr: motion vector class0 fractional bit probability updates.\n> > > + * @fr: motion vector fractional bit probability updates.\n> > > + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> > > + * @hp: motion vector high precision fractional bit probability updates.\n> > > + *\n> > > + * This structure contains new values of motion vector probabilities.\n> > > + * A value of zero in an array element means there is no update of the relevant probability.\n> > > + * See `struct v4l2_vp9_prob_updates` for details.\n> > > + */\n> > > +struct v4l2_vp9_mv_probs {\n> > > +\t__u8 joint[3];\n> > > +\t__u8 sign[2];\n> > > +\t__u8 classes[2][10];\n> > > +\t__u8 class0_bit[2];\n> > > +\t__u8 bits[2][10];\n> > > +\t__u8 class0_fr[2][2][3];\n> > > +\t__u8 fr[2][3];\n> > > +\t__u8 class0_hp[2];\n> > > +\t__u8 hp[2];\n> > > +};\n> > > +\n> > > +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR\t(V4L2_CID_CODEC_STATELESS_BASE + 301)\n> > > +\n> > > +#define V4L2_VP9_TX_MODE_ONLY_4X4\t\t\t0\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_8X8\t\t\t1\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_16X16\t\t\t2\n> > > +#define V4L2_VP9_TX_MODE_ALLOW_32X32\t\t\t3\n> > > +#define V4L2_VP9_TX_MODE_SELECT\t\t\t\t4\n> > > +\n> > > +/**\n> > > + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> > > + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> > > + * @tx8: TX 8x8 probability updates.\n> > > + * @tx16: TX 16x16 probability updates.\n> > > + * @tx32: TX 32x32 probability updates.\n> > > + * @coef: coefficient probability updates.\n> > > + * @skip: skip probability updates.\n> > > + * @inter_mode: inter mode probability updates.\n> > > + * @interp_filter: interpolation filter probability updates.\n> > > + * @is_inter: is inter-block probability updates.\n> > > + * @comp_mode: compound prediction mode probability updates.\n> > > + * @single_ref: single ref probability updates.\n> > > + * @comp_ref: compound ref probability updates.\n> > > + * @y_mode: Y prediction mode probability updates.\n> > > + * @uv_mode: UV prediction mode probability updates.\n> > > + * @partition: partition probability updates.\n> > > + * @mv: motion vector probability updates.\n> > > + *\n> > > + * This structure holds the probabilities update as parsed in the compressed\n> > > + * header (Spec 6.3). These values represent the value of probability update after\n> > > + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> > > + * means that there is no update of the relevant probability.\n> > > + *\n> > > + * This control is optional and needs to be used when dealing with the hardware which is\n> > > + * not capable of parsing the compressed header itself. Only drivers which need it will\n> > > + * implement it.\n> > > + */\n> > > +struct v4l2_ctrl_vp9_compressed_hdr {\n> > > +\t__u8 tx_mode;\n> > > +\t__u8 tx8[2][1];\n> > > +\t__u8 tx16[2][2];\n> > > +\t__u8 tx32[2][3];\n> > > +\t__u8 coef[4][2][2][6][6][3];\n> > > +\t__u8 skip[3];\n> > > +\t__u8 inter_mode[7][3];\n> > > +\t__u8 interp_filter[4][2];\n> > > +\t__u8 is_inter[4];\n> > > +\t__u8 comp_mode[5];\n> > > +\t__u8 single_ref[5][2];\n> > > +\t__u8 comp_ref[5];\n> > > +\t__u8 y_mode[4][9];\n> > > +\t__u8 uv_mode[10][9];\n> > > +\t__u8 partition[16][3];\n> > > +\n> > > +\tstruct v4l2_vp9_mv_probs mv;\n> > > +};\n> > > +\n> > >  /* MPEG-compression definitions kept for backwards compatibility */\n> > >  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n> > >  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> > > index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> > > --- a/include/linux/videodev2.h\n> > > +++ b/include/linux/videodev2.h\n> > > @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n> > >  /* Grey bit-packed formats */\n> > >  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n> > >  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> > > +#define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n> > >\n> > >  /* Palette formats */\n> > >  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> > > @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n> > >  /* Tiled YUV formats, non contiguous planes */\n> > >  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n> > >  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> > > +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> > > +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n> > >\n> > >  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n> > >  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> > > @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n> > >  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n> > >  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n> > >  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> > > +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n> > >  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n> > >  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n> > >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> > > @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n> > >  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n> > >  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n> > >  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> > > +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> > > +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n> > >\n> > > -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > >  #define V4L2_PIX_FMT_IPU3_SBGGR10\tv4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n> > >  #define V4L2_PIX_FMT_IPU3_SGBRG10\tv4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n> > >  #define V4L2_PIX_FMT_IPU3_SGRBG10\tv4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> > > @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n> > >  \t\tstruct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n> > >  \t\tstruct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n> > >  \t\tstruct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> > > +\t\tstruct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> > > +\t\tstruct v4l2_ctrl_vp9_frame *p_vp9_frame;\n> > >  \t\tvoid *ptr;\n> > >  \t};\n> > >  } __attribute__ ((packed));\n> > > @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n> > >  \tV4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n> > >  \tV4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n> > >  \tV4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> > > +\n> > > +\tV4L2_CTRL_TYPE_VP9_COMPRESSED_HDR\t= 0x0260,\n> > > +\tV4L2_CTRL_TYPE_VP9_FRAME\t\t= 0x0261,\n> > >  };\n> > >\n> > >  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A482EBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 07:52:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B1AF6330F;\n\tTue,  2 Aug 2022 09:52:13 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C76DE6330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 09:52:11 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 30D5E200010;\n\tTue,  2 Aug 2022 07:52:09 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659426733;\n\tbh=SQfya70dltagIF0QeHCO1cKRKvtZTvfGDSDjLa+FLc4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=dsoDXwlDWtaKSm6encF7dmeyH0IiCyQ7vsR3akvNxg9bIvT+6T3zA2ZN9flUfW+ZB\n\tIMYFnhJRZNft+Qnclz6m4QQQ3ACIq5gS711AJb6IYK/YA3TcqrB7DGMXpIVwAAobRF\n\tPKlCMadNmscwjV8Vqwe9NhjMiUdKxQ59yPqHmVlCGMQ6ZHr+Jg9/NzxJrdf+ClQZkb\n\tZNYywzjNhl/RgG+2QW+NljbN91XeC3uTOrd6EjLHbYekYhMhXK9xrHurqRlusTrPiI\n\ti6owpLJiWqxDdpNogUe6/WrB08imSq32Mv7Gud4mI3CUbNLTjCDyu6HZsBx7MdqUV+\n\tEdp2vRURQMF2A==","Date":"Tue, 2 Aug 2022 09:52:08 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>\n\t<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24293,"web_url":"https://patchwork.libcamera.org/comment/24293/","msgid":"<Yuj6ozm3r7SutbIo@pendragon.ideasonboard.com>","date":"2022-08-02T10:21:23","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Tue, Aug 02, 2022 at 09:52:08AM +0200, Jacopo Mondi wrote:\n> On Mon, Aug 01, 2022 at 10:47:04PM +0300, Laurent Pinchart wrote:\n> > On Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> > > On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > > > re-instating libcamera local modifications.\n> > >\n> > > Don't we need something better than this ?\n> > >\n> > > should we regularly rebase the libcamera-changes on top of a new\n> > > header export per each kernel release ?\n> > >\n> > > Otherwise updating headers and re-applying the local modifications in\n> > > one go makes it impossible to actually track what's local and what's\n> > > upstream ?\n> >\n> > This patch was possibly easier to generate than it is to review. The\n> > update-kernel-headers.sh script undoes all the local changes, and I've\n> > then used git add -p to avoid picking up the reverts. This is a manual\n> > process that can lead to errors.\n> \n> The error-proness is what I'm concerned with\n> \n> > On the review side, it's really about making sure that the update\n> > doesn't drop any of the features we depend on. It may seem error-prone\n> > too, but most (not all though) of the local changes we carry will be\n> > detected at compilation time of reverted.\n> \n> True that\n> \n> > The best way to avoid all this is of course to upstream all the changes,\n> > and that's something we keep working on, with various delays depending\n> > on the features. For instance, patches 02/13 and 03/13 in this series\n> > will effectively disappear once we upgrade to the v5.20 kernel headers.\n> > Other changes take longer to upstream.\n> >\n> > I'm open to other ideas to improve the process, but completely\n> > overwriting the headers and then reapplying local changes on top will\n> > break compilation during bisection.\n> \n> I can only suggest to do that on the side and compare the output.\n> But that's a suggestion for review more than for development.\n\nWe could indeed post the change as two patches, one that overwrites\neverything, and the second one that reapplies our local changes, and\nsquash when pushing.\n\n> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > ---\n> > > >  include/linux/README          |   2 +-\n> > > >  include/linux/dma-buf.h       |   4 +-\n> > > >  include/linux/drm_fourcc.h    |  86 +++++++++-\n> > > >  include/linux/intel-ipu3.h    |  35 ++--\n> > > >  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n> > > >  include/linux/videodev2.h     |  13 +-\n> > > >  6 files changed, 418 insertions(+), 23 deletions(-)\n> > > >\n> > > > diff --git a/include/linux/README b/include/linux/README\n> > > > index 4e314b9820ce..9f61517a119a 100644\n> > > > --- a/include/linux/README\n> > > > +++ b/include/linux/README\n> > > > @@ -1,4 +1,4 @@\n> > > >  # SPDX-License-Identifier: CC0-1.0\n> > > >\n> > > > -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> > > > +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n> > > >  modify them manually.\n> > > > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> > > > index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> > > > --- a/include/linux/dma-buf.h\n> > > > +++ b/include/linux/dma-buf.h\n> > > > @@ -92,7 +92,7 @@ struct dma_buf_sync {\n> > > >   * between them in actual uapi, they're just different numbers.\n> > > >   */\n> > > >  #define DMA_BUF_SET_NAME\t_IOW(DMA_BUF_BASE, 1, const char *)\n> > > > -#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, u32)\n> > > > -#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, u64)\n> > > > +#define DMA_BUF_SET_NAME_A\t_IOW(DMA_BUF_BASE, 1, __u32)\n> > > > +#define DMA_BUF_SET_NAME_B\t_IOW(DMA_BUF_BASE, 1, __u64)\n> > > >\n> > > >  #endif\n> > > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > > index ea11dcb405e5..cc69eecc606f 100644\n> > > > --- a/include/linux/drm_fourcc.h\n> > > > +++ b/include/linux/drm_fourcc.h\n> > > > @@ -314,6 +314,13 @@ extern \"C\" {\n> > > >   */\n> > > >  #define DRM_FORMAT_P016\t\tfourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n> > > >\n> > > > +/* 2 plane YCbCr420.\n> > > > + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> > > > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> > > > + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> > > > + */\n> > > > +#define DRM_FORMAT_P030\t\tfourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> > > > +\n> > > >  /* 3 plane non-subsampled (444) YCbCr\n> > > >   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n> > > >   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> > > > @@ -630,6 +637,53 @@ extern \"C\" {\n> > > >   */\n> > > >  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n> > > >\n> > > > +/*\n> > > > + * Intel Tile 4 layout\n> > > > + *\n> > > > + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> > > > + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> > > > + * only differs from Tile Y at the 256B granularity in between. At this\n> > > > + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> > > > + * of 64B x 8 rows.\n> > > > + */\n> > > > +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> > > > +\n> > > > +/*\n> > > > + * Intel color control surfaces (CCS) for DG2 render compression.\n> > > > + *\n> > > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > > + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> > > > + */\n> > > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> > > > +\n> > > > +/*\n> > > > + * Intel color control surfaces (CCS) for DG2 media compression.\n> > > > + *\n> > > > + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> > > > + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> > > > + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> > > > + * GEM object in a reserved memory area dedicated for the storage of the\n> > > > + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> > > > + * pitch is required to be a multiple of four Tile 4 widths.\n> > > > + */\n> > > > +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> > > > +\n> > > > +/*\n> > > > + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> > > > + *\n> > > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > > + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> > > > + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> > > > + * format of the 256 bits of clear color data matches the one used for the\n> > > > + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> > > > + * for details.\n> > > > + */\n> > > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> > > > +\n> > > >  /*\n> > > >   * IPU3 Bayer packing layout\n> > > >   *\n> > > > @@ -638,7 +692,7 @@ extern \"C\" {\n> > > >   * the 6 most significant bits in the last byte unused. The format is little\n> > > >   * endian.\n> > > >   */\n> > > > -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> > > > +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n> > > >\n> > > >  /*\n> > > >   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> > > > @@ -677,6 +731,28 @@ extern \"C\" {\n> > > >   */\n> > > >  #define DRM_FORMAT_MOD_QCOM_COMPRESSED\tfourcc_mod_code(QCOM, 1)\n> > > >\n> > > > +/*\n> > > > + * Qualcomm Tiled Format\n> > > > + *\n> > > > + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> > > > + * Implementation may be platform and base-format specific.\n> > > > + *\n> > > > + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> > > > + * Pixel data pitch/stride is aligned with macrotile width.\n> > > > + * Pixel data height is aligned with macrotile height.\n> > > > + * Entire pixel data buffer is aligned with 4k(bytes).\n> > > > + */\n> > > > +#define DRM_FORMAT_MOD_QCOM_TILED3\tfourcc_mod_code(QCOM, 3)\n> > > > +\n> > > > +/*\n> > > > + * Qualcomm Alternate Tiled Format\n> > > > + *\n> > > > + * Alternate tiled format typically only used within GMEM.\n> > > > + * Implementation may be platform and base-format specific.\n> > > > + */\n> > > > +#define DRM_FORMAT_MOD_QCOM_TILED2\tfourcc_mod_code(QCOM, 2)\n> > > > +\n> > > > +\n> > > >  /* Vivante framebuffer modifiers */\n> > > >\n> > > >  /*\n> > > > @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > > >   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n> > > >   * image from Y to reduce the column height, which is not supported\n> > > >   * with these modifiers.\n> > > > + *\n> > > > + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> > > > + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> > > > + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n> > > >   */\n> > > >\n> > > >  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> > > > @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > > >  #define AMD_FMT_MOD_PIPE_MASK 0x7\n> > > >\n> > > >  #define AMD_FMT_MOD_SET(field, value) \\\n> > > > -\t((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > > +\t((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > >  #define AMD_FMT_MOD_GET(field, value) \\\n> > > >  \t(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n> > > >  #define AMD_FMT_MOD_CLEAR(field) \\\n> > > > -\t(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > > +\t(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > >\n> > > >  /* Mobile Industry Processor Interface (MIPI) modifiers */\n> > > >\n> > > > diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> > > > index f30dce43d1d8..5c298ec557fa 100644\n> > > > --- a/include/linux/intel-ipu3.h\n> > > > +++ b/include/linux/intel-ipu3.h\n> > > > @@ -34,11 +34,17 @@\n> > > >   * struct ipu3_uapi_grid_config - Grid plane config\n> > > >   *\n> > > >   * @width:\tGrid horizontal dimensions, in number of grid blocks(cells).\n> > > > + *\t\tFor AWB, the range is (16, 80).\n> > > > + *\t\tFor AF/AE, the range is (16, 32).\n> > > >   * @height:\tGrid vertical dimensions, in number of grid cells.\n> > > > + *\t\tFor AWB, the range is (16, 60).\n> > > > + *\t\tFor AF/AE, the range is (16, 24).\n> > > >   * @block_width_log2:\tLog2 of the width of each cell in pixels.\n> > > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > > >   * @block_height_log2:\tLog2 of the height of each cell in pixels.\n> > > > - *\t\t\tfor (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > > + *\t\t\tFor AWB, the range is [3, 6].\n> > > > + *\t\t\tFor AF/AE, the range is [3, 7].\n> > > >   * @height_per_slice:\tThe number of blocks in vertical axis per slice.\n> > > >   *\t\t\tDefault 2.\n> > > >   * @x_start: X value of top left corner of Region of Interest(ROI).\n> > > > @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n> > > >   * @R_avg:\tRed average in the cell.\n> > > >   * @B_avg:\tBlue average in the cell.\n> > > >   * @Gb_avg:\tGreen average for blue lines in the cell.\n> > > > - * @sat_ratio:\tPercentage of pixels over a given threshold set in\n> > > > + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n> > > >   *\t\tipu3_uapi_awb_config_s, coded from 0 to 255.\n> > > > - * @padding0:\tUnused byte for padding.\n> > > > - * @padding1:\tUnused byte for padding.\n> > > > - * @padding2:\tUnused byte for padding.\n> > > > + * @padding0:   Unused byte for padding.\n> > > > + * @padding1:   Unused byte for padding.\n> > > > + * @padding2:   Unused byte for padding.\n> > > >   */\n> > > >  struct ipu3_uapi_awb_set_item {\n> > > > -\tunsigned char Gr_avg;\n> > > > -\tunsigned char R_avg;\n> > > > -\tunsigned char B_avg;\n> > > > -\tunsigned char Gb_avg;\n> > > > -\tunsigned char sat_ratio;\n> > > > -\tunsigned char padding0;\n> > > > -\tunsigned char padding1;\n> > > > -\tunsigned char padding2;\n> > > > +\t__u8 Gr_avg;\n> > > > +\t__u8 R_avg;\n> > > > +\t__u8 B_avg;\n> > > > +\t__u8 Gb_avg;\n> > > > +\t__u8 sat_ratio;\n> > > > +\t__u8 padding0;\n> > > > +\t__u8 padding1;\n> > > > +\t__u8 padding2;\n> > > >  } __attribute__((packed));\n> > > >\n> > > >  /*\n> > > > @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n> > > >  \t(IPU3_UAPI_AWB_MAX_SETS * \\\n> > > >  \t (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n> > > >\n> > > > -\n> > > >  /**\n> > > >   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n> > > >   *\n> > > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > > index a055d2576253..9d2a8237e712 100644\n> > > > --- a/include/linux/v4l2-controls.h\n> > > > +++ b/include/linux/v4l2-controls.h\n> > > > @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n> > > >  \tV4L2_COLORFX_SOLARIZATION\t\t= 13,\n> > > >  \tV4L2_COLORFX_ANTIQUE\t\t\t= 14,\n> > > >  \tV4L2_COLORFX_SET_CBCR\t\t\t= 15,\n> > > > +\tV4L2_COLORFX_SET_RGB\t\t\t= 16,\n> > > >  };\n> > > >  #define V4L2_CID_AUTOBRIGHTNESS\t\t\t(V4L2_CID_BASE+32)\n> > > >  #define V4L2_CID_BAND_STOP_FILTER\t\t(V4L2_CID_BASE+33)\n> > > > @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n> > > >\n> > > >  #define V4L2_CID_ALPHA_COMPONENT\t\t(V4L2_CID_BASE+41)\n> > > >  #define V4L2_CID_COLORFX_CBCR\t\t\t(V4L2_CID_BASE+42)\n> > > > +#define V4L2_CID_COLORFX_RGB\t\t\t(V4L2_CID_BASE+43)\n> > > >\n> > > >  /* last CID + 1 */\n> > > > -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> > > > +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n> > > >\n> > > >  /* USER-class private control IDs */\n> > > >\n> > > > @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n> > > >   */\n> > > >  #define V4L2_CID_USER_ALLEGRO_BASE\t\t(V4L2_CID_USER_BASE + 0x1170)\n> > > >\n> > > > +/*\n> > > > + * The base for the isl7998x driver controls.\n> > > > + * We reserve 16 controls for this driver.\n> > > > + */\n> > > > +#define V4L2_CID_USER_ISL7998X_BASE\t\t(V4L2_CID_USER_BASE + 0x1180)\n> > > > +\n> > > >  /* MPEG-class control IDs */\n> > > >  /* The MPEG controls are applicable to all codec controls\n> > > >   * and the 'MPEG' part of the define is historical */\n> > > > @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n> > > >  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES\t\t(V4L2_CID_CODEC_BASE+234)\n> > > >  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR\t\t(V4L2_CID_CODEC_BASE+235)\n> > > >  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD\t(V4L2_CID_CODEC_BASE+236)\n> > > > +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE\t(V4L2_CID_CODEC_BASE+237)\n> > > > +enum v4l2_mpeg_video_intra_refresh_period_type {\n> > > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM\t= 0,\n> > > > +\tV4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC\t= 1,\n> > > > +};\n> > > >\n> > > >  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n> > > >  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL\t\t\t(V4L2_CID_CODEC_BASE+270)\n> > > > @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n> > > >  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC\t\t0x01\n> > > >  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC\t\t0x02\n> > > >  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD\t0x04\n> > > > +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME\t\t0x08\n> > > > +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME\t\t0x10\n> > > >\n> > > >  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS\t(V4L2_CID_CODEC_STATELESS_BASE + 7)\n> > > >  /**\n> > > > @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n> > > >  \t__u32 min_display_mastering_luminance;\n> > > >  };\n> > > >\n> > > > +/* Stateless VP9 controls */\n> > > > +\n> > > > +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED\t0x1\n> > > > +#define\tV4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE\t0x2\n> > > > +\n> > > > +/**\n> > > > + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> > > > + *\n> > > > + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> > > > + * chosen reference frame. If this syntax element is not present in the bitstream,\n> > > > + * users should pass its last value.\n> > > > + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> > > > + * chosen mode.\tIf this syntax element is not present in the bitstream, users should\n> > > > + * pass its last value.\n> > > > + * @level: indicates the loop filter strength.\n> > > > + * @sharpness: indicates the sharpness level.\n> > > > + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > + *\n> > > > + * This structure contains all loop filter related parameters. See sections\n> > > > + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> > > > + */\n> > > > +struct v4l2_vp9_loop_filter {\n> > > > +\t__s8 ref_deltas[4];\n> > > > +\t__s8 mode_deltas[2];\n> > > > +\t__u8 level;\n> > > > +\t__u8 sharpness;\n> > > > +\t__u8 flags;\n> > > > +\t__u8 reserved[7];\n> > > > +};\n> > > > +\n> > > > +/**\n> > > > + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> > > > + *\n> > > > + * @base_q_idx: indicates the base frame qindex.\n> > > > + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> > > > + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> > > > + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > + *\n> > > > + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> > > > + * syntax' of the VP9 specification for more details.\n> > > > + */\n> > > > +struct v4l2_vp9_quantization {\n> > > > +\t__u8 base_q_idx;\n> > > > +\t__s8 delta_q_y_dc;\n> > > > +\t__s8 delta_q_uv_dc;\n> > > > +\t__s8 delta_q_uv_ac;\n> > > > +\t__u8 reserved[4];\n> > > > +};\n> > > > +\n> > > > +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED\t\t0x01\n> > > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP\t\t0x02\n> > > > +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE\t0x04\n> > > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA\t\t0x08\n> > > > +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE\t0x10\n> > > > +\n> > > > +#define V4L2_VP9_SEG_LVL_ALT_Q\t\t\t\t0\n> > > > +#define V4L2_VP9_SEG_LVL_ALT_L\t\t\t\t1\n> > > > +#define V4L2_VP9_SEG_LVL_REF_FRAME\t\t\t2\n> > > > +#define V4L2_VP9_SEG_LVL_SKIP\t\t\t\t3\n> > > > +#define V4L2_VP9_SEG_LVL_MAX\t\t\t\t4\n> > > > +\n> > > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\t(1 << (id))\n> > > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK\t0xf\n> > > > +\n> > > > +/**\n> > > > + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> > > > + *\n> > > > + * @feature_data: data attached to each feature. Data entry is only valid if\n> > > > + * the feature is enabled. The array shall be indexed with segment number as\n> > > > + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> > > > + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> > > > + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> > > > + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> > > > + * @tree_probs: specifies the probability values to be used when decoding a\n> > > > + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> > > > + * for more details.\n> > > > + * @pred_probs: specifies the probability values to be used when decoding a\n> > > > + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> > > > + * for more details.\n> > > > + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > + *\n> > > > + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> > > > + * the VP9 specification for more details.\n> > > > + */\n> > > > +struct v4l2_vp9_segmentation {\n> > > > +\t__s16 feature_data[8][4];\n> > > > +\t__u8 feature_enabled[8];\n> > > > +\t__u8 tree_probs[7];\n> > > > +\t__u8 pred_probs[3];\n> > > > +\t__u8 flags;\n> > > > +\t__u8 reserved[5];\n> > > > +};\n> > > > +\n> > > > +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME\t\t\t0x001\n> > > > +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME\t\t\t0x002\n> > > > +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT\t\t0x004\n> > > > +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY\t\t\t0x008\n> > > > +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV\t\t0x010\n> > > > +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX\t\t0x020\n> > > > +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE\t\t0x040\n> > > > +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING\t\t0x080\n> > > > +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING\t\t0x100\n> > > > +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING\t0x200\n> > > > +\n> > > > +#define V4L2_VP9_SIGN_BIAS_LAST\t\t\t\t0x1\n> > > > +#define V4L2_VP9_SIGN_BIAS_GOLDEN\t\t\t0x2\n> > > > +#define V4L2_VP9_SIGN_BIAS_ALT\t\t\t\t0x4\n> > > > +\n> > > > +#define V4L2_VP9_RESET_FRAME_CTX_NONE\t\t\t0\n> > > > +#define V4L2_VP9_RESET_FRAME_CTX_SPEC\t\t\t1\n> > > > +#define V4L2_VP9_RESET_FRAME_CTX_ALL\t\t\t2\n> > > > +\n> > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP\t\t\t0\n> > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH\t\t1\n> > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP\t\t2\n> > > > +#define V4L2_VP9_INTERP_FILTER_BILINEAR\t\t\t3\n> > > > +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE\t\t4\n> > > > +\n> > > > +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE\t0\n> > > > +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE\t1\n> > > > +#define V4L2_VP9_REFERENCE_MODE_SELECT\t\t\t2\n> > > > +\n> > > > +#define V4L2_VP9_PROFILE_MAX\t\t\t\t3\n> > > > +\n> > > > +#define V4L2_CID_STATELESS_VP9_FRAME\t(V4L2_CID_CODEC_STATELESS_BASE + 300)\n> > > > +/**\n> > > > + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> > > > + *\n> > > > + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> > > > + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> > > > + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> > > > + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> > > > + * @compressed_header_size: compressed header size in bytes.\n> > > > + * @uncompressed_header_size: uncompressed header size in bytes.\n> > > > + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> > > > + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> > > > + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> > > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > > + * to prepare a frame that's ready for scanout.\n> > > > + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> > > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > > + * to prepare a frame that's ready for scanout.\n> > > > + * @last_frame_ts: \"last\" reference buffer timestamp.\n> > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> > > > + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> > > > + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> > > > + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> > > > + * @frame_context_idx: frame context that should be used/updated.\n> > > > + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> > > > + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> > > > + * 10 and/or 12 bits depths.\n> > > > + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> > > > + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> > > > + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> > > > + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> > > > + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> > > > + * is measured in units of 8x8 blocks).\n> > > > + * @reference_mode: specifies the type of inter prediction to be used.\n> > > > + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > + */\n> > > > +struct v4l2_ctrl_vp9_frame {\n> > > > +\tstruct v4l2_vp9_loop_filter lf;\n> > > > +\tstruct v4l2_vp9_quantization quant;\n> > > > +\tstruct v4l2_vp9_segmentation seg;\n> > > > +\t__u32 flags;\n> > > > +\t__u16 compressed_header_size;\n> > > > +\t__u16 uncompressed_header_size;\n> > > > +\t__u16 frame_width_minus_1;\n> > > > +\t__u16 frame_height_minus_1;\n> > > > +\t__u16 render_width_minus_1;\n> > > > +\t__u16 render_height_minus_1;\n> > > > +\t__u64 last_frame_ts;\n> > > > +\t__u64 golden_frame_ts;\n> > > > +\t__u64 alt_frame_ts;\n> > > > +\t__u8 ref_frame_sign_bias;\n> > > > +\t__u8 reset_frame_context;\n> > > > +\t__u8 frame_context_idx;\n> > > > +\t__u8 profile;\n> > > > +\t__u8 bit_depth;\n> > > > +\t__u8 interpolation_filter;\n> > > > +\t__u8 tile_cols_log2;\n> > > > +\t__u8 tile_rows_log2;\n> > > > +\t__u8 reference_mode;\n> > > > +\t__u8 reserved[7];\n> > > > +};\n> > > > +\n> > > > +#define V4L2_VP9_NUM_FRAME_CTX\t4\n> > > > +\n> > > > +/**\n> > > > + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> > > > + * @joint: motion vector joint probability updates.\n> > > > + * @sign: motion vector sign probability updates.\n> > > > + * @classes: motion vector class probability updates.\n> > > > + * @class0_bit: motion vector class0 bit probability updates.\n> > > > + * @bits: motion vector bits probability updates.\n> > > > + * @class0_fr: motion vector class0 fractional bit probability updates.\n> > > > + * @fr: motion vector fractional bit probability updates.\n> > > > + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> > > > + * @hp: motion vector high precision fractional bit probability updates.\n> > > > + *\n> > > > + * This structure contains new values of motion vector probabilities.\n> > > > + * A value of zero in an array element means there is no update of the relevant probability.\n> > > > + * See `struct v4l2_vp9_prob_updates` for details.\n> > > > + */\n> > > > +struct v4l2_vp9_mv_probs {\n> > > > +\t__u8 joint[3];\n> > > > +\t__u8 sign[2];\n> > > > +\t__u8 classes[2][10];\n> > > > +\t__u8 class0_bit[2];\n> > > > +\t__u8 bits[2][10];\n> > > > +\t__u8 class0_fr[2][2][3];\n> > > > +\t__u8 fr[2][3];\n> > > > +\t__u8 class0_hp[2];\n> > > > +\t__u8 hp[2];\n> > > > +};\n> > > > +\n> > > > +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR\t(V4L2_CID_CODEC_STATELESS_BASE + 301)\n> > > > +\n> > > > +#define V4L2_VP9_TX_MODE_ONLY_4X4\t\t\t0\n> > > > +#define V4L2_VP9_TX_MODE_ALLOW_8X8\t\t\t1\n> > > > +#define V4L2_VP9_TX_MODE_ALLOW_16X16\t\t\t2\n> > > > +#define V4L2_VP9_TX_MODE_ALLOW_32X32\t\t\t3\n> > > > +#define V4L2_VP9_TX_MODE_SELECT\t\t\t\t4\n> > > > +\n> > > > +/**\n> > > > + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> > > > + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> > > > + * @tx8: TX 8x8 probability updates.\n> > > > + * @tx16: TX 16x16 probability updates.\n> > > > + * @tx32: TX 32x32 probability updates.\n> > > > + * @coef: coefficient probability updates.\n> > > > + * @skip: skip probability updates.\n> > > > + * @inter_mode: inter mode probability updates.\n> > > > + * @interp_filter: interpolation filter probability updates.\n> > > > + * @is_inter: is inter-block probability updates.\n> > > > + * @comp_mode: compound prediction mode probability updates.\n> > > > + * @single_ref: single ref probability updates.\n> > > > + * @comp_ref: compound ref probability updates.\n> > > > + * @y_mode: Y prediction mode probability updates.\n> > > > + * @uv_mode: UV prediction mode probability updates.\n> > > > + * @partition: partition probability updates.\n> > > > + * @mv: motion vector probability updates.\n> > > > + *\n> > > > + * This structure holds the probabilities update as parsed in the compressed\n> > > > + * header (Spec 6.3). These values represent the value of probability update after\n> > > > + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> > > > + * means that there is no update of the relevant probability.\n> > > > + *\n> > > > + * This control is optional and needs to be used when dealing with the hardware which is\n> > > > + * not capable of parsing the compressed header itself. Only drivers which need it will\n> > > > + * implement it.\n> > > > + */\n> > > > +struct v4l2_ctrl_vp9_compressed_hdr {\n> > > > +\t__u8 tx_mode;\n> > > > +\t__u8 tx8[2][1];\n> > > > +\t__u8 tx16[2][2];\n> > > > +\t__u8 tx32[2][3];\n> > > > +\t__u8 coef[4][2][2][6][6][3];\n> > > > +\t__u8 skip[3];\n> > > > +\t__u8 inter_mode[7][3];\n> > > > +\t__u8 interp_filter[4][2];\n> > > > +\t__u8 is_inter[4];\n> > > > +\t__u8 comp_mode[5];\n> > > > +\t__u8 single_ref[5][2];\n> > > > +\t__u8 comp_ref[5];\n> > > > +\t__u8 y_mode[4][9];\n> > > > +\t__u8 uv_mode[10][9];\n> > > > +\t__u8 partition[16][3];\n> > > > +\n> > > > +\tstruct v4l2_vp9_mv_probs mv;\n> > > > +};\n> > > > +\n> > > >  /* MPEG-compression definitions kept for backwards compatibility */\n> > > >  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n> > > >  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> > > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> > > > index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> > > > --- a/include/linux/videodev2.h\n> > > > +++ b/include/linux/videodev2.h\n> > > > @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n> > > >  /* Grey bit-packed formats */\n> > > >  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n> > > >  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> > > > +#define V4L2_PIX_FMT_IPU3_Y10\t\tv4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n> > > >\n> > > >  /* Palette formats */\n> > > >  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> > > > @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n> > > >  /* Tiled YUV formats, non contiguous planes */\n> > > >  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n> > > >  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> > > > +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> > > > +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n> > > >\n> > > >  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n> > > >  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> > > > @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n> > > >  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n> > > >  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n> > > >  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> > > > +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n> > > >  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n> > > >  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n> > > >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> > > > @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n> > > >  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n> > > >  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n> > > >  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> > > > +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> > > > +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n> > > >\n> > > > -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > > +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > >  #define V4L2_PIX_FMT_IPU3_SBGGR10\tv4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n> > > >  #define V4L2_PIX_FMT_IPU3_SGBRG10\tv4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n> > > >  #define V4L2_PIX_FMT_IPU3_SGRBG10\tv4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> > > > @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n> > > >  \t\tstruct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n> > > >  \t\tstruct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n> > > >  \t\tstruct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> > > > +\t\tstruct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> > > > +\t\tstruct v4l2_ctrl_vp9_frame *p_vp9_frame;\n> > > >  \t\tvoid *ptr;\n> > > >  \t};\n> > > >  } __attribute__ ((packed));\n> > > > @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n> > > >  \tV4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n> > > >  \tV4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n> > > >  \tV4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> > > > +\n> > > > +\tV4L2_CTRL_TYPE_VP9_COMPRESSED_HDR\t= 0x0260,\n> > > > +\tV4L2_CTRL_TYPE_VP9_FRAME\t\t= 0x0261,\n> > > >  };\n> > > >\n> > > >  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AC3CCBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 10:21:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E8B663314;\n\tTue,  2 Aug 2022 12:21:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 042C9603E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 12:21:28 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A33625B;\n\tTue,  2 Aug 2022 12:21:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659435690;\n\tbh=edyv3QTO9yYzFpZLhNh+siXikH5b1MmirXyePYokISc=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Fcvxpwz+52KqrH9f67DHyMIBUexEb+JpsPVZrY4vo5+MSE5fcoJbzVNMR4qu+SWMP\n\t9bj1YpYeg2CV9yjRGM0Qhk/KKIbyuZSt7LepuYvuuWgkXlaNFUBTSHHkceh6zA0AYB\n\tbDcWALlTGJogdP6LQ7meycW8DmdFa4ozmXgLSdgQy8ULeGiyejE5LzAcVNSqot85Mm\n\tOOWkjXASEARr6Hrx3o7LRvpqXkR3C1v1sDrng60yonmJSweUg7QJogc8JdTjsNKxF5\n\tSQBbxtMCSS0lH71/5MSusgm87Orb9SOAZE1dneDDAwiDm2u2+JCg1fX9e5EVDCjsfX\n\tr82woZ1Usk3Nw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659435688;\n\tbh=edyv3QTO9yYzFpZLhNh+siXikH5b1MmirXyePYokISc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=wcPEbwrim+lGhilukmgTZ5alYu6oYC49Ci9XuuUeVM1zkqSxdP+mR2Pb5YUZzZlZ3\n\tzSBqPWJ1UUyxZX6fNJizhw3SQVrAd6WL3oNDhzy9VXcgaO8rG8zRd+8vGVy2EWKZ05\n\tuMxQZc4YqWHhsLKBmBgWchLYSkMPq1YSqQ3oi150="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"wcPEbwri\"; dkim-atps=neutral","Date":"Tue, 2 Aug 2022 13:21:23 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<Yuj6ozm3r7SutbIo@pendragon.ideasonboard.com>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>\n\t<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>\n\t<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24308,"web_url":"https://patchwork.libcamera.org/comment/24308/","msgid":"<165944476381.989512.17817194188655692255@Monstersaurus>","date":"2022-08-02T12:52:43","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-08-02 11:21:23)\n> Hi Jacopo,\n> \n> On Tue, Aug 02, 2022 at 09:52:08AM +0200, Jacopo Mondi wrote:\n> > On Mon, Aug 01, 2022 at 10:47:04PM +0300, Laurent Pinchart wrote:\n> > > On Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> > > > On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > > > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > > > > re-instating libcamera local modifications.\n> > > >\n> > > > Don't we need something better than this ?\n> > > >\n> > > > should we regularly rebase the libcamera-changes on top of a new\n> > > > header export per each kernel release ?\n> > > >\n> > > > Otherwise updating headers and re-applying the local modifications in\n> > > > one go makes it impossible to actually track what's local and what's\n> > > > upstream ?\n> > >\n> > > This patch was possibly easier to generate than it is to review. The\n> > > update-kernel-headers.sh script undoes all the local changes, and I've\n> > > then used git add -p to avoid picking up the reverts. This is a manual\n> > > process that can lead to errors.\n> > \n> > The error-proness is what I'm concerned with\n> > \n> > > On the review side, it's really about making sure that the update\n> > > doesn't drop any of the features we depend on. It may seem error-prone\n> > > too, but most (not all though) of the local changes we carry will be\n> > > detected at compilation time of reverted.\n> > \n> > True that\n> > \n> > > The best way to avoid all this is of course to upstream all the changes,\n> > > and that's something we keep working on, with various delays depending\n> > > on the features. For instance, patches 02/13 and 03/13 in this series\n> > > will effectively disappear once we upgrade to the v5.20 kernel headers.\n> > > Other changes take longer to upstream.\n> > >\n> > > I'm open to other ideas to improve the process, but completely\n> > > overwriting the headers and then reapplying local changes on top will\n> > > break compilation during bisection.\n> > \n> > I can only suggest to do that on the side and compare the output.\n> > But that's a suggestion for review more than for development.\n> \n> We could indeed post the change as two patches, one that overwrites\n> everything, and the second one that reapplies our local changes, and\n> squash when pushing.\n\nI wouldn't even squash. We could simply keep re-cherry-picking the\nadd-on commits. That would make it clear that the import overwrites the\nadditions, and then we clearly bring them back in reviewable chunks 'on\ntop' of the latest kernel headers.\n\n--\nKieran\n\n\n> \n> > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > > > ---\n> > > > >  include/linux/README          |   2 +-\n> > > > >  include/linux/dma-buf.h       |   4 +-\n> > > > >  include/linux/drm_fourcc.h    |  86 +++++++++-\n> > > > >  include/linux/intel-ipu3.h    |  35 ++--\n> > > > >  include/linux/v4l2-controls.h | 301 +++++++++++++++++++++++++++++++++-\n> > > > >  include/linux/videodev2.h     |  13 +-\n> > > > >  6 files changed, 418 insertions(+), 23 deletions(-)\n> > > > >\n> > > > > diff --git a/include/linux/README b/include/linux/README\n> > > > > index 4e314b9820ce..9f61517a119a 100644\n> > > > > --- a/include/linux/README\n> > > > > +++ b/include/linux/README\n> > > > > @@ -1,4 +1,4 @@\n> > > > >  # SPDX-License-Identifier: CC0-1.0\n> > > > >\n> > > > > -Files in this directory are imported from v5.16-rc7 of the Linux kernel. Do not\n> > > > > +Files in this directory are imported from v5.19 of the Linux kernel. Do not\n> > > > >  modify them manually.\n> > > > > diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h\n> > > > > index 8e4a2ca0bcbf..b1523cb8ab30 100644\n> > > > > --- a/include/linux/dma-buf.h\n> > > > > +++ b/include/linux/dma-buf.h\n> > > > > @@ -92,7 +92,7 @@ struct dma_buf_sync {\n> > > > >   * between them in actual uapi, they're just different numbers.\n> > > > >   */\n> > > > >  #define DMA_BUF_SET_NAME       _IOW(DMA_BUF_BASE, 1, const char *)\n> > > > > -#define DMA_BUF_SET_NAME_A     _IOW(DMA_BUF_BASE, 1, u32)\n> > > > > -#define DMA_BUF_SET_NAME_B     _IOW(DMA_BUF_BASE, 1, u64)\n> > > > > +#define DMA_BUF_SET_NAME_A     _IOW(DMA_BUF_BASE, 1, __u32)\n> > > > > +#define DMA_BUF_SET_NAME_B     _IOW(DMA_BUF_BASE, 1, __u64)\n> > > > >\n> > > > >  #endif\n> > > > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > > > index ea11dcb405e5..cc69eecc606f 100644\n> > > > > --- a/include/linux/drm_fourcc.h\n> > > > > +++ b/include/linux/drm_fourcc.h\n> > > > > @@ -314,6 +314,13 @@ extern \"C\" {\n> > > > >   */\n> > > > >  #define DRM_FORMAT_P016                fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */\n> > > > >\n> > > > > +/* 2 plane YCbCr420.\n> > > > > + * 3 10 bit components and 2 padding bits packed into 4 bytes.\n> > > > > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian\n> > > > > + * index 1 = Cr:Cb plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 [2:10:10:10:2:10:10:10] little endian\n> > > > > + */\n> > > > > +#define DRM_FORMAT_P030                fourcc_code('P', '0', '3', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel packed */\n> > > > > +\n> > > > >  /* 3 plane non-subsampled (444) YCbCr\n> > > > >   * 16 bits per component, but only 10 bits are used and 6 bits are padded\n> > > > >   * index 0: Y plane, [15:0] Y:x [10:6] little endian\n> > > > > @@ -630,6 +637,53 @@ extern \"C\" {\n> > > > >   */\n> > > > >  #define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)\n> > > > >\n> > > > > +/*\n> > > > > + * Intel Tile 4 layout\n> > > > > + *\n> > > > > + * This is a tiled layout using 4KB tiles in a row-major layout. It has the same\n> > > > > + * shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It\n> > > > > + * only differs from Tile Y at the 256B granularity in between. At this\n> > > > > + * granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape\n> > > > > + * of 64B x 8 rows.\n> > > > > + */\n> > > > > +#define I915_FORMAT_MOD_4_TILED         fourcc_mod_code(INTEL, 9)\n> > > > > +\n> > > > > +/*\n> > > > > + * Intel color control surfaces (CCS) for DG2 render compression.\n> > > > > + *\n> > > > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > > > + * main surface pitch is required to be a multiple of four Tile 4 widths.\n> > > > > + */\n> > > > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)\n> > > > > +\n> > > > > +/*\n> > > > > + * Intel color control surfaces (CCS) for DG2 media compression.\n> > > > > + *\n> > > > > + * The main surface is Tile 4 and at plane index 0. For semi-planar formats\n> > > > > + * like NV12, the Y and UV planes are Tile 4 and are located at plane indices\n> > > > > + * 0 and 1, respectively. The CCS for all planes are stored outside of the\n> > > > > + * GEM object in a reserved memory area dedicated for the storage of the\n> > > > > + * CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface\n> > > > > + * pitch is required to be a multiple of four Tile 4 widths.\n> > > > > + */\n> > > > > +#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)\n> > > > > +\n> > > > > +/*\n> > > > > + * Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.\n> > > > > + *\n> > > > > + * The main surface is Tile 4 and at plane index 0. The CCS data is stored\n> > > > > + * outside of the GEM object in a reserved memory area dedicated for the\n> > > > > + * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The\n> > > > > + * main surface pitch is required to be a multiple of four Tile 4 widths. The\n> > > > > + * clear color is stored at plane index 1 and the pitch should be ignored. The\n> > > > > + * format of the 256 bits of clear color data matches the one used for the\n> > > > > + * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description\n> > > > > + * for details.\n> > > > > + */\n> > > > > +#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)\n> > > > > +\n> > > > >  /*\n> > > > >   * IPU3 Bayer packing layout\n> > > > >   *\n> > > > > @@ -638,7 +692,7 @@ extern \"C\" {\n> > > > >   * the 6 most significant bits in the last byte unused. The format is little\n> > > > >   * endian.\n> > > > >   */\n> > > > > -#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 9)\n> > > > > +#define IPU3_FORMAT_MOD_PACKED fourcc_mod_code(INTEL, 13)\n> > > > >\n> > > > >  /*\n> > > > >   * Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks\n> > > > > @@ -677,6 +731,28 @@ extern \"C\" {\n> > > > >   */\n> > > > >  #define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)\n> > > > >\n> > > > > +/*\n> > > > > + * Qualcomm Tiled Format\n> > > > > + *\n> > > > > + * Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.\n> > > > > + * Implementation may be platform and base-format specific.\n> > > > > + *\n> > > > > + * Each macrotile consists of m x n (mostly 4 x 4) tiles.\n> > > > > + * Pixel data pitch/stride is aligned with macrotile width.\n> > > > > + * Pixel data height is aligned with macrotile height.\n> > > > > + * Entire pixel data buffer is aligned with 4k(bytes).\n> > > > > + */\n> > > > > +#define DRM_FORMAT_MOD_QCOM_TILED3     fourcc_mod_code(QCOM, 3)\n> > > > > +\n> > > > > +/*\n> > > > > + * Qualcomm Alternate Tiled Format\n> > > > > + *\n> > > > > + * Alternate tiled format typically only used within GMEM.\n> > > > > + * Implementation may be platform and base-format specific.\n> > > > > + */\n> > > > > +#define DRM_FORMAT_MOD_QCOM_TILED2     fourcc_mod_code(QCOM, 2)\n> > > > > +\n> > > > > +\n> > > > >  /* Vivante framebuffer modifiers */\n> > > > >\n> > > > >  /*\n> > > > > @@ -929,6 +1005,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > > > >   * and UV.  Some SAND-using hardware stores UV in a separate tiled\n> > > > >   * image from Y to reduce the column height, which is not supported\n> > > > >   * with these modifiers.\n> > > > > + *\n> > > > > + * The DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT modifier is also\n> > > > > + * supported for DRM_FORMAT_P030 where the columns remain as 128 bytes\n> > > > > + * wide, but as this is a 10 bpp format that translates to 96 pixels.\n> > > > >   */\n> > > > >\n> > > > >  #define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) \\\n> > > > > @@ -1439,11 +1519,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > > > >  #define AMD_FMT_MOD_PIPE_MASK 0x7\n> > > > >\n> > > > >  #define AMD_FMT_MOD_SET(field, value) \\\n> > > > > -       ((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > > > +       ((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)\n> > > > >  #define AMD_FMT_MOD_GET(field, value) \\\n> > > > >         (((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)\n> > > > >  #define AMD_FMT_MOD_CLEAR(field) \\\n> > > > > -       (~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > > > +       (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))\n> > > > >\n> > > > >  /* Mobile Industry Processor Interface (MIPI) modifiers */\n> > > > >\n> > > > > diff --git a/include/linux/intel-ipu3.h b/include/linux/intel-ipu3.h\n> > > > > index f30dce43d1d8..5c298ec557fa 100644\n> > > > > --- a/include/linux/intel-ipu3.h\n> > > > > +++ b/include/linux/intel-ipu3.h\n> > > > > @@ -34,11 +34,17 @@\n> > > > >   * struct ipu3_uapi_grid_config - Grid plane config\n> > > > >   *\n> > > > >   * @width:     Grid horizontal dimensions, in number of grid blocks(cells).\n> > > > > + *             For AWB, the range is (16, 80).\n> > > > > + *             For AF/AE, the range is (16, 32).\n> > > > >   * @height:    Grid vertical dimensions, in number of grid cells.\n> > > > > + *             For AWB, the range is (16, 60).\n> > > > > + *             For AF/AE, the range is (16, 24).\n> > > > >   * @block_width_log2:  Log2 of the width of each cell in pixels.\n> > > > > - *                     for (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > > > + *                     For AWB, the range is [3, 6].\n> > > > > + *                     For AF/AE, the range is [3, 7].\n> > > > >   * @block_height_log2: Log2 of the height of each cell in pixels.\n> > > > > - *                     for (2^3, 2^4, 2^5, 2^6, 2^7), values [3, 7].\n> > > > > + *                     For AWB, the range is [3, 6].\n> > > > > + *                     For AF/AE, the range is [3, 7].\n> > > > >   * @height_per_slice:  The number of blocks in vertical axis per slice.\n> > > > >   *                     Default 2.\n> > > > >   * @x_start: X value of top left corner of Region of Interest(ROI).\n> > > > > @@ -68,21 +74,21 @@ struct ipu3_uapi_grid_config {\n> > > > >   * @R_avg:     Red average in the cell.\n> > > > >   * @B_avg:     Blue average in the cell.\n> > > > >   * @Gb_avg:    Green average for blue lines in the cell.\n> > > > > - * @sat_ratio: Percentage of pixels over a given threshold set in\n> > > > > + * @sat_ratio:  Percentage of pixels over the thresholds specified in\n> > > > >   *             ipu3_uapi_awb_config_s, coded from 0 to 255.\n> > > > > - * @padding0:  Unused byte for padding.\n> > > > > - * @padding1:  Unused byte for padding.\n> > > > > - * @padding2:  Unused byte for padding.\n> > > > > + * @padding0:   Unused byte for padding.\n> > > > > + * @padding1:   Unused byte for padding.\n> > > > > + * @padding2:   Unused byte for padding.\n> > > > >   */\n> > > > >  struct ipu3_uapi_awb_set_item {\n> > > > > -       unsigned char Gr_avg;\n> > > > > -       unsigned char R_avg;\n> > > > > -       unsigned char B_avg;\n> > > > > -       unsigned char Gb_avg;\n> > > > > -       unsigned char sat_ratio;\n> > > > > -       unsigned char padding0;\n> > > > > -       unsigned char padding1;\n> > > > > -       unsigned char padding2;\n> > > > > +       __u8 Gr_avg;\n> > > > > +       __u8 R_avg;\n> > > > > +       __u8 B_avg;\n> > > > > +       __u8 Gb_avg;\n> > > > > +       __u8 sat_ratio;\n> > > > > +       __u8 padding0;\n> > > > > +       __u8 padding1;\n> > > > > +       __u8 padding2;\n> > > > >  } __attribute__((packed));\n> > > > >\n> > > > >  /*\n> > > > > @@ -98,7 +104,6 @@ struct ipu3_uapi_awb_set_item {\n> > > > >         (IPU3_UAPI_AWB_MAX_SETS * \\\n> > > > >          (IPU3_UAPI_AWB_SET_SIZE + IPU3_UAPI_AWB_SPARE_FOR_BUBBLES))\n> > > > >\n> > > > > -\n> > > > >  /**\n> > > > >   * struct ipu3_uapi_awb_raw_buffer - AWB raw buffer\n> > > > >   *\n> > > > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > > > index a055d2576253..9d2a8237e712 100644\n> > > > > --- a/include/linux/v4l2-controls.h\n> > > > > +++ b/include/linux/v4l2-controls.h\n> > > > > @@ -128,6 +128,7 @@ enum v4l2_colorfx {\n> > > > >         V4L2_COLORFX_SOLARIZATION               = 13,\n> > > > >         V4L2_COLORFX_ANTIQUE                    = 14,\n> > > > >         V4L2_COLORFX_SET_CBCR                   = 15,\n> > > > > +       V4L2_COLORFX_SET_RGB                    = 16,\n> > > > >  };\n> > > > >  #define V4L2_CID_AUTOBRIGHTNESS                        (V4L2_CID_BASE+32)\n> > > > >  #define V4L2_CID_BAND_STOP_FILTER              (V4L2_CID_BASE+33)\n> > > > > @@ -145,9 +146,10 @@ enum v4l2_colorfx {\n> > > > >\n> > > > >  #define V4L2_CID_ALPHA_COMPONENT               (V4L2_CID_BASE+41)\n> > > > >  #define V4L2_CID_COLORFX_CBCR                  (V4L2_CID_BASE+42)\n> > > > > +#define V4L2_CID_COLORFX_RGB                   (V4L2_CID_BASE+43)\n> > > > >\n> > > > >  /* last CID + 1 */\n> > > > > -#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+43)\n> > > > > +#define V4L2_CID_LASTP1                         (V4L2_CID_BASE+44)\n> > > > >\n> > > > >  /* USER-class private control IDs */\n> > > > >\n> > > > > @@ -221,6 +223,12 @@ enum v4l2_colorfx {\n> > > > >   */\n> > > > >  #define V4L2_CID_USER_ALLEGRO_BASE             (V4L2_CID_USER_BASE + 0x1170)\n> > > > >\n> > > > > +/*\n> > > > > + * The base for the isl7998x driver controls.\n> > > > > + * We reserve 16 controls for this driver.\n> > > > > + */\n> > > > > +#define V4L2_CID_USER_ISL7998X_BASE            (V4L2_CID_USER_BASE + 0x1180)\n> > > > > +\n> > > > >  /* MPEG-class control IDs */\n> > > > >  /* The MPEG controls are applicable to all codec controls\n> > > > >   * and the 'MPEG' part of the define is historical */\n> > > > > @@ -443,6 +451,11 @@ enum v4l2_mpeg_video_multi_slice_mode {\n> > > > >  #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES             (V4L2_CID_CODEC_BASE+234)\n> > > > >  #define V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR          (V4L2_CID_CODEC_BASE+235)\n> > > > >  #define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD       (V4L2_CID_CODEC_BASE+236)\n> > > > > +#define V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE  (V4L2_CID_CODEC_BASE+237)\n> > > > > +enum v4l2_mpeg_video_intra_refresh_period_type {\n> > > > > +       V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM    = 0,\n> > > > > +       V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC    = 1,\n> > > > > +};\n> > > > >\n> > > > >  /* CIDs for the MPEG-2 Part 2 (H.262) codec */\n> > > > >  #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL                        (V4L2_CID_CODEC_BASE+270)\n> > > > > @@ -1563,6 +1576,8 @@ struct v4l2_h264_dpb_entry {\n> > > > >  #define V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC            0x01\n> > > > >  #define V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC          0x02\n> > > > >  #define V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD       0x04\n> > > > > +#define V4L2_H264_DECODE_PARAM_FLAG_PFRAME             0x08\n> > > > > +#define V4L2_H264_DECODE_PARAM_FLAG_BFRAME             0x10\n> > > > >\n> > > > >  #define V4L2_CID_STATELESS_H264_DECODE_PARAMS  (V4L2_CID_CODEC_STATELESS_BASE + 7)\n> > > > >  /**\n> > > > > @@ -2018,6 +2033,290 @@ struct v4l2_ctrl_hdr10_mastering_display {\n> > > > >         __u32 min_display_mastering_luminance;\n> > > > >  };\n> > > > >\n> > > > > +/* Stateless VP9 controls */\n> > > > > +\n> > > > > +#define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED        0x1\n> > > > > +#define        V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE  0x2\n> > > > > +\n> > > > > +/**\n> > > > > + * struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n> > > > > + *\n> > > > > + * @ref_deltas: contains the adjustment needed for the filter level based on the\n> > > > > + * chosen reference frame. If this syntax element is not present in the bitstream,\n> > > > > + * users should pass its last value.\n> > > > > + * @mode_deltas: contains the adjustment needed for the filter level based on the\n> > > > > + * chosen mode.        If this syntax element is not present in the bitstream, users should\n> > > > > + * pass its last value.\n> > > > > + * @level: indicates the loop filter strength.\n> > > > > + * @sharpness: indicates the sharpness level.\n> > > > > + * @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n> > > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > > + *\n> > > > > + * This structure contains all loop filter related parameters. See sections\n> > > > > + * '7.2.8 Loop filter semantics' of the VP9 specification for more details.\n> > > > > + */\n> > > > > +struct v4l2_vp9_loop_filter {\n> > > > > +       __s8 ref_deltas[4];\n> > > > > +       __s8 mode_deltas[2];\n> > > > > +       __u8 level;\n> > > > > +       __u8 sharpness;\n> > > > > +       __u8 flags;\n> > > > > +       __u8 reserved[7];\n> > > > > +};\n> > > > > +\n> > > > > +/**\n> > > > > + * struct v4l2_vp9_quantization - VP9 quantization parameters\n> > > > > + *\n> > > > > + * @base_q_idx: indicates the base frame qindex.\n> > > > > + * @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n> > > > > + * @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n> > > > > + * @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n> > > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > > + *\n> > > > > + * Encodes the quantization parameters. See section '7.2.9 Quantization params\n> > > > > + * syntax' of the VP9 specification for more details.\n> > > > > + */\n> > > > > +struct v4l2_vp9_quantization {\n> > > > > +       __u8 base_q_idx;\n> > > > > +       __s8 delta_q_y_dc;\n> > > > > +       __s8 delta_q_uv_dc;\n> > > > > +       __s8 delta_q_uv_ac;\n> > > > > +       __u8 reserved[4];\n> > > > > +};\n> > > > > +\n> > > > > +#define V4L2_VP9_SEGMENTATION_FLAG_ENABLED             0x01\n> > > > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP          0x02\n> > > > > +#define V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE     0x04\n> > > > > +#define V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA         0x08\n> > > > > +#define V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE 0x10\n> > > > > +\n> > > > > +#define V4L2_VP9_SEG_LVL_ALT_Q                         0\n> > > > > +#define V4L2_VP9_SEG_LVL_ALT_L                         1\n> > > > > +#define V4L2_VP9_SEG_LVL_REF_FRAME                     2\n> > > > > +#define V4L2_VP9_SEG_LVL_SKIP                          3\n> > > > > +#define V4L2_VP9_SEG_LVL_MAX                           4\n> > > > > +\n> > > > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)   (1 << (id))\n> > > > > +#define V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK  0xf\n> > > > > +\n> > > > > +/**\n> > > > > + * struct v4l2_vp9_segmentation - VP9 segmentation parameters\n> > > > > + *\n> > > > > + * @feature_data: data attached to each feature. Data entry is only valid if\n> > > > > + * the feature is enabled. The array shall be indexed with segment number as\n> > > > > + * the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n> > > > > + * @feature_enabled: bitmask defining which features are enabled in each segment.\n> > > > > + * The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n> > > > > + * values where id is one of V4L2_VP9_SEG_LVL_{}.\n> > > > > + * @tree_probs: specifies the probability values to be used when decoding a\n> > > > > + * Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n> > > > > + * for more details.\n> > > > > + * @pred_probs: specifies the probability values to be used when decoding a\n> > > > > + * Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n> > > > > + * for more details.\n> > > > > + * @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n> > > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > > + *\n> > > > > + * Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n> > > > > + * the VP9 specification for more details.\n> > > > > + */\n> > > > > +struct v4l2_vp9_segmentation {\n> > > > > +       __s16 feature_data[8][4];\n> > > > > +       __u8 feature_enabled[8];\n> > > > > +       __u8 tree_probs[7];\n> > > > > +       __u8 pred_probs[3];\n> > > > > +       __u8 flags;\n> > > > > +       __u8 reserved[5];\n> > > > > +};\n> > > > > +\n> > > > > +#define V4L2_VP9_FRAME_FLAG_KEY_FRAME                  0x001\n> > > > > +#define V4L2_VP9_FRAME_FLAG_SHOW_FRAME                 0x002\n> > > > > +#define V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT            0x004\n> > > > > +#define V4L2_VP9_FRAME_FLAG_INTRA_ONLY                 0x008\n> > > > > +#define V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV         0x010\n> > > > > +#define V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX          0x020\n> > > > > +#define V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE          0x040\n> > > > > +#define V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING              0x080\n> > > > > +#define V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING              0x100\n> > > > > +#define V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING     0x200\n> > > > > +\n> > > > > +#define V4L2_VP9_SIGN_BIAS_LAST                                0x1\n> > > > > +#define V4L2_VP9_SIGN_BIAS_GOLDEN                      0x2\n> > > > > +#define V4L2_VP9_SIGN_BIAS_ALT                         0x4\n> > > > > +\n> > > > > +#define V4L2_VP9_RESET_FRAME_CTX_NONE                  0\n> > > > > +#define V4L2_VP9_RESET_FRAME_CTX_SPEC                  1\n> > > > > +#define V4L2_VP9_RESET_FRAME_CTX_ALL                   2\n> > > > > +\n> > > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP                        0\n> > > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH         1\n> > > > > +#define V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP          2\n> > > > > +#define V4L2_VP9_INTERP_FILTER_BILINEAR                        3\n> > > > > +#define V4L2_VP9_INTERP_FILTER_SWITCHABLE              4\n> > > > > +\n> > > > > +#define V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE       0\n> > > > > +#define V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE     1\n> > > > > +#define V4L2_VP9_REFERENCE_MODE_SELECT                 2\n> > > > > +\n> > > > > +#define V4L2_VP9_PROFILE_MAX                           3\n> > > > > +\n> > > > > +#define V4L2_CID_STATELESS_VP9_FRAME   (V4L2_CID_CODEC_STATELESS_BASE + 300)\n> > > > > +/**\n> > > > > + * struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n> > > > > + *\n> > > > > + * @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n> > > > > + * @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n> > > > > + * @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n> > > > > + * @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n> > > > > + * @compressed_header_size: compressed header size in bytes.\n> > > > > + * @uncompressed_header_size: uncompressed header size in bytes.\n> > > > > + * @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n> > > > > + * @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n> > > > > + * @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n> > > > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > > > + * to prepare a frame that's ready for scanout.\n> > > > > + * @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n> > > > > + * pixels. This is not used during the decoding process but might be used by HW scalers\n> > > > > + * to prepare a frame that's ready for scanout.\n> > > > > + * @last_frame_ts: \"last\" reference buffer timestamp.\n> > > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > > + * @golden_frame_ts: \"golden\" reference buffer timestamp.\n> > > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > > + * @alt_frame_ts: \"alt\" reference buffer timestamp.\n> > > > > + * The timestamp refers to the timestamp field in struct v4l2_buffer.\n> > > > > + * Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n> > > > > + * @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n> > > > > + * reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n> > > > > + * @reset_frame_context: specifies whether the frame context should be reset to default values.\n> > > > > + * Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n> > > > > + * @frame_context_idx: frame context that should be used/updated.\n> > > > > + * @profile: VP9 profile. Can be 0, 1, 2 or 3.\n> > > > > + * @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n> > > > > + * 10 and/or 12 bits depths.\n> > > > > + * @interpolation_filter: specifies the filter selection used for performing inter prediction.\n> > > > > + * Set to one of V4L2_VP9_INTERP_FILTER_{}.\n> > > > > + * @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n> > > > > + * is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n> > > > > + * @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n> > > > > + * is measured in units of 8x8 blocks).\n> > > > > + * @reference_mode: specifies the type of inter prediction to be used.\n> > > > > + * Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n> > > > > + * @reserved: padding field. Should be zeroed by applications.\n> > > > > + */\n> > > > > +struct v4l2_ctrl_vp9_frame {\n> > > > > +       struct v4l2_vp9_loop_filter lf;\n> > > > > +       struct v4l2_vp9_quantization quant;\n> > > > > +       struct v4l2_vp9_segmentation seg;\n> > > > > +       __u32 flags;\n> > > > > +       __u16 compressed_header_size;\n> > > > > +       __u16 uncompressed_header_size;\n> > > > > +       __u16 frame_width_minus_1;\n> > > > > +       __u16 frame_height_minus_1;\n> > > > > +       __u16 render_width_minus_1;\n> > > > > +       __u16 render_height_minus_1;\n> > > > > +       __u64 last_frame_ts;\n> > > > > +       __u64 golden_frame_ts;\n> > > > > +       __u64 alt_frame_ts;\n> > > > > +       __u8 ref_frame_sign_bias;\n> > > > > +       __u8 reset_frame_context;\n> > > > > +       __u8 frame_context_idx;\n> > > > > +       __u8 profile;\n> > > > > +       __u8 bit_depth;\n> > > > > +       __u8 interpolation_filter;\n> > > > > +       __u8 tile_cols_log2;\n> > > > > +       __u8 tile_rows_log2;\n> > > > > +       __u8 reference_mode;\n> > > > > +       __u8 reserved[7];\n> > > > > +};\n> > > > > +\n> > > > > +#define V4L2_VP9_NUM_FRAME_CTX 4\n> > > > > +\n> > > > > +/**\n> > > > > + * struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n> > > > > + * @joint: motion vector joint probability updates.\n> > > > > + * @sign: motion vector sign probability updates.\n> > > > > + * @classes: motion vector class probability updates.\n> > > > > + * @class0_bit: motion vector class0 bit probability updates.\n> > > > > + * @bits: motion vector bits probability updates.\n> > > > > + * @class0_fr: motion vector class0 fractional bit probability updates.\n> > > > > + * @fr: motion vector fractional bit probability updates.\n> > > > > + * @class0_hp: motion vector class0 high precision fractional bit probability updates.\n> > > > > + * @hp: motion vector high precision fractional bit probability updates.\n> > > > > + *\n> > > > > + * This structure contains new values of motion vector probabilities.\n> > > > > + * A value of zero in an array element means there is no update of the relevant probability.\n> > > > > + * See `struct v4l2_vp9_prob_updates` for details.\n> > > > > + */\n> > > > > +struct v4l2_vp9_mv_probs {\n> > > > > +       __u8 joint[3];\n> > > > > +       __u8 sign[2];\n> > > > > +       __u8 classes[2][10];\n> > > > > +       __u8 class0_bit[2];\n> > > > > +       __u8 bits[2][10];\n> > > > > +       __u8 class0_fr[2][2][3];\n> > > > > +       __u8 fr[2][3];\n> > > > > +       __u8 class0_hp[2];\n> > > > > +       __u8 hp[2];\n> > > > > +};\n> > > > > +\n> > > > > +#define V4L2_CID_STATELESS_VP9_COMPRESSED_HDR  (V4L2_CID_CODEC_STATELESS_BASE + 301)\n> > > > > +\n> > > > > +#define V4L2_VP9_TX_MODE_ONLY_4X4                      0\n> > > > > +#define V4L2_VP9_TX_MODE_ALLOW_8X8                     1\n> > > > > +#define V4L2_VP9_TX_MODE_ALLOW_16X16                   2\n> > > > > +#define V4L2_VP9_TX_MODE_ALLOW_32X32                   3\n> > > > > +#define V4L2_VP9_TX_MODE_SELECT                                4\n> > > > > +\n> > > > > +/**\n> > > > > + * struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n> > > > > + * @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n> > > > > + * @tx8: TX 8x8 probability updates.\n> > > > > + * @tx16: TX 16x16 probability updates.\n> > > > > + * @tx32: TX 32x32 probability updates.\n> > > > > + * @coef: coefficient probability updates.\n> > > > > + * @skip: skip probability updates.\n> > > > > + * @inter_mode: inter mode probability updates.\n> > > > > + * @interp_filter: interpolation filter probability updates.\n> > > > > + * @is_inter: is inter-block probability updates.\n> > > > > + * @comp_mode: compound prediction mode probability updates.\n> > > > > + * @single_ref: single ref probability updates.\n> > > > > + * @comp_ref: compound ref probability updates.\n> > > > > + * @y_mode: Y prediction mode probability updates.\n> > > > > + * @uv_mode: UV prediction mode probability updates.\n> > > > > + * @partition: partition probability updates.\n> > > > > + * @mv: motion vector probability updates.\n> > > > > + *\n> > > > > + * This structure holds the probabilities update as parsed in the compressed\n> > > > > + * header (Spec 6.3). These values represent the value of probability update after\n> > > > > + * being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n> > > > > + * means that there is no update of the relevant probability.\n> > > > > + *\n> > > > > + * This control is optional and needs to be used when dealing with the hardware which is\n> > > > > + * not capable of parsing the compressed header itself. Only drivers which need it will\n> > > > > + * implement it.\n> > > > > + */\n> > > > > +struct v4l2_ctrl_vp9_compressed_hdr {\n> > > > > +       __u8 tx_mode;\n> > > > > +       __u8 tx8[2][1];\n> > > > > +       __u8 tx16[2][2];\n> > > > > +       __u8 tx32[2][3];\n> > > > > +       __u8 coef[4][2][2][6][6][3];\n> > > > > +       __u8 skip[3];\n> > > > > +       __u8 inter_mode[7][3];\n> > > > > +       __u8 interp_filter[4][2];\n> > > > > +       __u8 is_inter[4];\n> > > > > +       __u8 comp_mode[5];\n> > > > > +       __u8 single_ref[5][2];\n> > > > > +       __u8 comp_ref[5];\n> > > > > +       __u8 y_mode[4][9];\n> > > > > +       __u8 uv_mode[10][9];\n> > > > > +       __u8 partition[16][3];\n> > > > > +\n> > > > > +       struct v4l2_vp9_mv_probs mv;\n> > > > > +};\n> > > > > +\n> > > > >  /* MPEG-compression definitions kept for backwards compatibility */\n> > > > >  #define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC\n> > > > >  #define V4L2_CID_MPEG_CLASS             V4L2_CID_CODEC_CLASS\n> > > > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\n> > > > > index dcc0b01dfa9a..6e3d58e5a5c4 100644\n> > > > > --- a/include/linux/videodev2.h\n> > > > > +++ b/include/linux/videodev2.h\n> > > > > @@ -563,6 +563,7 @@ struct v4l2_pix_format {\n> > > > >  /* Grey bit-packed formats */\n> > > > >  #define V4L2_PIX_FMT_Y10BPACK    v4l2_fourcc('Y', '1', '0', 'B') /* 10  Greyscale bit-packed */\n> > > > >  #define V4L2_PIX_FMT_Y10P    v4l2_fourcc('Y', '1', '0', 'P') /* 10  Greyscale, MIPI RAW10 packed */\n> > > > > +#define V4L2_PIX_FMT_IPU3_Y10          v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */\n> > > > >\n> > > > >  /* Palette formats */\n> > > > >  #define V4L2_PIX_FMT_PAL8    v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit palette */\n> > > > > @@ -626,6 +627,8 @@ struct v4l2_pix_format {\n> > > > >  /* Tiled YUV formats, non contiguous planes */\n> > > > >  #define V4L2_PIX_FMT_NV12MT  v4l2_fourcc('T', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 tiles */\n> > > > >  #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12  Y/CbCr 4:2:0 16x16 tiles */\n> > > > > +#define V4L2_PIX_FMT_NV12M_8L128      v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */\n> > > > > +#define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */\n> > > > >\n> > > > >  /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */\n> > > > >  #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B', 'A', '8', '1') /*  8  BGBG.. GRGR.. */\n> > > > > @@ -697,6 +700,7 @@ struct v4l2_pix_format {\n> > > > >  #define V4L2_PIX_FMT_VP8      v4l2_fourcc('V', 'P', '8', '0') /* VP8 */\n> > > > >  #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */\n> > > > >  #define V4L2_PIX_FMT_VP9      v4l2_fourcc('V', 'P', '9', '0') /* VP9 */\n> > > > > +#define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */\n> > > > >  #define V4L2_PIX_FMT_HEVC     v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */\n> > > > >  #define V4L2_PIX_FMT_FWHT     v4l2_fourcc('F', 'W', 'H', 'T') /* Fast Walsh Hadamard Transform (vicodec) */\n> > > > >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */\n> > > > > @@ -737,8 +741,10 @@ struct v4l2_pix_format {\n> > > > >  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */\n> > > > >  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */\n> > > > >  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */\n> > > > > +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */\n> > > > > +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */\n> > > > >\n> > > > > -/* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > > > +/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */\n> > > > >  #define V4L2_PIX_FMT_IPU3_SBGGR10      v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */\n> > > > >  #define V4L2_PIX_FMT_IPU3_SGBRG10      v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer */\n> > > > >  #define V4L2_PIX_FMT_IPU3_SGRBG10      v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */\n> > > > > @@ -1732,6 +1738,8 @@ struct v4l2_ext_control {\n> > > > >                 struct v4l2_ctrl_mpeg2_sequence *p_mpeg2_sequence;\n> > > > >                 struct v4l2_ctrl_mpeg2_picture *p_mpeg2_picture;\n> > > > >                 struct v4l2_ctrl_mpeg2_quantisation *p_mpeg2_quantisation;\n> > > > > +               struct v4l2_ctrl_vp9_compressed_hdr *p_vp9_compressed_hdr_probs;\n> > > > > +               struct v4l2_ctrl_vp9_frame *p_vp9_frame;\n> > > > >                 void *ptr;\n> > > > >         };\n> > > > >  } __attribute__ ((packed));\n> > > > > @@ -1792,6 +1800,9 @@ enum v4l2_ctrl_type {\n> > > > >         V4L2_CTRL_TYPE_MPEG2_QUANTISATION   = 0x0250,\n> > > > >         V4L2_CTRL_TYPE_MPEG2_SEQUENCE       = 0x0251,\n> > > > >         V4L2_CTRL_TYPE_MPEG2_PICTURE        = 0x0252,\n> > > > > +\n> > > > > +       V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR       = 0x0260,\n> > > > > +       V4L2_CTRL_TYPE_VP9_FRAME                = 0x0261,\n> > > > >  };\n> > > > >\n> > > > >  /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A49CDBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 12:52:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 20C616330F;\n\tTue,  2 Aug 2022 14:52:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A226A603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 14:52:46 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 10D2325B;\n\tTue,  2 Aug 2022 14:52:46 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659444768;\n\tbh=CMP4t1HGLKVaE7Ic+Sbm3tTOh9qgnJDHRHuOQiNoxVE=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=G0Dd1OXXEnCYiWvlOoM6QTxM8IhWjs4eLYQQi9yt02Da0l79P8/9JrUlZLp5+Zz1Y\n\tuNS3Tde3Nkz8OfNHIbSuzXCDEtSmIiyVfK5dajc/yb6bOBkvA5WsorndXDG8dh60VQ\n\tfuxONx9CITZ0DVdn2h6jrjCBMPxYuIpOpWk1noMKNRaC9gTVlZqIxDipCzH9Yk20hH\n\t32BmwFYrvzNFylQmNCm5KMyaZEG7UdNdjpszFEmDItUuOlAXx1M8ker2IuL9JUmLKX\n\tsN6eA8Y3KCtSLKOl17KUtSOY/2enAB0QjITGKvyz+ievB3ooJLOH6LK1NZHMI4dRPi\n\tEYFuES1xoVOpw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659444766;\n\tbh=CMP4t1HGLKVaE7Ic+Sbm3tTOh9qgnJDHRHuOQiNoxVE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=oA3XTa5MVSuWKyEEehFS5tqDqiEOX8bDXYOeI7WvWfP8aW6T835UegVyzxKj1BZDs\n\tT0oROeOLafO5g763y9YQDqgQlb7kaMTF3q2ZdNJUcXeQFn55uI4pYp57y2CVLt775g\n\tzaZ4arr16CF4/OTefqSN7pmoMA9NO7XV64+PEjcA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"oA3XTa5M\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Yuj6ozm3r7SutbIo@pendragon.ideasonboard.com>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>\n\t<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>\n\t<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>\n\t<Yuj6ozm3r7SutbIo@pendragon.ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tLaurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Date":"Tue, 02 Aug 2022 13:52:43 +0100","Message-ID":"<165944476381.989512.17817194188655692255@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24309,"web_url":"https://patchwork.libcamera.org/comment/24309/","msgid":"<165944485406.989512.8302792925763188266@Monstersaurus>","date":"2022-08-02T12:54:14","subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2022-08-02 13:52:43)\n> Quoting Laurent Pinchart via libcamera-devel (2022-08-02 11:21:23)\n> > Hi Jacopo,\n> > \n> > On Tue, Aug 02, 2022 at 09:52:08AM +0200, Jacopo Mondi wrote:\n> > > On Mon, Aug 01, 2022 at 10:47:04PM +0300, Laurent Pinchart wrote:\n> > > > On Mon, Aug 01, 2022 at 05:16:29PM +0200, Jacopo Mondi wrote:\n> > > > > On Mon, Aug 01, 2022 at 03:05:31AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > > > > > Update kernel headers to v5.19 using utils/update-kernel-headers.sh and\n> > > > > > re-instating libcamera local modifications.\n> > > > >\n> > > > > Don't we need something better than this ?\n> > > > >\n> > > > > should we regularly rebase the libcamera-changes on top of a new\n> > > > > header export per each kernel release ?\n> > > > >\n> > > > > Otherwise updating headers and re-applying the local modifications in\n> > > > > one go makes it impossible to actually track what's local and what's\n> > > > > upstream ?\n> > > >\n> > > > This patch was possibly easier to generate than it is to review. The\n> > > > update-kernel-headers.sh script undoes all the local changes, and I've\n> > > > then used git add -p to avoid picking up the reverts. This is a manual\n> > > > process that can lead to errors.\n> > > \n> > > The error-proness is what I'm concerned with\n> > > \n> > > > On the review side, it's really about making sure that the update\n> > > > doesn't drop any of the features we depend on. It may seem error-prone\n> > > > too, but most (not all though) of the local changes we carry will be\n> > > > detected at compilation time of reverted.\n> > > \n> > > True that\n> > > \n> > > > The best way to avoid all this is of course to upstream all the changes,\n> > > > and that's something we keep working on, with various delays depending\n> > > > on the features. For instance, patches 02/13 and 03/13 in this series\n> > > > will effectively disappear once we upgrade to the v5.20 kernel headers.\n> > > > Other changes take longer to upstream.\n> > > >\n> > > > I'm open to other ideas to improve the process, but completely\n> > > > overwriting the headers and then reapplying local changes on top will\n> > > > break compilation during bisection.\n> > > \n> > > I can only suggest to do that on the side and compare the output.\n> > > But that's a suggestion for review more than for development.\n> > \n> > We could indeed post the change as two patches, one that overwrites\n> > everything, and the second one that reapplies our local changes, and\n> > squash when pushing.\n> \n> I wouldn't even squash. We could simply keep re-cherry-picking the\n> add-on commits. That would make it clear that the import overwrites the\n> additions, and then we clearly bring them back in reviewable chunks 'on\n> top' of the latest kernel headers.\n\nArgh, except that would break compilation bisectability ... so yes, we\nwould have to squash them :-(","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E42ABBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 12:54:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD48F63313;\n\tTue,  2 Aug 2022 14:54:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7CF86603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 14:54:16 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 36ED725B;\n\tTue,  2 Aug 2022 14:54:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659444857;\n\tbh=ffNdXeIjKEjlkxfM9VqibJI/UzceWOi3vH4xh8SyyfE=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=RH3ZlwHXxaUQrHw+1WWi0SzVp8hI44O+6+0nqGh7wi7ROBlg8SOolRSXpVL7LgYKn\n\tkNHtX9og1OBt+OKR6AodFIBlyO/y4S4IuKaAhvavrCtGThSvQ0t/8jP3aAKDGW7BPQ\n\t0VXK/27OJU6uQJ+kxwzK1jvksY7kUTVs5wWOz77xysIjQe0Li6dtjBUy8wTVLwxywW\n\t8x2Bi0oJzFfXv7fXNjQr4/Tukb2kixROdszoOBXKBV35Ubk6v+ASoPketOEQGuzxxZ\n\thg1vDTQi4LUcyVPzEBXa5zSeUzv+vMmYa7AY6QK4yVhs9sWP4RhWafeOXwxrInpIDs\n\tbO+z4M0QXUXvA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659444856;\n\tbh=ffNdXeIjKEjlkxfM9VqibJI/UzceWOi3vH4xh8SyyfE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Z/3vRIj6av7MWgIPGnf/xDn21BsxKNG9guGyyX3wQPDOfxaJlfA3cOBCb75FKG9UM\n\tXXc30dWoN5ad7D7a0rjjPQ3OWysg32kbs9L38pxLBN/vMrLDVmyzLMpNUF/7Y1Gc6I\n\tUFMbX3J59ZAF52gv1H2ioR+6OEu0mIlM2QkArXBc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Z/3vRIj6\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<165944476381.989512.17817194188655692255@Monstersaurus>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-2-laurent.pinchart@ideasonboard.com>\n\t<20220801151629.spsoekliqb6kxp4c@uno.localdomain>\n\t<YugtuEDOlkXJOd7c@pendragon.ideasonboard.com>\n\t<20220802075208.cbykh7yqwdkcv4ze@uno.localdomain>\n\t<Yuj6ozm3r7SutbIo@pendragon.ideasonboard.com>\n\t<165944476381.989512.17817194188655692255@Monstersaurus>","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tLaurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Date":"Tue, 02 Aug 2022 13:54:14 +0100","Message-ID":"<165944485406.989512.8302792925763188266@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 01/13] include: linux: Update kernel\n\theaders to version v5.19","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]