Patch Detail
Show a patch.
GET /api/patches/18149/?format=api
{ "id": 18149, "url": "https://patchwork.libcamera.org/api/patches/18149/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18149/", "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": "<20230119104544.9456-2-naush@raspberrypi.com>", "date": "2023-01-19T10:45:31", "name": "[libcamera-devel,v1,01/14] pipeline: ipa: raspberrypi: Check if lens actuator is available", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bf20dc479249d4d95430136673fa6651e27ba0e0", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18149/mbox/", "series": [ { "id": 3715, "url": "https://patchwork.libcamera.org/api/series/3715/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3715", "date": "2023-01-19T10:45:30", "name": "Raspberry Pi: Camera Module 3 support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3715/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18149/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18149/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 E8F5BBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Jan 2023 10:45:57 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 25EC6625ED;\n\tThu, 19 Jan 2023 11:45:56 +0100 (CET)", "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 0895061EFC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 11:45:53 +0100 (CET)", "by mail-wm1-x333.google.com with SMTP id\n\te19-20020a05600c439300b003db1cac0c1fso1770438wmn.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 02:45:53 -0800 (PST)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbe12-20020a05600c1e8c00b003db06224953sm5332029wmb.41.2023.01.19.02.45.51\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 19 Jan 2023 02:45:51 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674125156;\n\tbh=JkcTM5Umb+cECJQuUWQyERqriHYrMgewZU5j8qC3h/I=;\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:Cc:\n\tFrom;\n\tb=Thwj1rtIONQW3kGAjbhYkGFK3Co6ekwNWvWGi2ahkInZaxqUmvXEm55v49eDXqHQH\n\tTO+haVKqg4cAoTIUxpvXbAAV6Unh1Jwky/8IOllFPb5NTPoJwsRye6T3waYmj1bile\n\tYy9zLH94KEqW1upejpNI20ZpmEU6IjnqocEkl3nq1RBqEv9DhD6VmBfHds6hF4WwyG\n\tgXfdVTU2yeVReRZQlvBTvdt6VfYxHZYGUUSEcRmV+QzmlOTzXFFxtUXFrulcZ7wR4p\n\tUZplNshLGiXJIy57H0qTEsJsEypXVsTKQccZynPQOm3FJe5Lfz3HMbS8yZt1Hh4W9b\n\t7Rl0iwa2afK9g==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=9jfLANeusc6CqNEiWhjZhKjeKnRVCnEagrhwvI6M960=;\n\tb=GD0pMMEeJ/KREVZCVs7p2IJJqeMld/HDbgtXCTNRaE09Md/L1D3LYTUXDDzjoY4F37\n\t5qLSc+YfRBzKlhDkQNSxLIGyN/mFdwkPxfj2Z39Gdi6fbGu/Mkiavjbnv9sRPLrWn2n1\n\tEv0fJbd0P6pjjpu2X9wHnnH9mhFyOBijuge93fh1lyQ8uALOV+UKLAjsWLsprOrRNHD0\n\t6sOiYGtB1MYH3L2sRGIgaoist/HEA4Tcw2X/6ADRPd2Vg52yqfY0I75M6EsTw0hVR/6D\n\ttlgxIIEmNLmbGDqoiyfm0LvUpk4c0whHjIHakU0o+w2uIr9l5ABK4CvOnjY4c4MrGx2B\n\tifoA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"GD0pMMEe\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=9jfLANeusc6CqNEiWhjZhKjeKnRVCnEagrhwvI6M960=;\n\tb=7UC+w+YYkwTR8KPmmLotrJXXZbsM5ewOOfjWwVV3FbP+qWhngJ9JEHZa2uX+ATvmOg\n\tQaiKbuHEb9MwRQvLSMBRkQrSPiUpCIO+lmwWwoo8TEDhg8AIrA3MB6XbN70ZQeB2uxFc\n\tZq/s7TnZve4pyAUjVRu+0ebp/gaug+BvHhFerFYQqE79k3Il4f6p5W63A1HTe9vWonB2\n\tD1N/QO/u7E2bvDMciJ9TE0K9F0M5UeoLWVQbXfcrPuk5B0MJaO8CH56YSYs7djsOpGca\n\tIMY7FmdWjULatHgPJWSQKwllmHERZhiB8StacBhdNGqoeAQnklGjFtesX90ZGpUi0Pyf\n\tSh2Q==", "X-Gm-Message-State": "AFqh2koA4dTJEB+FsUKZhzAcxw1x7+JgnL6YDOc2v+qsrDKiC17OucvP\n\t3sKhlFBymeWFplu3ymkByLr8WNFHtF+n4bPy8K8=", "X-Google-Smtp-Source": "AMrXdXslQp4dPRhsgNrrb0go/CzD0Zcv6RdFPv2W5H3C4Nc4yfN46Ynt12zmSIE/O6ZamQCaOqifDw==", "X-Received": "by 2002:a05:600c:1609:b0:3db:12a:5e65 with SMTP id\n\tm9-20020a05600c160900b003db012a5e65mr9735632wmn.4.1674125152419; \n\tThu, 19 Jan 2023 02:45:52 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 19 Jan 2023 10:45:31 +0000", "Message-Id": "<20230119104544.9456-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230119104544.9456-1-naush@raspberrypi.com>", "References": "<20230119104544.9456-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 01/14] pipeline: ipa: raspberrypi:\n\tCheck if lens actuator is available", "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Cc": "Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Check if a lens actuator is available by the presense of the lens driver entity\nin the pipeline handler. Pass this result to the IPA on init.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 2 +-\n src/ipa/raspberrypi/raspberrypi.cpp | 7 +++++--\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n 3 files changed, 8 insertions(+), 4 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 189f978a5081..e7dabcbe5313 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -50,7 +50,7 @@ struct StartConfig {\n };\n \n interface IPARPiInterface {\n-\tinit(libcamera.IPASettings settings)\n+\tinit(libcamera.IPASettings settings, bool lensPresent)\n \t\t=> (int32 ret, IPAInitResult result);\n \tstart(libcamera.ControlList controls) => (StartConfig startConfig);\n \tstop();\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex bead436def3c..ec18497155ba 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -115,7 +115,7 @@ public:\n \t\t\tmunmap(lsTable_, MaxLsGridSize);\n \t}\n \n-\tint init(const IPASettings &settings, IPAInitResult *result) override;\n+\tint init(const IPASettings &settings, bool lensPresent, IPAInitResult *result) override;\n \tvoid start(const ControlList &controls, StartConfig *startConfig) override;\n \tvoid stop() override {}\n \n@@ -158,6 +158,7 @@ private:\n \n \tControlInfoMap sensorCtrls_;\n \tControlInfoMap ispCtrls_;\n+\tbool lensPresent_;\n \tControlList libcameraMetadata_;\n \n \t/* Camera sensor params. */\n@@ -204,7 +205,7 @@ private:\n \tuint32_t maxSensorGainCode_;\n };\n \n-int IPARPi::init(const IPASettings &settings, IPAInitResult *result)\n+int IPARPi::init(const IPASettings &settings, bool lensPresent, IPAInitResult *result)\n {\n \t/*\n \t * Load the \"helper\" for this sensor. This tells us all the device specific stuff\n@@ -241,6 +242,8 @@ int IPARPi::init(const IPASettings &settings, IPAInitResult *result)\n \t\treturn ret;\n \t}\n \n+\tlensPresent_ = lensPresent;\n+\n \tcontroller_.initialise();\n \n \t/* Return the controls handled by the IPA */\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex f6303e60e1e6..62417669bdc5 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -32,6 +32,7 @@\n \n #include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/camera.h\"\n+#include \"libcamera/internal/camera_lens.h\"\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/framebuffer.h\"\n@@ -1606,7 +1607,7 @@ int RPiCameraData::loadIPA(ipa::RPi::IPAInitResult *result)\n \n \tIPASettings settings(configurationFile, sensor_->model());\n \n-\treturn ipa_->init(settings, result);\n+\treturn ipa_->init(settings, !!sensor_->focusLens(), result);\n }\n \n int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPAConfigResult *result)\n", "prefixes": [ "libcamera-devel", "v1", "01/14" ] }