Patch Detail
Show a patch.
GET /api/patches/16401/?format=api
{ "id": 16401, "url": "https://patchwork.libcamera.org/api/patches/16401/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16401/", "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": "<20220628090656.19572-2-dse@thaumatec.com>", "date": "2022-06-28T09:06:54", "name": "[libcamera-devel,1/3] libcamera: rkisp1: Control the lens from pipeline", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0ddcdeeff7a28ddad2f37cbe710720a4ceed9eb8", "submitter": { "id": 126, "url": "https://patchwork.libcamera.org/api/people/126/?format=api", "name": "Daniel Semkowicz", "email": "dse@thaumatec.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16401/mbox/", "series": [ { "id": 3228, "url": "https://patchwork.libcamera.org/api/series/3228/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3228", "date": "2022-06-28T09:06:53", "name": "libcamera: rkisp1: Add lens control", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3228/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16401/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16401/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 74429BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Jun 2022 09:07:12 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F5BC65638;\n\tTue, 28 Jun 2022 11:07:12 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F06836559A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Jun 2022 11:07:10 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\th14-20020a1ccc0e000000b0039eff745c53so7137974wmb.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Jun 2022 02:07:10 -0700 (PDT)", "from localhost.localdomain (ip092042140082.rev.nessus.at.\n\t[92.42.140.82]) by smtp.gmail.com with ESMTPSA id\n\tr68-20020a1c2b47000000b0039c4b518df4sm20126972wmr.5.2022.06.28.02.07.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 28 Jun 2022 02:07:10 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656407232;\n\tbh=sbnH6DeiWmVmShudASLtOyHMJp9Y2I7iCrW1cASfX88=;\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=kVld9aYnvT9szJdb1eYL6vELkW2TF2CGpcdgNFIAZe+bxAXAS9hvg55dzKFKLsifB\n\tgVb5aOA61k99y3cDTVel78g30neGLXgUWJtJP9gDSr//I1MQB6RFwjgYVEv4eRXUgk\n\thjqpX0FHf4nHheRIV8ItNXYQOWbAClY4OT0Tidl8Qjw5YZjIngx5/awlKc+Cpn60CR\n\tOxPBYt1j+O83Z9ADdRUl7pAQNURS7pZpk7YGQFeQoMG5vXYgcU93EoxQvGo93zbFmL\n\ttu+MifLNmoUHT+CDsu36TS1gDCCzSw7eP3EGxHVUJG51t/vb0nxPLZfyKaopvlGrBJ\n\tgFk/Jyp1snrkg==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=isqQCtca+id/lggpU5IKMGvQbHwvkY2hggxC5WD7M+c=;\n\tb=6biJQSSJcieqRiTiOoyBvLOlPpmHvglVspHCXrcn2sopP840fzDrn1Jsi1Ny4rrM95\n\t26RCjOPXb0KTHrWGZ8tWW0Fs/aIfANQZ3E6pTNDcZ6iSLogJfh/OTVKQT9YNJaNMw1Gb\n\tzoKy6Fc2TOaEjuQE1PtPvdvi8NBrKFHZg03Wjgpg4CRtAmzwLY68yhLIgDN5XpFy6oqA\n\tE+5LI/59D/TmFtufReGVtbT0B8mpEFipF6gFMOOtQhlo/tnAoL3VWJmlebYE+MeoNTHZ\n\t1PzI8p16ofmEAAwozo3OKJlihMbw4wUsiOSkjHJxsRj7BBt1yCtN/GXQrrSfEG0upltp\n\ts1MQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=thaumatec-com.20210112.gappssmtp.com\n\theader.i=@thaumatec-com.20210112.gappssmtp.com header.b=\"6biJQSSJ\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=isqQCtca+id/lggpU5IKMGvQbHwvkY2hggxC5WD7M+c=;\n\tb=OcBNtrGVkLvq2UUnKQ7qBXA9O33jt5tq0G6JQHuOatztjGBAObpG7FRzbqxMUNomjK\n\taA+gGXcBuucfiIpoTVSSPyjZ88kg9YE9NQfb0oiG3lhNWdnPS17YAip7j/Vc7Ukx3C8Q\n\t4okjaAhYcQ/JuRD77CML9PXJj6ohJNlLZnb1H0KZ00/PlS4yeHlBwqW7aeUVFEwvYzd7\n\tt+EAXqhRlhyArcwjAwv+sVnTV0HeP0h6Pexn7elyxxbe+TSsIu4hbxpx70UXtm24lEuF\n\tU1GHLxeJjlli2kmK6Uz/r1bxHqQKNpU/cF/kZvjNx8a+DhpVMQq0CH2ZxO4ZyWNUSKfe\n\tQYYQ==", "X-Gm-Message-State": "AJIora9sBgHEDMPLL5rOZAu/Gf4d+6kxExSMxTNQEjgIcFMctUcSsthA\n\t/gOjJKlf8yakzQjKt/TuTY91WvENEvcmOw==", "X-Google-Smtp-Source": "AGRyM1sujJFUgqo8jOnHGJ2J4gzF2ECPYgYlBB5rXxdnV7nrZeaWeU/6yyPzXHrkrC4W9vVXm7rZaA==", "X-Received": "by 2002:a1c:2b05:0:b0:3a0:2ae2:5277 with SMTP id\n\tr5-20020a1c2b05000000b003a02ae25277mr20826809wmr.30.1656407230661; \n\tTue, 28 Jun 2022 02:07:10 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 28 Jun 2022 11:06:54 +0200", "Message-Id": "<20220628090656.19572-2-dse@thaumatec.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220628090656.19572-1-dse@thaumatec.com>", "References": "<20220628090656.19572-1-dse@thaumatec.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/3] libcamera: rkisp1: Control the lens\n\tfrom pipeline", "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": "Daniel Semkowicz via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Daniel Semkowicz <dse@thaumatec.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Control lens focus from rkisp1 pipeline, using CameraLens controller\nand expose lens controls to the IPA during configure().\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 7cf36524..363273b2 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -28,6 +28,7 @@\n #include <libcamera/stream.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@@ -107,6 +108,7 @@ private:\n \tvoid paramFilled(unsigned int frame);\n \tvoid setSensorControls(unsigned int frame,\n \t\t\t const ControlList &sensorControls);\n+\tvoid setLensControls(const ControlList &lensControls);\n \n \tvoid metadataReady(unsigned int frame, const ControlList &metadata);\n };\n@@ -353,6 +355,20 @@ void RkISP1CameraData::setSensorControls([[maybe_unused]] unsigned int frame,\n \tdelayedCtrls_->push(sensorControls);\n }\n \n+void RkISP1CameraData::setLensControls(const ControlList &lensControls)\n+{\n+\tCameraLens *focusLens = sensor_->focusLens();\n+\tif (!focusLens)\n+\t\treturn;\n+\n+\tif (!lensControls.contains(V4L2_CID_FOCUS_ABSOLUTE))\n+\t\treturn;\n+\n+\tconst ControlValue &focusValue = lensControls.get(V4L2_CID_FOCUS_ABSOLUTE);\n+\n+\tfocusLens->setFocusPosition(focusValue.get<int32_t>());\n+}\n+\n void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &metadata)\n {\n \tRkISP1FrameInfo *info = frameInfo_.find(frame);\n@@ -654,6 +670,10 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \tstd::map<uint32_t, ControlInfoMap> entityControls;\n \tentityControls.emplace(0, data->sensor_->controls());\n \n+\tCameraLens *lens = data->sensor_->focusLens();\n+\tif (lens)\n+\t\tentityControls.emplace(1, lens->controls());\n+\n \tret = data->ipa_->configure(sensorInfo, streamConfig, entityControls);\n \tif (ret) {\n \t\tLOG(RkISP1, Error) << \"failed configuring IPA (\" << ret << \")\";\n", "prefixes": [ "libcamera-devel", "1/3" ] }