[{"id":35439,"web_url":"https://patchwork.libcamera.org/comment/35439/","msgid":"<175525827526.560048.13271096972534337014@ping.linuxembedded.co.uk>","date":"2025-08-15T11:44:35","subject":"Re: [PATCH v3 12/19] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-08-15 11:29:32)\n> Update rkisp1-config.h and v4l2-controls.h from the next branch of\n> https://gitlab.freedesktop.org/linux-media/media-committers.git to\n> include the WDR related updates. The rest was left as is to minimize the\n> risk of issues due to last minute changes in the upstream process.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n> \n> Changes in v3:\n> - Limit changes to the bare minimum required for rkisp1\n> \n> Changes in v2:\n> - Updated headers from linux-media next branch\n> ---\n>  include/linux/rkisp1-config.h | 108 +++++++++++++++++++++++++++++++++-\n>  include/linux/v4l2-controls.h |   6 ++\n>  2 files changed, 112 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> index edbc6cb65d1c..d323bfa72d8e 100644\n> --- a/include/linux/rkisp1-config.h\n> +++ b/include/linux/rkisp1-config.h\n> @@ -169,6 +169,13 @@\n>   */\n>  #define RKISP1_CIF_ISP_COMPAND_NUM_POINTS      64\n>  \n> +/*\n> + * Wide Dynamic Range\n> + */\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV    32\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF     (RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1)\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS   4\n> +\n>  /*\n>   * Measurement types\n>   */\n> @@ -889,6 +896,72 @@ struct rkisp1_cif_isp_compand_curve_config {\n>         __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];\n>  };\n>  \n> +/**\n> + * struct rkisp1_cif_isp_wdr_tone_curve - Tone mapping curve definition for WDR.\n> + *\n> + * @dY: the dYn increments for horizontal (input) axis of the tone curve.\n> + *      each 3-bit dY value represents an increment of 2**(value+3).\n> + *      dY[0] bits 0:2 is increment dY1, bit 3 unused\n> + *      dY[0] bits 4:6 is increment dY2, bit 7 unused\n> + *      ...\n> + *      dY[0] bits 28:30 is increment dY8, bit 31 unused\n> + *      ... and so on till dY[3] bits 28:30 is increment dY32, bit 31 unused.\n> + * @ym: the Ym values for the vertical (output) axis of the tone curve.\n> + *      each value is 13 bit.\n> + */\n> +struct rkisp1_cif_isp_wdr_tone_curve {\n> +       __u32 dY[RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS];\n> +       __u16 ym[RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF];\n> +};\n> +\n> +/**\n> + * struct rkisp1_cif_isp_wdr_iref_config - Illumination reference config for WDR.\n> + *\n> + * Use illumination reference value as described below, instead of only the\n> + * luminance (Y) value for tone mapping and gain calculations:\n> + * IRef = (rgb_factor * RGBMax_tr + (8 - rgb_factor) * Y)/8\n> + *\n> + * @rgb_factor: defines how much influence the RGBmax approach has in\n> + *              comparison to Y (valid values are 0..8).\n> + * @use_y9_8: use Y*9/8 for maximum value calculation along with the\n> + *            default of R, G, B for noise reduction.\n> + * @use_rgb7_8: decrease RGBMax by 7/8 for noise reduction.\n> + * @disable_transient: disable transient calculation between Y and RGBY_max.\n> + */\n> +struct rkisp1_cif_isp_wdr_iref_config {\n> +       __u8 rgb_factor;\n> +       __u8 use_y9_8;\n> +       __u8 use_rgb7_8;\n> +       __u8 disable_transient;\n> +};\n> +\n> +/**\n> + * struct rkisp1_cif_isp_wdr_config - Configuration for wide dynamic range.\n> + *\n> + * @tone_curve: tone mapping curve.\n> + * @iref_config: illumination reference configuration. (when use_iref is true)\n> + * @rgb_offset: RGB offset value for RGB operation mode. (12 bits)\n> + * @luma_offset: luminance offset value for RGB operation mode. (12 bits)\n> + * @dmin_thresh: lower threshold for deltaMin value. (12 bits)\n> + * @dmin_strength: strength factor for deltaMin. (valid range is 0x00..0x10)\n> + * @use_rgb_colorspace: use RGB instead of luminance/chrominance colorspace.\n> + * @bypass_chroma_mapping: disable chrominance mapping (only valid if\n> + *                         use_rgb_colorspace = 0)\n> + * @use_iref: use illumination reference instead of Y for tone mapping\n> + *            and gain calculations.\n> + */\n> +struct rkisp1_cif_isp_wdr_config {\n> +       struct rkisp1_cif_isp_wdr_tone_curve tone_curve;\n> +       struct rkisp1_cif_isp_wdr_iref_config iref_config;\n> +       __u16 rgb_offset;\n> +       __u16 luma_offset;\n> +       __u16 dmin_thresh;\n> +       __u8 dmin_strength;\n> +       __u8 use_rgb_colorspace;\n> +       __u8 bypass_chroma_mapping;\n> +       __u8 use_iref;\n> +};\n> +\n>  /*---------- PART2: Measurement Statistics ------------*/\n>  \n>  /**\n> @@ -1059,6 +1132,7 @@ struct rkisp1_stat_buffer {\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve\n> + * @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range\n>   */\n>  enum rkisp1_ext_params_block_type {\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,\n> @@ -1081,11 +1155,15 @@ enum rkisp1_ext_params_block_type {\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,\n> +       RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,\n>  };\n>  \n>  #define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE     (1U << 0)\n>  #define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE      (1U << 1)\n>  \n> +/* A bitmask of parameters blocks supported on the current hardware. */\n> +#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS     (V4L2_CID_USER_RKISP1_BASE + 0x01)\n> +\n>  /**\n>   * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block\n>   *                                        header\n> @@ -1460,6 +1538,23 @@ struct rkisp1_ext_params_compand_curve_config {\n>         struct rkisp1_cif_isp_compand_curve_config config;\n>  } __attribute__((aligned(8)));\n>  \n> +/**\n> + * struct rkisp1_ext_params_wdr_config - RkISP1 extensible params\n> + *                                       Wide dynamic range config\n> + *\n> + * RkISP1 extensible parameters WDR block.\n> + * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR`\n> + *\n> + * @header: The RkISP1 extensible parameters header, see\n> + *         :c:type:`rkisp1_ext_params_block_header`\n> + * @config: WDR configuration, see\n> + *         :c:type:`rkisp1_cif_isp_wdr_config`\n> + */\n> +struct rkisp1_ext_params_wdr_config {\n> +       struct rkisp1_ext_params_block_header header;\n> +       struct rkisp1_cif_isp_wdr_config config;\n> +} __attribute__((aligned(8)));\n> +\n>  /*\n>   * The rkisp1_ext_params_compand_curve_config structure is counted twice as it\n>   * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.\n> @@ -1484,7 +1579,8 @@ struct rkisp1_ext_params_compand_curve_config {\n>         sizeof(struct rkisp1_ext_params_afc_config)                     +\\\n>         sizeof(struct rkisp1_ext_params_compand_bls_config)             +\\\n>         sizeof(struct rkisp1_ext_params_compand_curve_config)           +\\\n> -       sizeof(struct rkisp1_ext_params_compand_curve_config))\n> +       sizeof(struct rkisp1_ext_params_compand_curve_config)           +\\\n> +       sizeof(struct rkisp1_ext_params_wdr_config))\n>  \n>  /**\n>   * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version\n> @@ -1520,6 +1616,14 @@ enum rksip1_ext_param_buffer_version {\n>   * V4L2 control. If such control is not available, userspace should assume only\n>   * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.\n>   *\n> + * The read-only V4L2 control ``RKISP1_CID_SUPPORTED_PARAMS_BLOCKS`` can be used\n> + * to query the blocks supported by the device. It contains a bitmask where each\n> + * bit represents the availability of the corresponding entry from the\n> + * :c:type:`rkisp1_ext_params_block_type` enum. The current and default values\n> + * of the control represents the blocks supported by the device instance, while\n> + * the maximum value represents the blocks supported by the kernel driver,\n> + * independently of the device instance.\n> + *\n>   * For each ISP block that userspace wants to configure, a block-specific\n>   * structure is appended to the @data buffer, one after the other without gaps\n>   * in between nor overlaps. Userspace shall populate the @data_size field with\n> @@ -1528,7 +1632,7 @@ enum rksip1_ext_param_buffer_version {\n>   * The expected memory layout of the parameters buffer is::\n>   *\n>   *     +-------------------- struct rkisp1_ext_params_cfg -------------------+\n> - *     | version = RKISP_EXT_PARAMS_BUFFER_V1;                               |\n> + *     | version = RKISP1_EXT_PARAM_BUFFER_V1;                               |\n>   *     | data_size = sizeof(struct rkisp1_ext_params_bls_config)             |\n>   *     |           + sizeof(struct rkisp1_ext_params_dpcc_config);           |\n>   *     | +------------------------- data  ---------------------------------+ |\n> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> index 882a81805783..4cfae0414894 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -217,6 +217,12 @@ enum v4l2_colorfx {\n>   */\n>  #define V4L2_CID_USER_THP7312_BASE             (V4L2_CID_USER_BASE + 0x11c0)\n>  \n> +/*\n> + * The base for Rockchip ISP1 driver controls.\n> + * We reserve 16 controls for this driver.\n> + */\n> +#define V4L2_CID_USER_RKISP1_BASE              (V4L2_CID_USER_BASE + 0x1220)\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> -- \n> 2.48.1\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 01737BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Aug 2025 11:44:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA30A6924E;\n\tFri, 15 Aug 2025 13:44:39 +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 A243C61443\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Aug 2025 13:44:37 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C2F1C605;\n\tFri, 15 Aug 2025 13:43:42 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"XgDb7waw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755258222;\n\tbh=3v55ZUrewtbjwuVhjQuDZecIhZp/3BUCoHwXATKoJJs=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=XgDb7waw895lHLSaC0UiXzrynAapUyOYYim3hSUn3kndQw+fULdJF9BmX5vsqZjqx\n\tKbHkv/kTzn56HGoxuk8N+zEX2JUAIUxL7WTq5Ni52jH7gkUEWTjK86r2GaE81NNxs2\n\t+qaSolBlW7vP0DvBIrc8Ac9rxEENeEN+zTmtkUsw=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250815102945.1602071-13-stefan.klug@ideasonboard.com>","References":"<20250815102945.1602071-1-stefan.klug@ideasonboard.com>\n\t<20250815102945.1602071-13-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v3 12/19] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 15 Aug 2025 12:44:35 +0100","Message-ID":"<175525827526.560048.13271096972534337014@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35714,"web_url":"https://patchwork.libcamera.org/comment/35714/","msgid":"<175706898081.1787083.5070293139050859561@neptunite.rasen.tech>","date":"2025-09-05T10:43:00","subject":"Re: [PATCH v3 12/19] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Stefan Klug (2025-08-15 19:29:32)\n> Update rkisp1-config.h and v4l2-controls.h from the next branch of\n> https://gitlab.freedesktop.org/linux-media/media-committers.git to\n> include the WDR related updates. The rest was left as is to minimize the\n> risk of issues due to last minute changes in the upstream process.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nAcked-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> \n> ---\n> \n> Changes in v3:\n> - Limit changes to the bare minimum required for rkisp1\n> \n> Changes in v2:\n> - Updated headers from linux-media next branch\n> ---\n>  include/linux/rkisp1-config.h | 108 +++++++++++++++++++++++++++++++++-\n>  include/linux/v4l2-controls.h |   6 ++\n>  2 files changed, 112 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/linux/rkisp1-config.h b/include/linux/rkisp1-config.h\n> index edbc6cb65d1c..d323bfa72d8e 100644\n> --- a/include/linux/rkisp1-config.h\n> +++ b/include/linux/rkisp1-config.h\n> @@ -169,6 +169,13 @@\n>   */\n>  #define RKISP1_CIF_ISP_COMPAND_NUM_POINTS      64\n>  \n> +/*\n> + * Wide Dynamic Range\n> + */\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV    32\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF     (RKISP1_CIF_ISP_WDR_CURVE_NUM_INTERV + 1)\n> +#define RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS   4\n> +\n>  /*\n>   * Measurement types\n>   */\n> @@ -889,6 +896,72 @@ struct rkisp1_cif_isp_compand_curve_config {\n>         __u32 y[RKISP1_CIF_ISP_COMPAND_NUM_POINTS];\n>  };\n>  \n> +/**\n> + * struct rkisp1_cif_isp_wdr_tone_curve - Tone mapping curve definition for WDR.\n> + *\n> + * @dY: the dYn increments for horizontal (input) axis of the tone curve.\n> + *      each 3-bit dY value represents an increment of 2**(value+3).\n> + *      dY[0] bits 0:2 is increment dY1, bit 3 unused\n> + *      dY[0] bits 4:6 is increment dY2, bit 7 unused\n> + *      ...\n> + *      dY[0] bits 28:30 is increment dY8, bit 31 unused\n> + *      ... and so on till dY[3] bits 28:30 is increment dY32, bit 31 unused.\n> + * @ym: the Ym values for the vertical (output) axis of the tone curve.\n> + *      each value is 13 bit.\n> + */\n> +struct rkisp1_cif_isp_wdr_tone_curve {\n> +       __u32 dY[RKISP1_CIF_ISP_WDR_CURVE_NUM_DY_REGS];\n> +       __u16 ym[RKISP1_CIF_ISP_WDR_CURVE_NUM_COEFF];\n> +};\n> +\n> +/**\n> + * struct rkisp1_cif_isp_wdr_iref_config - Illumination reference config for WDR.\n> + *\n> + * Use illumination reference value as described below, instead of only the\n> + * luminance (Y) value for tone mapping and gain calculations:\n> + * IRef = (rgb_factor * RGBMax_tr + (8 - rgb_factor) * Y)/8\n> + *\n> + * @rgb_factor: defines how much influence the RGBmax approach has in\n> + *              comparison to Y (valid values are 0..8).\n> + * @use_y9_8: use Y*9/8 for maximum value calculation along with the\n> + *            default of R, G, B for noise reduction.\n> + * @use_rgb7_8: decrease RGBMax by 7/8 for noise reduction.\n> + * @disable_transient: disable transient calculation between Y and RGBY_max.\n> + */\n> +struct rkisp1_cif_isp_wdr_iref_config {\n> +       __u8 rgb_factor;\n> +       __u8 use_y9_8;\n> +       __u8 use_rgb7_8;\n> +       __u8 disable_transient;\n> +};\n> +\n> +/**\n> + * struct rkisp1_cif_isp_wdr_config - Configuration for wide dynamic range.\n> + *\n> + * @tone_curve: tone mapping curve.\n> + * @iref_config: illumination reference configuration. (when use_iref is true)\n> + * @rgb_offset: RGB offset value for RGB operation mode. (12 bits)\n> + * @luma_offset: luminance offset value for RGB operation mode. (12 bits)\n> + * @dmin_thresh: lower threshold for deltaMin value. (12 bits)\n> + * @dmin_strength: strength factor for deltaMin. (valid range is 0x00..0x10)\n> + * @use_rgb_colorspace: use RGB instead of luminance/chrominance colorspace.\n> + * @bypass_chroma_mapping: disable chrominance mapping (only valid if\n> + *                         use_rgb_colorspace = 0)\n> + * @use_iref: use illumination reference instead of Y for tone mapping\n> + *            and gain calculations.\n> + */\n> +struct rkisp1_cif_isp_wdr_config {\n> +       struct rkisp1_cif_isp_wdr_tone_curve tone_curve;\n> +       struct rkisp1_cif_isp_wdr_iref_config iref_config;\n> +       __u16 rgb_offset;\n> +       __u16 luma_offset;\n> +       __u16 dmin_thresh;\n> +       __u8 dmin_strength;\n> +       __u8 use_rgb_colorspace;\n> +       __u8 bypass_chroma_mapping;\n> +       __u8 use_iref;\n> +};\n> +\n>  /*---------- PART2: Measurement Statistics ------------*/\n>  \n>  /**\n> @@ -1059,6 +1132,7 @@ struct rkisp1_stat_buffer {\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS: BLS in the compand block\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND: Companding expand curve\n>   * @RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS: Companding compress curve\n> + * @RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR: Wide dynamic range\n>   */\n>  enum rkisp1_ext_params_block_type {\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS,\n> @@ -1081,11 +1155,15 @@ enum rkisp1_ext_params_block_type {\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_BLS,\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_EXPAND,\n>         RKISP1_EXT_PARAMS_BLOCK_TYPE_COMPAND_COMPRESS,\n> +       RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR,\n>  };\n>  \n>  #define RKISP1_EXT_PARAMS_FL_BLOCK_DISABLE     (1U << 0)\n>  #define RKISP1_EXT_PARAMS_FL_BLOCK_ENABLE      (1U << 1)\n>  \n> +/* A bitmask of parameters blocks supported on the current hardware. */\n> +#define RKISP1_CID_SUPPORTED_PARAMS_BLOCKS     (V4L2_CID_USER_RKISP1_BASE + 0x01)\n> +\n>  /**\n>   * struct rkisp1_ext_params_block_header - RkISP1 extensible parameters block\n>   *                                        header\n> @@ -1460,6 +1538,23 @@ struct rkisp1_ext_params_compand_curve_config {\n>         struct rkisp1_cif_isp_compand_curve_config config;\n>  } __attribute__((aligned(8)));\n>  \n> +/**\n> + * struct rkisp1_ext_params_wdr_config - RkISP1 extensible params\n> + *                                       Wide dynamic range config\n> + *\n> + * RkISP1 extensible parameters WDR block.\n> + * Identified by :c:type:`RKISP1_EXT_PARAMS_BLOCK_TYPE_WDR`\n> + *\n> + * @header: The RkISP1 extensible parameters header, see\n> + *         :c:type:`rkisp1_ext_params_block_header`\n> + * @config: WDR configuration, see\n> + *         :c:type:`rkisp1_cif_isp_wdr_config`\n> + */\n> +struct rkisp1_ext_params_wdr_config {\n> +       struct rkisp1_ext_params_block_header header;\n> +       struct rkisp1_cif_isp_wdr_config config;\n> +} __attribute__((aligned(8)));\n> +\n>  /*\n>   * The rkisp1_ext_params_compand_curve_config structure is counted twice as it\n>   * is used for both the COMPAND_EXPAND and COMPAND_COMPRESS block types.\n> @@ -1484,7 +1579,8 @@ struct rkisp1_ext_params_compand_curve_config {\n>         sizeof(struct rkisp1_ext_params_afc_config)                     +\\\n>         sizeof(struct rkisp1_ext_params_compand_bls_config)             +\\\n>         sizeof(struct rkisp1_ext_params_compand_curve_config)           +\\\n> -       sizeof(struct rkisp1_ext_params_compand_curve_config))\n> +       sizeof(struct rkisp1_ext_params_compand_curve_config)           +\\\n> +       sizeof(struct rkisp1_ext_params_wdr_config))\n>  \n>  /**\n>   * enum rksip1_ext_param_buffer_version - RkISP1 extensible parameters version\n> @@ -1520,6 +1616,14 @@ enum rksip1_ext_param_buffer_version {\n>   * V4L2 control. If such control is not available, userspace should assume only\n>   * RKISP1_EXT_PARAM_BUFFER_V1 is supported by the driver.\n>   *\n> + * The read-only V4L2 control ``RKISP1_CID_SUPPORTED_PARAMS_BLOCKS`` can be used\n> + * to query the blocks supported by the device. It contains a bitmask where each\n> + * bit represents the availability of the corresponding entry from the\n> + * :c:type:`rkisp1_ext_params_block_type` enum. The current and default values\n> + * of the control represents the blocks supported by the device instance, while\n> + * the maximum value represents the blocks supported by the kernel driver,\n> + * independently of the device instance.\n> + *\n>   * For each ISP block that userspace wants to configure, a block-specific\n>   * structure is appended to the @data buffer, one after the other without gaps\n>   * in between nor overlaps. Userspace shall populate the @data_size field with\n> @@ -1528,7 +1632,7 @@ enum rksip1_ext_param_buffer_version {\n>   * The expected memory layout of the parameters buffer is::\n>   *\n>   *     +-------------------- struct rkisp1_ext_params_cfg -------------------+\n> - *     | version = RKISP_EXT_PARAMS_BUFFER_V1;                               |\n> + *     | version = RKISP1_EXT_PARAM_BUFFER_V1;                               |\n>   *     | data_size = sizeof(struct rkisp1_ext_params_bls_config)             |\n>   *     |           + sizeof(struct rkisp1_ext_params_dpcc_config);           |\n>   *     | +------------------------- data  ---------------------------------+ |\n> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> index 882a81805783..4cfae0414894 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -217,6 +217,12 @@ enum v4l2_colorfx {\n>   */\n>  #define V4L2_CID_USER_THP7312_BASE             (V4L2_CID_USER_BASE + 0x11c0)\n>  \n> +/*\n> + * The base for Rockchip ISP1 driver controls.\n> + * We reserve 16 controls for this driver.\n> + */\n> +#define V4L2_CID_USER_RKISP1_BASE              (V4L2_CID_USER_BASE + 0x1220)\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> -- \n> 2.48.1\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 8BFD1C332E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Sep 2025 10:43:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF73F6936D;\n\tFri,  5 Sep 2025 12:43:27 +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 959976935D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Sep 2025 12:43:09 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:dbfb:387c:7405:52bc])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id A068A166C; \n\tFri,  5 Sep 2025 12:41:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"uT6RCGJQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1757068919;\n\tbh=9dsVEGTVuxjHHn77kE2Uf/+WZOzLbUz27K1VdHJ4ZNU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=uT6RCGJQ5bNnkvChGDa5WOUItGJmLDuGAZ2YU/u4squl1EUh7Zt/jzB06K1DqQlAN\n\t7QBlm6YYQCoWO0OrY5hnhUcjmlIqSIFKBkHJ61LbeH0FTIUGOUgODN2wgwZF+p7h26\n\tpcpr3yrEj1ziQkOPnq3YptQVqGU4t0+53oPW5/YM=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250815102945.1602071-13-stefan.klug@ideasonboard.com>","References":"<20250815102945.1602071-1-stefan.klug@ideasonboard.com>\n\t<20250815102945.1602071-13-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v3 12/19] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","From":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 05 Sep 2025 19:43:00 +0900","Message-ID":"<175706898081.1787083.5070293139050859561@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]