Patch Detail
Show a patch.
GET /api/1.1/patches/23988/?format=api
{ "id": 23988, "url": "https://patchwork.libcamera.org/api/1.1/patches/23988/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23988/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250728-vd56g3_support-v2-2-cee5d5feac44@foss.st.com>", "date": "2025-07-28T09:09:15", "name": "[v2,2/4] ipa: rpi: Add vd56g3 support for rpi", "commit_ref": "c64bf58baa0beb6d9ef1064941f946f9ef801ae6", "pull_url": null, "state": "accepted", "archived": false, "hash": "7e5efc173b84bb10d2cfccc823016fd8e0418a58", "submitter": { "id": 227, "url": "https://patchwork.libcamera.org/api/1.1/people/227/?format=api", "name": "Benjamin Mugnier", "email": "benjamin.mugnier@foss.st.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23988/mbox/", "series": [ { "id": 5341, "url": "https://patchwork.libcamera.org/api/1.1/series/5341/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5341", "date": "2025-07-28T09:09:17", "name": "Add vd56g3 support for rpi and libipa", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5341/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23988/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23988/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 228E0BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 09:11:53 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE35B6914D;\n\tMon, 28 Jul 2025 11:11:52 +0200 (CEST)", "from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com\n\t[91.207.212.93])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D4BC269143\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 11:11:51 +0200 (CEST)", "from pps.filterd (m0046661.ppops.net [127.0.0.1])\n\tby mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id\n\t56S96SDB020287; Mon, 28 Jul 2025 11:11:51 +0200", "from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35])\n\tby mx07-00178001.pphosted.com (PPS) with ESMTPS id 484nwgew7p-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NOT); Mon, 28 Jul 2025 11:11:51 +0200 (MEST)", "from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20])\n\tby beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id EC30540057; \n\tMon, 28 Jul 2025 11:10:57 +0200 (CEST)", "from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69])\n\tby euls16034.sgp.st.com (STMicroelectronics) with ESMTP id\n\t3FADC6C6162; Mon, 28 Jul 2025 11:10:26 +0200 (CEST)", "from localhost (10.130.78.67) by SHFDAG1NODE1.st.com (10.75.129.69)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39;\n\tMon, 28 Jul 2025 11:10:26 +0200" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=foss.st.com header.i=@foss.st.com\n\theader.b=\"zkjO64nY\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=\n\tcc:content-transfer-encoding:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to; s=selector1; bh=\n\t/V+7Rp43NhSo0jTFHnKsG+fX6Dxj/SiAJQYw8AFSKRU=; b=zkjO64nYIdqPTMXf\n\t6JnMTJ1iQLOWvl3l3yU60eyJym7IGMRnM8qaIuu9IpgpAX/jhcpxgSRARCtgu0CP\n\tOAO28F9nZciZrYH2YGe8n0oHVv+Ns1pyhJ1HPLJf2YmcGpQi6Re1mChNCT6VQZrk\n\t8P09BmUOXeVlSbIoI00JMwBPZBTOMFyb+RDfeZ4H2+vv/moXMbrNJAHZFcRV4x6y\n\tdjK45D82i/iPdR0CmYtxK9Q92aWy9laq/g79FVgvdzJ4QdCg3pdA2RCZtPVqogAx\n\tdQTZ5EBuOJErMEbtyK2zt8UOxN8vAfFQ78Dc8zBpRXLdNl3Ksg7bM0DWkVLFJgBU\n\tHKVZ5Q==", "From": "Benjamin Mugnier <benjamin.mugnier@foss.st.com>", "Date": "Mon, 28 Jul 2025 11:09:15 +0200", "Subject": "[PATCH v2 2/4] ipa: rpi: Add vd56g3 support for rpi", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-ID": "<20250728-vd56g3_support-v2-2-cee5d5feac44@foss.st.com>", "References": "<20250728-vd56g3_support-v2-0-cee5d5feac44@foss.st.com>", "In-Reply-To": "<20250728-vd56g3_support-v2-0-cee5d5feac44@foss.st.com>", "To": "<libcamera-devel@lists.libcamera.org>", "CC": "Naushir Patuck <naush@raspberrypi.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, Sylvain Petinot\n\t<sylvain.petinot@foss.st.com>, Cyril Liotard <cyril.liotard@st.com>,\n\t\"Jean Poire\" <jean.poire@st.com>,\n\tBenjamin Mugnier <benjamin.mugnier@foss.st.com>,\n\tNaushir Patuck <naush@rasbperrypi.com>, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>", "X-Mailer": "b4 0.14.2", "X-Originating-IP": "[10.130.78.67]", "X-ClientProxiedBy": "SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE1.st.com\n\t(10.75.129.69)", "X-Proofpoint-Virus-Version": "vendor=baseguard\n\tengine=ICAP:2.0.293, Aquarius:18.0.1099, Hydra:6.1.9,\n\tFMLib:17.12.80.40\n\tdefinitions=2025-07-28_03,2025-07-24_01,2025-03-28_01", "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 cam_helper gain formula and frameIntegrationDiff can be found in the\nvd56g3 user manual.\n\nSigned-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>\nReviewed-by: Naushir Patuck <naush@rasbperrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rpi/cam_helper/cam_helper_vd56g3.cpp | 49 ++++++++++++++++++++++++++++\n src/ipa/rpi/cam_helper/meson.build | 1 +\n 2 files changed, 50 insertions(+)", "diff": "diff --git a/src/ipa/rpi/cam_helper/cam_helper_vd56g3.cpp b/src/ipa/rpi/cam_helper/cam_helper_vd56g3.cpp\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..140aabd802ade61fd785d21a73e46d88be8d1b96\n--- /dev/null\n+++ b/src/ipa/rpi/cam_helper/cam_helper_vd56g3.cpp\n@@ -0,0 +1,49 @@\n+/* SPDX-License-Identifier: BSD-2-Clause */\n+/*\n+ * Copyright (C) STMicroelectronics SA 2025\n+ *\n+ * Camera information for vd56g3 sensor\n+ */\n+\n+#include <assert.h>\n+\n+#include \"cam_helper.h\"\n+\n+using namespace RPiController;\n+\n+class CamHelperVd56g3 : public CamHelper\n+{\n+public:\n+\tCamHelperVd56g3();\n+\tuint32_t gainCode(double gain) const override;\n+\tdouble gain(uint32_t gainCode) const override;\n+\n+private:\n+\t/*\n+\t * Smallest difference between the frame length and integration time,\n+\t * in units of lines.\n+\t */\n+\tstatic constexpr int frameIntegrationDiff = 61;\n+};\n+\n+CamHelperVd56g3::CamHelperVd56g3()\n+\t: CamHelper({}, frameIntegrationDiff)\n+{\n+}\n+\n+uint32_t CamHelperVd56g3::gainCode(double gain) const\n+{\n+\treturn static_cast<uint32_t>(32.0 - 32.0 / gain);\n+}\n+\n+double CamHelperVd56g3::gain(uint32_t gainCode) const\n+{\n+\treturn static_cast<double>(32.0 / (32 - gainCode));\n+}\n+\n+static CamHelper *create()\n+{\n+\treturn new CamHelperVd56g3();\n+}\n+\n+static RegisterCamHelper reg(\"vd56g3\", &create);\ndiff --git a/src/ipa/rpi/cam_helper/meson.build b/src/ipa/rpi/cam_helper/meson.build\nindex abf021474b5c226782b847c709de638b6e7635c1..b70acbee5fcaa94265da1f1ad75487563486679f 100644\n--- a/src/ipa/rpi/cam_helper/meson.build\n+++ b/src/ipa/rpi/cam_helper/meson.build\n@@ -14,6 +14,7 @@ rpi_ipa_cam_helper_sources = files([\n 'cam_helper_ov64a40.cpp',\n 'cam_helper_ov7251.cpp',\n 'cam_helper_ov9281.cpp',\n+ 'cam_helper_vd56g3.cpp',\n 'md_parser_smia.cpp',\n ])\n \n", "prefixes": [ "v2", "2/4" ] }