Patch Detail
Show a patch.
GET /api/1.1/patches/18230/?format=api
{ "id": 18230, "url": "https://patchwork.libcamera.org/api/1.1/patches/18230/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18230/", "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": "<20230202111252.3366729-2-matthias.fend@emfend.at>", "date": "2023-02-02T11:12:46", "name": "[libcamera-devel,RFC,1/7] ipa: rkisp1: add basic camera lens support", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "430ae95c9a4a2bc9ee32a7a47fc3ccb881e5d2db", "submitter": { "id": 134, "url": "https://patchwork.libcamera.org/api/1.1/people/134/?format=api", "name": "Matthias Fend", "email": "matthias.fend@emfend.at" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18230/mbox/", "series": [ { "id": 3735, "url": "https://patchwork.libcamera.org/api/1.1/series/3735/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3735", "date": "2023-02-02T11:12:45", "name": "add support for more complex optics", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3735/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18230/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18230/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 2B9CCC3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 2 Feb 2023 11:13:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EEEC6625E8;\n\tThu, 2 Feb 2023 12:13:05 +0100 (CET)", "from lx20.hoststar.hosting (lx20.hoststar.hosting [168.119.41.54])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 153B1625D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 2 Feb 2023 12:13:03 +0100 (CET)", "from 194-208-208-245.tele.net ([194.208.208.245]:51050\n\thelo=localhost.localdomain)\n\tby lx20.hoststar.hosting with esmtpsa (TLS1.3) tls\n\tTLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93)\n\t(envelope-from <matthias.fend@emfend.at>)\n\tid 1pNXWY-008Uhs-1n; Thu, 02 Feb 2023 12:13:02 +0100" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675336385;\n\tbh=BKrr5i+kBXbxctCnsZH5tPxNGb0HnL9JYU/Q/uFnfUQ=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=xcSknLY5yEQGtU9Ji6kkR9GKEX1NN3Ct7pkhcwnuV4YcC/nUD2c94R68BhjZUezii\n\tUU/E0OlncnfPzMRh54Jy0Ffv9inEEM0e0jUDmw5XoIm1s/xzA3TbX9MJyefvRpL3Ws\n\tQrv9UvSq6NZe6IzCdcNbzlmgnNI0HxMfaaamP7JV06BfGt/4J83HZc4JF0jf0lw9Ou\n\tDwlmXOpD1EkYeREEZqht1gETrnqzH8mxVT6tTFQuzll+wqJ6IlC7sNEUAVhDeYQROD\n\tOvgQDn2rsGU35swIB0WQR1O2lpg0VbLf0xyBR957ASlsv13ykKNuCKy/ROzKCNM4vU\n\tlUlLR2RKArIYg==", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=emfend.at;\n\ts=mail;\n\th=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=2emuifAjWvAGK6KVtV+1tAxEATiHMQL1KQuyfEROFFQ=;\n\tb=Pu+oXIIu72SJE0JlO3U9meAtcS\n\tmwxrEEiUfjQON+A8Bh9ABNBpE1bi1REx3Iim7l6Jkptb/BfqgxSn6j6oowRVlYZaR3Lo2epQDemi1\n\tAQdfoLLr2NdYn5z7ZaWudd6DKwtt2dDFzy4fRFsqmiSFwIMBT/3UKSUdRbluriqFH6RU=;" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=emfend.at header.i=@emfend.at\n\theader.b=\"Pu+oXIIu\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 2 Feb 2023 12:12:46 +0100", "Message-Id": "<20230202111252.3366729-2-matthias.fend@emfend.at>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230202111252.3366729-1-matthias.fend@emfend.at>", "References": "<20230202111252.3366729-1-matthias.fend@emfend.at>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spam-Score": "-1.0", "X-Spam-Bar": "-", "X-Spam-Report": "Spam detection software,\n\trunning on the system \"lx20.hoststar.hosting\", \n\thas NOT identified this incoming email as spam. The original\n\tmessage has been attached to this so you can view it or label\n\tsimilar future email. If you have any questions, see\n\tthe administrator of that system for details.\n\tContent preview: Hello,\n\tas mentioned on the mailing list some time ago, I was\n\twondering how to use more complex optics together with libcamera\n\tIPAs. Currently, \n\tonly optics with a VCM focus lens are considered in libcamera. With\n\tthese, \n\tan absolute position is set and the lens is almost immediately at the\n\tnew desired position. Pretty simple. For a s [...] \n\tContent analysis details: (-1.0 points, 5.0 required)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n\t0.0 TVD_RCVD_IP Message was received from an IP address\n\t0.0 KAM_DMARC_STATUS Test Rule for DKIM or SPF Failure with Strict\n\tAlignment", "Subject": "[libcamera-devel] [RFC PATCH 1/7] ipa: rkisp1: add basic camera\n\tlens support", "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": "Matthias Fend via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Matthias Fend <matthias.fend@emfend.at>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Adding basic support for lenses, as has been done similarly in other\npipeline handlers.\nParts of it will be changed later in the series, but the intended changes\nare more recognizable.\n\nSigned-off-by: Matthias Fend <matthias.fend@emfend.at>\n---\n include/libcamera/ipa/rkisp1.mojom | 4 +++-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 21 +++++++++++++++++++--\n 2 files changed, 22 insertions(+), 3 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\nindex 1009e970..d33e93df 100644\n--- a/include/libcamera/ipa/rkisp1.mojom\n+++ b/include/libcamera/ipa/rkisp1.mojom\n@@ -11,6 +11,7 @@ import \"include/libcamera/ipa/core.mojom\";\n struct IPAConfigInfo {\n \tlibcamera.IPACameraSensorInfo sensorInfo;\n \tlibcamera.ControlInfoMap sensorControls;\n+\tlibcamera.ControlInfoMap lensControls;\n };\n \n interface IPARkISP1Interface {\n@@ -37,6 +38,7 @@ interface IPARkISP1Interface {\n \n interface IPARkISP1EventInterface {\n \tparamsBufferReady(uint32 frame);\n-\tsetSensorControls(uint32 frame, libcamera.ControlList sensorControls);\n+\tsetSensorControls(uint32 frame, libcamera.ControlList sensorControls,\n+\t\t\t libcamera.ControlList lensControls);\n \tmetadataReady(uint32 frame, libcamera.ControlList metadata);\n };\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 5f22a29d..d4fbcf4b 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -32,6 +32,7 @@\n #include <libcamera/ipa/rkisp1_ipa_proxy.h>\n \n #include \"libcamera/internal/camera.h\"\n+#include \"libcamera/internal/camera_lens.h\"\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/delayed_controls.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n@@ -112,7 +113,8 @@ public:\n private:\n \tvoid paramFilled(unsigned int frame);\n \tvoid setSensorControls(unsigned int frame,\n-\t\t\t const ControlList &sensorControls);\n+\t\t\t const ControlList &sensorControls,\n+\t\t\t const ControlList &lensControls);\n \n \tvoid metadataReady(unsigned int frame, const ControlList &metadata);\n };\n@@ -395,9 +397,20 @@ void RkISP1CameraData::paramFilled(unsigned int frame)\n }\n \n void RkISP1CameraData::setSensorControls([[maybe_unused]] unsigned int frame,\n-\t\t\t\t\t const ControlList &sensorControls)\n+\t\t\t\t\t const ControlList &sensorControls,\n+\t\t\t\t\t const ControlList &lensControls)\n {\n \tdelayedCtrls_->push(sensorControls);\n+\n+\tCameraLens *lens = sensor_->focusLens();\n+\tif (!lens)\n+\t\treturn;\n+\n+\tif (lensControls.contains(V4L2_CID_FOCUS_ABSOLUTE)) {\n+\t\tconst ControlValue &focusValue = lensControls.get(V4L2_CID_FOCUS_ABSOLUTE);\n+\n+\t\tlens->setFocusPosition(focusValue.get<int32_t>());\n+\t}\n }\n \n void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &metadata)\n@@ -810,6 +823,10 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tipaConfig.sensorControls = data->sensor_->controls();\n \n+\tCameraLens *lens = data->sensor_->focusLens();\n+\tif (lens)\n+\t\tipaConfig.lensControls = lens->controls();\n+\n \tret = data->ipa_->configure(ipaConfig, streamConfig, &data->controlInfo_);\n \tif (ret) {\n \t\tLOG(RkISP1, Error) << \"failed configuring IPA (\" << ret << \")\";\n", "prefixes": [ "libcamera-devel", "RFC", "1/7" ] }