Patch Detail
Show a patch.
GET /api/patches/27437/?format=api
{ "id": 27437, "url": "https://patchwork.libcamera.org/api/patches/27437/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27437/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260722-pi4-upstream-v2-2-eb44d3c6fd92@ideasonboard.com>", "date": "2026-07-22T11:23:18", "name": "[v2,2/8] include: uapi: bcm2835-isp: Add extensible parameter buffer interface", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1fe8339f7936571a34b57206b625cb24bc950efe", "submitter": { "id": 223, "url": "https://patchwork.libcamera.org/api/people/223/?format=api", "name": "Jai Luthra", "email": "jai.luthra@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/27437/mbox/", "series": [ { "id": 6072, "url": "https://patchwork.libcamera.org/api/series/6072/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6072", "date": "2026-07-22T11:23:16", "name": "Raspberry Pi: Update VC4 pipeline for mainline", "version": 2, "mbox": "https://patchwork.libcamera.org/series/6072/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27437/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27437/checks/", "tags": {}, "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 7052BBDE17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 22 Jul 2026 11:24:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1E7C967E95;\n\tWed, 22 Jul 2026 13:24:52 +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 7E6FD67E8A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Jul 2026 13:24:50 +0200 (CEST)", "from mail.ideasonboard.com (unknown\n\t[IPv6:2401:4900:1c68:25d4:fa24:78d1:31:7a56])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E922227;\n\tWed, 22 Jul 2026 13:23:49 +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=\"Sqc/Q1CI\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784719430;\n\tbh=Tom9zcr7m+uVm3IWfbKXSceiwM1Aev3qwGzYHJZHOFE=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=Sqc/Q1CIqT1xRl6UTMEIAGtuS3YHaYd6P5qaSbWaKw+lcncsMZTFQTw8Vn9kmmsE8\n\tgLwcuhyYtf2RETx5IAxxQClR70mqcizy3bVffYsmtCLeMrky8Af4BLcik8Jp89I2Dx\n\t7R4lgkwr5M2Ou2jC7pYRbwyWaozELw0qQgDVJJPo=", "From": "Jai Luthra <jai.luthra@ideasonboard.com>", "Date": "Wed, 22 Jul 2026 16:53:18 +0530", "Subject": "[PATCH v2 2/8] include: uapi: bcm2835-isp: Add extensible\n\tparameter buffer interface", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260722-pi4-upstream-v2-2-eb44d3c6fd92@ideasonboard.com>", "References": "<20260722-pi4-upstream-v2-0-eb44d3c6fd92@ideasonboard.com>", "In-Reply-To": "<20260722-pi4-upstream-v2-0-eb44d3c6fd92@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Naushir Patuck <naush@raspberrypi.com>, \n\tDavid Plowman <david.plowman@raspberrypi.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>, \n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tDaniel Scally <dan.scally@ideasonboard.com>, \n\tJai Luthra <jai.luthra@ideasonboard.com>", "X-Mailer": "b4 0.14.3", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=9226;\n\ti=jai.luthra@ideasonboard.com; h=from:subject:message-id;\n\tbh=Tom9zcr7m+uVm3IWfbKXSceiwM1Aev3qwGzYHJZHOFE=;\n\tb=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBqYKhpL2pRuan0OHdzOq/zZQL52urYiXgT+Ng97\n\t4n49b5FuG6JAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCamCoaQAKCRBD3pH5JJpx\n\tRcOFD/4xw3OcrppbyJ3wClwVVIo5VaIv08lRW/jGlKEYKdg6aqHd/3atUVXG/YFS8DUkq9aXtpa\n\tO6rEDbUoHBn2DapqKf/ULmg9oDlql74laiemOWDFpY5y+hp7BcCyoCmUJNok6cXJkMpg9DOS9Ju\n\tuVN/8oPF70kdb9ezsagOtw5NfXci1sl/WXNiem7zbl1DFSqoU7SkuMeqmJC7B5By6C/tVZ6AztB\n\tOcgOh59hvKIu3HMv06+Wh3SRlg+nPalV90hKimyprPIRy/cUVJwZQIUnPXxrBY15RMD9l6rVl+O\n\t2E9WvV2387Bf6Ztl0zPmn/RDdLU7848KzYw4AOQfSiNVyqRdKECFkrk8HUvWVfz2reCF211rmq/\n\tAXq0et7xTxrfxkWOKfIUIADxfMw6GX/TUoI4dA3zrRWUd8sRXbwB5LAQbviRX6CPlKWcpuhHUNX\n\tx4zjLiskIKEzwlTjY1OJX34hEgpXXFia9zCjwiRJjzKsUtrLGE1i4NrkSxhUpOjhcRYkZnPNKqW\n\tdBoYLESmSopzrHuGdo8E+6PHVukhTs7a+nGljuc/sfcBW36hDMLYkjk4duKdNWj9AMqXtLSP0Pv\n\tQmH9MPgrBtYPUKcAm5D2TDTZLUniru6s3FAzkYWzisdBewx1p6u7PLLo8paGruh08f9j2TMoxE6\n\tQDwFnBWUnl0wlrQ==", "X-Developer-Key": "i=jai.luthra@ideasonboard.com; a=openpgp;\n\tfpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145", "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>" }, "content": "The mainline BCM2835 ISP driver expects per-frame configuration via\nparameter buffers rather than V4L2 controls; keep the legacy control\nIDs in place for now so libcamera keeps compiling during the switch.\n\nSigned-off-by: Jai Luthra <jai.luthra@ideasonboard.com>\n---\n include/linux/bcm2835-isp.h | 213 ++++++++++++++++++++++++++++++++++++++++++++\n include/linux/videodev2.h | 1 +\n 2 files changed, 214 insertions(+)", "diff": "diff --git a/include/linux/bcm2835-isp.h b/include/linux/bcm2835-isp.h\nindex 5f0f78e3e..c49854cfa 100644\n--- a/include/linux/bcm2835-isp.h\n+++ b/include/linux/bcm2835-isp.h\n@@ -14,6 +14,7 @@\n #define __BCM2835_ISP_H_\n \n #include <linux/v4l2-controls.h>\n+#include <linux/media/v4l2-isp.h>\n \n #define V4L2_CID_USER_BCM2835_ISP_CC_MATRIX\t\\\n \t\t\t\t(V4L2_CID_USER_BCM2835_ISP_BASE + 0x0001)\n@@ -258,6 +259,218 @@ struct bcm2835_isp_dpc {\n \t__u32 strength;\n };\n \n+/**\n+ * struct bcm2835_isp_awb_gains - AWB gains configuration.\n+ *\n+ * @r_gain:\tRed channel AWB gain.\n+ * @b_gain:\tBlue channel AWB gain.\n+ */\n+struct bcm2835_isp_awb_gains {\n+\tstruct bcm2835_isp_rational r_gain;\n+\tstruct bcm2835_isp_rational b_gain;\n+};\n+\n+/**\n+ * struct bcm2835_isp_digital_gain - Digital gain configuration.\n+ *\n+ * @gain:\tDigital gain value.\n+ */\n+struct bcm2835_isp_digital_gain {\n+\tstruct bcm2835_isp_rational gain;\n+};\n+\n+/*\n+ * BCM2835 ISP extensible parameters buffer definitions.\n+ *\n+ * The extensible parameters mechanism allows userspace to submit ISP\n+ * configuration parameters as a buffer containing a series of tagged\n+ * blocks rather than individual V4L2 controls. This enables atomic\n+ * application of multiple parameters in a single operation.\n+ */\n+\n+/**\n+ * enum bcm2835_isp_param_buffer_version - BCM2835 ISP parameters buffer version\n+ *\n+ * @BCM2835_ISP_PARAM_BUFFER_V1: First version of parameters buffer format\n+ */\n+enum bcm2835_isp_param_buffer_version {\n+\tBCM2835_ISP_PARAM_BUFFER_V1 = V4L2_ISP_PARAMS_VERSION_V1,\n+};\n+\n+/**\n+ * enum bcm2835_isp_param_block_type - BCM2835 ISP parameter block types\n+ *\n+ * This enumeration defines the types of parameters blocks that can be\n+ * included in the extensible parameters buffer. Each block type corresponds\n+ * to a specific ISP processing block configuration.\n+ *\n+ * @BCM2835_ISP_PARAM_BLOCK_BLACK_LEVEL: Black level configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_GEQ: Green equalisation configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_GAMMA: Gamma curve configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_DENOISE: Denoise configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_SHARPEN: Sharpening configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_DPC: Defective pixel correction configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_CDN: Colour denoise configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_CC_MATRIX: Colour correction matrix configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_LENS_SHADING: Lens shading table configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_AWB_GAINS: AWB gains configuration\n+ * @BCM2835_ISP_PARAM_BLOCK_DIGITAL_GAIN: Digital gain configuration\n+ */\n+enum bcm2835_isp_param_block_type {\n+\tBCM2835_ISP_PARAM_BLOCK_BLACK_LEVEL,\n+\tBCM2835_ISP_PARAM_BLOCK_GEQ,\n+\tBCM2835_ISP_PARAM_BLOCK_GAMMA,\n+\tBCM2835_ISP_PARAM_BLOCK_DENOISE,\n+\tBCM2835_ISP_PARAM_BLOCK_SHARPEN,\n+\tBCM2835_ISP_PARAM_BLOCK_DPC,\n+\tBCM2835_ISP_PARAM_BLOCK_CDN,\n+\tBCM2835_ISP_PARAM_BLOCK_CC_MATRIX,\n+\tBCM2835_ISP_PARAM_BLOCK_LENS_SHADING,\n+\tBCM2835_ISP_PARAM_BLOCK_AWB_GAINS,\n+\tBCM2835_ISP_PARAM_BLOCK_DIGITAL_GAIN,\n+};\n+\n+/**\n+ * struct bcm2835_isp_params_black_level - Black level parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_BLACK_LEVEL)\n+ * @black_level: Black level configuration\n+ */\n+struct bcm2835_isp_params_black_level {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_black_level black_level;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_geq - Green equalisation parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_GEQ)\n+ * @geq: Green equalisation configuration\n+ */\n+struct bcm2835_isp_params_geq {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_geq geq;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_gamma - Gamma parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_GAMMA)\n+ * @gamma: Gamma curve configuration\n+ */\n+struct bcm2835_isp_params_gamma {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_gamma gamma;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_denoise - Denoise parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_DENOISE)\n+ * @denoise: Denoise configuration\n+ */\n+struct bcm2835_isp_params_denoise {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_denoise denoise;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_sharpen - Sharpen parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_SHARPEN)\n+ * @sharpen: Sharpening configuration\n+ */\n+struct bcm2835_isp_params_sharpen {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_sharpen sharpen;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_dpc - Defective pixel correction parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_DPC)\n+ * @dpc: DPC configuration\n+ */\n+struct bcm2835_isp_params_dpc {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_dpc dpc;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_cdn - Colour denoise parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_CDN)\n+ * @cdn: Colour denoise configuration\n+ */\n+struct bcm2835_isp_params_cdn {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_cdn cdn;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_cc_matrix - Colour correction matrix parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_CC_MATRIX)\n+ * @ccm: Colour correction matrix configuration\n+ */\n+struct bcm2835_isp_params_cc_matrix {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_custom_ccm ccm;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_lens_shading - Lens shading parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_LENS_SHADING)\n+ * @ls: Lens shading configuration (includes dmabuf fd for table data)\n+ */\n+struct bcm2835_isp_params_lens_shading {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_lens_shading ls;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_awb_gains - AWB gains parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_AWB_GAINS)\n+ * @awb_gains: AWB gains configuration\n+ */\n+struct bcm2835_isp_params_awb_gains {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_awb_gains awb_gains;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * struct bcm2835_isp_params_digital_gain - Digital gain parameters block\n+ *\n+ * @header: Block header (type = BCM2835_ISP_PARAM_BLOCK_DIGITAL_GAIN)\n+ * @digital_gain: Digital gain configuration\n+ */\n+struct bcm2835_isp_params_digital_gain {\n+\tstruct v4l2_isp_params_block_header header;\n+\tstruct bcm2835_isp_digital_gain digital_gain;\n+} __attribute__((aligned(8)));\n+\n+/**\n+ * define BCM2835_ISP_PARAMS_MAX_SIZE - Maximum size of all ISP parameters\n+ *\n+ * This defines the maximum size needed to accommodate all possible parameter\n+ * blocks in a single buffer. Drivers use this to allocate appropriately\n+ * sized buffers.\n+ */\n+#define BCM2835_ISP_PARAMS_MAX_SIZE\t\t\t\t\t\\\n+\t(sizeof(struct bcm2835_isp_params_black_level) +\t\t\\\n+\t sizeof(struct bcm2835_isp_params_geq) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_gamma) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_denoise) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_sharpen) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_dpc) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_cdn) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_cc_matrix) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_lens_shading) +\t\t\\\n+\t sizeof(struct bcm2835_isp_params_awb_gains) +\t\t\t\\\n+\t sizeof(struct bcm2835_isp_params_digital_gain))\n+\n /*\n * ISP statistics structures.\n *\ndiff --git a/include/linux/videodev2.h b/include/linux/videodev2.h\nindex 8bccad84f..60133dcf9 100644\n--- a/include/linux/videodev2.h\n+++ b/include/linux/videodev2.h\n@@ -845,6 +845,7 @@ struct v4l2_pix_format {\n #define V4L2_META_FMT_VIVID\t v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */\n #define V4L2_META_FMT_SENSOR_DATA v4l2_fourcc('S', 'E', 'N', 'S') /* Sensor Ancillary metadata */\n #define V4L2_META_FMT_BCM2835_ISP_STATS v4l2_fourcc('B', 'S', 'T', 'A') /* BCM2835 ISP image statistics output */\n+#define V4L2_META_FMT_BCM2835_ISP_PARAMS v4l2_fourcc('B', 'C', 'M', 'P') /* BCM2835 ISP params */\n \n /* Vendor specific - used for RK_ISP1 camera sub-system */\n #define V4L2_META_FMT_RK_ISP1_PARAMS\tv4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */\n", "prefixes": [ "v2", "2/8" ] }