[{"id":35320,"web_url":"https://patchwork.libcamera.org/comment/35320/","msgid":"<175474018911.560048.14466366285570749771@ping.linuxembedded.co.uk>","date":"2025-08-09T11:49:49","subject":"Re: [PATCH v2 11/16] 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-08 15:12:49)\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> ---\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 |  17 ++++--\n>  2 files changed, 119 insertions(+), 6 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..fc43bb09efe3 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -177,10 +177,6 @@ enum v4l2_colorfx {\n>   * We reserve 128 controls for this driver.\n>   */\n>  #define V4L2_CID_USER_CCS_BASE                 (V4L2_CID_USER_BASE + 0x10f0)\n> -\n> -/* The base for the bcm2835-isp driver controls.\n> - * We reserve 16 controls for this driver. */\n> -#define V4L2_CID_USER_BCM2835_ISP_BASE         (V4L2_CID_USER_BASE + 0x10e0)\n\nI expect this patch shouldn't be removing this?\n\n>  /*\n>   * The base for Allegro driver controls.\n>   * We reserve 16 controls for this driver.\n> @@ -217,6 +213,19 @@ enum v4l2_colorfx {\n>   */\n>  #define V4L2_CID_USER_THP7312_BASE             (V4L2_CID_USER_BASE + 0x11c0)\n>  \n> +/*\n> + * The base for the uvc driver controls.\n> + * See linux/uvcvideo.h for the list of controls.\n> + * We reserve 64 controls for this driver.\n> + */\n> +#define V4L2_CID_USER_UVC_BASE                 (V4L2_CID_USER_BASE + 0x11e0)\n\nOr adding this ?\n\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 86413BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  9 Aug 2025 11:49:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B0C786921E;\n\tSat,  9 Aug 2025 13:49:53 +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 C798E69154\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  9 Aug 2025 13:49:51 +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 1AB2B8BF;\n\tSat,  9 Aug 2025 13:49:01 +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=\"Gl8RMq8S\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1754740141;\n\tbh=HW0wf7/eO9e4mO0JH1zIOzH3mq3M9vQ1iJ1YxundopQ=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Gl8RMq8SunQBGmjYddEB63uzd8Yi38cqN4cEIm93Cm2SMhHL2hqpD2brH+FyltkL4\n\tfMpNii25Q55MsDGIV1I7pVp3yMX5snqEuoLagMnIxsfqMbbNWjLZRA8G8X9VHjg9wY\n\tctSi5M0gvW6ujnGxyiSfSPld76b4ls8Y1evOCVcU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250808141315.413839-12-stefan.klug@ideasonboard.com>","References":"<20250808141315.413839-1-stefan.klug@ideasonboard.com>\n\t<20250808141315.413839-12-stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v2 11/16] 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":"Sat, 09 Aug 2025 12:49:49 +0100","Message-ID":"<175474018911.560048.14466366285570749771@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":35327,"web_url":"https://patchwork.libcamera.org/comment/35327/","msgid":"<175489010984.354573.13602407309376545230@localhost>","date":"2025-08-11T05:28:29","subject":"Re: [PATCH v2 11/16] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the review.\n\nQuoting Kieran Bingham (2025-08-09 13:49:49)\n> Quoting Stefan Klug (2025-08-08 15:12:49)\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> > ---\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 |  17 ++++--\n> >  2 files changed, 119 insertions(+), 6 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..fc43bb09efe3 100644\n> > --- a/include/linux/v4l2-controls.h\n> > +++ b/include/linux/v4l2-controls.h\n> > @@ -177,10 +177,6 @@ enum v4l2_colorfx {\n> >   * We reserve 128 controls for this driver.\n> >   */\n> >  #define V4L2_CID_USER_CCS_BASE                 (V4L2_CID_USER_BASE + 0x10f0)\n> > -\n> > -/* The base for the bcm2835-isp driver controls.\n> > - * We reserve 16 controls for this driver. */\n> > -#define V4L2_CID_USER_BCM2835_ISP_BASE         (V4L2_CID_USER_BASE + 0x10e0)\n> \n> I expect this patch shouldn't be removing this?\n\nYes, that was the cause of one of the CI failures.\n\n> \n> >  /*\n> >   * The base for Allegro driver controls.\n> >   * We reserve 16 controls for this driver.\n> > @@ -217,6 +213,19 @@ enum v4l2_colorfx {\n> >   */\n> >  #define V4L2_CID_USER_THP7312_BASE             (V4L2_CID_USER_BASE + 0x11c0)\n> >  \n> > +/*\n> > + * The base for the uvc driver controls.\n> > + * See linux/uvcvideo.h for the list of controls.\n> > + * We reserve 64 controls for this driver.\n> > + */\n> > +#define V4L2_CID_USER_UVC_BASE                 (V4L2_CID_USER_BASE + 0x11e0)\n> \n> Or adding this ?\n\nYes, I'll drop that also.\n\nBest regards,\nStefan\n\n> \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 D4386BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Aug 2025 05:28:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D913C69220;\n\tMon, 11 Aug 2025 07:28:33 +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 DDA636921A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Aug 2025 07:28:32 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:8310:637a:ed36:7b42])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id F0ABF4C7;\n\tMon, 11 Aug 2025 07:27:40 +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=\"ue92Gnku\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1754890061;\n\tbh=6Lr33x8jixKDD3o/dKS9ltlNz4xgyf5eNr7EK1xV4Co=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ue92Gnku/Ppde7D/rn/h5OBnED3dD6n7TlmaMdSmzF5CtlBuGRd7DyfYFfJplWHWr\n\t0nIlgnBK43Twj4YzI2+Ej19gTAiNOV5WvK/tRBBETXLBnWqFH0xB0o9A64DsYeDv2M\n\tHoqHYgPAUaaIzxAntr4w8m9hSF2v/DmxtpOCbwsE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<175474018911.560048.14466366285570749771@ping.linuxembedded.co.uk>","References":"<20250808141315.413839-1-stefan.klug@ideasonboard.com>\n\t<20250808141315.413839-12-stefan.klug@ideasonboard.com>\n\t<175474018911.560048.14466366285570749771@ping.linuxembedded.co.uk>","Subject":"Re: [PATCH v2 11/16] include: linux: Partially update linux headers\n\tfrom v6.16-rc1-310-gd968e50b5c26","From":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 11 Aug 2025 07:28:29 +0200","Message-ID":"<175489010984.354573.13602407309376545230@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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>"}}]