Patch Detail
Show a patch.
GET /api/1.1/patches/12722/?format=api
{ "id": 12722, "url": "https://patchwork.libcamera.org/api/1.1/patches/12722/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12722/", "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": "<20210628085630.2081-3-david.plowman@raspberrypi.com>", "date": "2021-06-28T08:56:30", "name": "[libcamera-devel,2/2] libcamera: raspberrypi: fetch correct value for sensor's modeSensitivity", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c4f2ef3f672513d871bedce20e7686ce738565d7", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12722/mbox/", "series": [ { "id": 2183, "url": "https://patchwork.libcamera.org/api/1.1/series/2183/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2183", "date": "2021-06-28T08:56:29", "name": "Application support for per-mode sensitivities", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2183/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12722/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12722/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 EA3A8C321F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jun 2021 08:56:37 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71C94684D8;\n\tMon, 28 Jun 2021 10:56:36 +0200 (CEST)", "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7B806684D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 10:56:33 +0200 (CEST)", "by mail-wm1-x335.google.com with SMTP id\n\tl18-20020a1ced120000b029014c1adff1edso13171039wmh.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 01:56:33 -0700 (PDT)", "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:1ce1:9965:4328:89c4])\n\tby smtp.gmail.com with ESMTPSA id\n\tg7sm10578243wmq.27.2021.06.28.01.56.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 28 Jun 2021 01:56:32 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"YIaktZJv\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=OoNdfN627FI5cwtkJre1MidqsYnjhjb1szI/zMamHw0=;\n\tb=YIaktZJviBAP39sYuWSDsPV/kJTnXtEcYUWHXZY24AufEHBdAep6SAdjATr08QBZEV\n\tHinvKeQehcRONMYC9Syi5BfPUho4qC8TqpsysU5E0++0X71wee3Zdw+n0TxJXpGJ0NIg\n\tgiZW1x6WaxDXCUxMrnPSk07OrF6LSWDSB7+6qHpTiG8GBXroQIrbL5BVMK2ysfSfqwC7\n\tUCQa21V7Y5yEutZJ92guX5wL3o7K6MhCYeDZXvRsc9EeFrWLBYpik8+3Pq2VzkCKQ9Fe\n\tur6cb/BUlMWYk0MheX8inYJP9gvFDmCiQgnao7nLVM63XNG5KnQ2sdzaS+Nn7Gbqnt7z\n\t8ojQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\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=OoNdfN627FI5cwtkJre1MidqsYnjhjb1szI/zMamHw0=;\n\tb=qZqmXgtqTyFH4oizEvp+aNm63P7zevxk1DW2OKLCxKhhLUbqUj2XHVcf2zFSom52T/\n\t80lORxhorjUArQsSckeApjuAyaZBnqcJMjLCKQVZxBy6AcdkbAgKNP59HMoJQgf1vlz4\n\tQb2no8r1hcbsq5XId1GJnRsm7Xrl1KNUNH747uo8Ukq46rPbZsF4JCR33Mkm4eSjXrc2\n\tq0nK4MyX6ZWiExM+HGb194m5QH5Gnh0gzMpRedUPxzpFk0ceJDiumBwvpZ9DA5YJ+5Rj\n\t3qRosoWfX0qKlTN/6Ek+QAR+LWb0z3nbERdJyWwlNMpDxxCFNUq7Px4irx9Uvl8UmYT6\n\tWS0w==", "X-Gm-Message-State": "AOAM530nQNojflV7Zl2+44BXnSCln274CvHlNF5+cUvXJghSNELl53ha\n\tjqstwhd8SkGP+K28Nrp5b1e2148KyNmjdA==", "X-Google-Smtp-Source": "ABdhPJzvPe3gGJ6CM2up0YrwCCj3uoaFUUiQnhdYBlNH2040yKcIIYCyEG+3dDiQPnsqxq10jRbPMQ==", "X-Received": "by 2002:a1c:f616:: with SMTP id\n\tw22mr10669253wmc.73.1624870593063; \n\tMon, 28 Jun 2021 01:56:33 -0700 (PDT)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 28 Jun 2021 09:56:30 +0100", "Message-Id": "<20210628085630.2081-3-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20210628085630.2081-1-david.plowman@raspberrypi.com>", "References": "<20210628085630.2081-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/2] libcamera: raspberrypi: fetch correct\n\tvalue for sensor's modeSensitivity", "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": "These changes retrieve the correct value for sensitivity of the mode\nselected for the sensor. This value is known to the CamHelper which\npasses it across to the pipeline handler so that it can be set\ncorrectly in the CameraConfiguration.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 7 ++++++-\n src/ipa/raspberrypi/raspberrypi.cpp | 7 +++++--\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++++++---\n 3 files changed, 17 insertions(+), 6 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 606d1de4..3a71c167 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -38,6 +38,10 @@ struct IPAConfig {\n \tlibcamera.FileDescriptor lsTableHandle;\n };\n \n+struct IPAConfigResult {\n+ float modeSensitivity;\n+};\n+\n struct StartConfig {\n \tlibcamera.ControlList controls;\n \tint32 dropFrameCount;\n@@ -57,6 +61,7 @@ interface IPARPiInterface {\n \t * \\param[in] entityControls Controls provided by the pipeline entities\n \t * \\param[in] ipaConfig Pipeline-handler-specific configuration data\n \t * \\param[out] controls Controls to apply by the pipeline entity\n+\t * \\param[out] result Other results that the pipeline handler may require\n \t *\n \t * This method shall be called when the camera is configured to inform\n \t * the IPA of the camera's streams and the sensor settings.\n@@ -71,7 +76,7 @@ interface IPARPiInterface {\n \t\t map<uint32, libcamera.IPAStream> streamConfig,\n \t\t map<uint32, libcamera.ControlInfoMap> entityControls,\n \t\t IPAConfig ipaConfig)\n-\t\t=> (int32 ret, libcamera.ControlList controls);\n+\t\t=> (int32 ret, libcamera.ControlList controls, IPAConfigResult result);\n \n \t/**\n \t * \\fn mapBuffers()\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 9ce0db08..76376e06 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -96,7 +96,7 @@ public:\n \t\t const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t const std::map<unsigned int, ControlInfoMap> &entityControls,\n \t\t const ipa::RPi::IPAConfig &data,\n-\t\t ControlList *controls) override;\n+\t\t ControlList *controls, ipa::RPi::IPAConfigResult *result) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid signalStatReady(const uint32_t bufferId) override;\n@@ -336,7 +336,7 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t\t [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t const std::map<unsigned int, ControlInfoMap> &entityControls,\n \t\t const ipa::RPi::IPAConfig &ipaConfig,\n-\t\t ControlList *controls)\n+\t\t ControlList *controls, ipa::RPi::IPAConfigResult *result)\n {\n \tif (entityControls.size() != 2) {\n \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n@@ -388,6 +388,9 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t/* Pass the camera mode to the CamHelper to setup algorithms. */\n \thelper_->SetCameraMode(mode_);\n \n+\t/* The pipeline handler passes out the mode's sensitivity. */\n+\tresult->modeSensitivity = mode_.sensitivity;\n+\n \tif (firstStart_) {\n \t\t/* Supply initial values for frame durations. */\n \t\tapplyFrameDurations(defaultMinFrameDuration, defaultMaxFrameDuration);\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex a65b4568..7bace5b8 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -146,7 +146,7 @@ public:\n \tvoid frameStarted(uint32_t sequence);\n \n \tint loadIPA(ipa::RPi::SensorConfig *sensorConfig);\n-\tint configureIPA(const CameraConfiguration *config);\n+\tint configureIPA(CameraConfiguration *config);\n \n \tvoid statsMetadataComplete(uint32_t bufferId, const ControlList &controls);\n \tvoid runIsp(uint32_t bufferId);\n@@ -1235,7 +1235,7 @@ int RPiCameraData::loadIPA(ipa::RPi::SensorConfig *sensorConfig)\n \treturn ipa_->init(settings, sensorConfig);\n }\n \n-int RPiCameraData::configureIPA(const CameraConfiguration *config)\n+int RPiCameraData::configureIPA(CameraConfiguration *config)\n {\n \t/* We know config must be an RPiCameraConfiguration. */\n \tconst RPiCameraConfiguration *rpiConfig =\n@@ -1284,13 +1284,16 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \n \t/* Ready the IPA - it must know about the sensor resolution. */\n \tControlList controls;\n+\tipa::RPi::IPAConfigResult result;\n \tret = ipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n-\t\t\t &controls);\n+\t\t\t &controls, &result);\n \tif (ret < 0) {\n \t\tLOG(RPI, Error) << \"IPA configuration failed!\";\n \t\treturn -EPIPE;\n \t}\n \n+\tconfig->modeSensitivity = result.modeSensitivity;\n+\n \tif (!controls.empty())\n \t\tunicam_[Unicam::Image].dev()->setControls(&controls);\n \n", "prefixes": [ "libcamera-devel", "2/2" ] }