Patch Detail
Show a patch.
GET /api/patches/15699/?format=api
{ "id": 15699, "url": "https://patchwork.libcamera.org/api/patches/15699/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15699/", "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": "<20220421151117.703956-3-naush@raspberrypi.com>", "date": "2022-04-21T15:11:17", "name": "[libcamera-devel,v3,2/2] libcamera: raspberrypi: Fetch correct value for SensorSensitivity", "commit_ref": "065a9e6c050c7b4e922e4ac17a6d36097520e5e8", "pull_url": null, "state": "accepted", "archived": false, "hash": "888102bde2ce85a93a1e1bc6013c60954ee0b875", "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/15699/mbox/", "series": [ { "id": 3064, "url": "https://patchwork.libcamera.org/api/series/3064/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3064", "date": "2022-04-21T15:11:15", "name": "Application support for per-mode sensitivities", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3064/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15699/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15699/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 AED58C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Apr 2022 15:11:28 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E027265643;\n\tThu, 21 Apr 2022 17:11:27 +0200 (CEST)", "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00F3665647\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Apr 2022 17:11:25 +0200 (CEST)", "by mail-wr1-x42c.google.com with SMTP id m14so7140250wrb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Apr 2022 08:11:25 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:6bd1:8370:773e:357e])\n\tby smtp.gmail.com with ESMTPSA id\n\tk63-20020a1ca142000000b0038ff2c38e85sm2267683wme.39.2022.04.21.08.11.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 21 Apr 2022 08:11:24 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1650553887;\n\tbh=FH9HwTxI2zR2s6gKBno1xln6YDAMrA+ZJRK8kIYgIUs=;\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=wi6WtQQuHca7DNjUxDPsFuUYWFaM6dnNN8j+R8GdMEmd8AbkVjQ2hs8BG2fuELE8w\n\tazuxPuBAzphH8Hk2S1PzHMDDlqvGxNDOyUL9V9nVmqZfd3G+YdBXyU7bFZImU+5Ihm\n\tLvo0Gl0SHfx7uTAMViKsUlc9DE9ZyWyc0mT7Kk19nh53JhUSk8BYlHdL0+NuxY6MtB\n\tpcOGh2zcSFmd8WK6ili8gzDjN9UyhoRzjqh2svWb96XrdhLmspkMAGn1PdSMr3D6Cs\n\tzsuSc75qxlYD5TYrjfKiJ6TZESxOTtjymuUQrJNZL3PXUvkmme5nbkJneUtQjKI7v/\n\txn3gWPYFf3OPA==", "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=VSSQqddBWkmu1M6Jzvuc7bPiw0rI0ZF6bsGb/4SZnFI=;\n\tb=LRXktL+O0tpWDantCr62INtckuga/bEcRl5ra6xi4sXlwwlu1owDKnGf0VDKjkMaSG\n\ttNfr8M+by7IrOXvt1XYXJb56N9iPDJNFbY5azvHJ6xAkV8EeoatIUv9r+P616xiMfKv/\n\tG2AN3xl6GaHOFg7Vn43K6bpGWwqsrsLgF+We6jM1UiksXllQYLN6GGb0rKHSA3SS6tbC\n\tHweHtenbxrtHiIwNLT4Z+XcOaBb5o2Mgu3tU1qlsXvdQo/gzOpZXp44r2k8D5TpzEpz9\n\tVaFywVCimYmnC8zN1d2GOle71DucvA9eB7Ag2ctlspbFZTLzR1CLrRTWhm+LTflNya7p\n\tjaXQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"LRXktL+O\"; dkim-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=VSSQqddBWkmu1M6Jzvuc7bPiw0rI0ZF6bsGb/4SZnFI=;\n\tb=hULfGLgqeQD+rgBdpNxEL5mm9Z+zX1OSA7LjeQLIFRJxcxzBTBFIoRwRMVVAK0BwyR\n\tDeDc4QGlvtxjWtxiEkRSOllzOtJvi4+fuzKeregJKPJw9xeTyvTKCuSON6J6UdkeI8Oi\n\tgdn6iJrG+G6E7VD+/Bdy4glBiqsiiGYT2dqyuDK7uIrQk9eA2jg7WHLEzXZXrwoqlB1t\n\tVjN1rAMqRJbuc/I6EcWjTEQYFCZudv74Kx6QEBynrKO7YLRGNDgY31186+cTPra1VHnh\n\tIOxS2XeA/iTGBNws15jXZSyFJGP38cd3OgAuegHq+PRRK1X1rMIRmhszKY6EXapIACVS\n\toRSQ==", "X-Gm-Message-State": "AOAM532N/qTN4KjebeKK2Mj96I/4hfjkSB2y2GCt+Yl0BgKzeeilvBD4\n\tvIouzfOuNwz8yxmvTTJMU6C568EBIZG0sA==", "X-Google-Smtp-Source": "ABdhPJyDqYibuAspfZfZ6cxfaIq50n3L5Tx+oKHJtk/XLmEckzY1OMkr3ey5emyHv91rT4UgU3NZAw==", "X-Received": "by 2002:a05:6000:111:b0:207:ac77:3d07 with SMTP id\n\to17-20020a056000011100b00207ac773d07mr181929wrx.136.1650553885156; \n\tThu, 21 Apr 2022 08:11:25 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 21 Apr 2022 16:11:17 +0100", "Message-Id": "<20220421151117.703956-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220421151117.703956-1-naush@raspberrypi.com>", "References": "<20220421151117.703956-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 2/2] libcamera: raspberrypi: Fetch\n\tcorrect value for SensorSensitivity", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "From: David Plowman <david.plowman@raspberrypi.com>\n\nThese 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 camera properties.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 7 ++++++-\n src/ipa/raspberrypi/raspberrypi.cpp | 7 +++++--\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++++----\n 3 files changed, 19 insertions(+), 7 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex 5a228b75cd2f..a60c3bb43d3c 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -38,6 +38,10 @@ struct IPAConfig {\n \tlibcamera.SharedFD lsTableHandle;\n };\n \n+struct IPAConfigResult {\n+ float modeSensitivity;\n+};\n+\n struct StartConfig {\n \tlibcamera.ControlList controls;\n \tint32 dropFrameCount;\n@@ -58,6 +62,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 function shall be called when the camera is configured to inform\n \t * the IPA of the camera's streams and the sensor settings.\n@@ -72,7 +77,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 5efd051bdd13..fd66cfeee087 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -99,7 +99,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 IPAConfig &data,\n-\t\t ControlList *controls) override;\n+\t\t ControlList *controls, 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@@ -344,7 +344,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 IPAConfig &ipaConfig,\n-\t\t ControlList *controls)\n+\t\t ControlList *controls, IPAConfigResult *result)\n {\n \tif (entityControls.size() != 2) {\n \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n@@ -404,6 +404,9 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t */\n \tControlList ctrls(sensorCtrls_);\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 acc0becaa5c0..b2489005120c 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -200,7 +200,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(const CameraConfiguration *config, ipa::RPi::IPAConfigResult *result);\n \n \tvoid enumerateVideoDevices(MediaLink *link);\n \n@@ -898,7 +898,8 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \n \tdata->isp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n \n-\tret = data->configureIPA(config);\n+\tipa::RPi::IPAConfigResult result;\n+\tret = data->configureIPA(config, &result);\n \tif (ret)\n \t\tLOG(RPI, Error) << \"Failed to configure the IPA: \" << ret;\n \n@@ -937,6 +938,9 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \t */\n \tdata->properties_.set(properties::ScalerCropMaximum, data->sensorInfo_.analogCrop);\n \n+\t/* Store the mode sensitivity for the application. */\n+\tdata->properties_.set(properties::SensorSensitivity, result.modeSensitivity);\n+\n \t/* Setup the Video Mux/Bridge entities. */\n \tfor (auto &[device, link] : data->bridgeDevices_) {\n \t\t/*\n@@ -1528,7 +1532,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(const CameraConfiguration *config, ipa::RPi::IPAConfigResult *result)\n {\n \tstd::map<unsigned int, IPAStream> streamConfig;\n \tstd::map<unsigned int, ControlInfoMap> entityControls;\n@@ -1574,7 +1578,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n \t/* Ready the IPA - it must know about the sensor resolution. */\n \tControlList controls;\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", "prefixes": [ "libcamera-devel", "v3", "2/2" ] }