Patch Detail
Show a patch.
GET /api/patches/11658/?format=api
{ "id": 11658, "url": "https://patchwork.libcamera.org/api/patches/11658/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11658/", "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": "<20210323122739.680560-2-naush@raspberrypi.com>", "date": "2021-03-23T12:27:33", "name": "[libcamera-devel,v2,1/7] ipa: Add sensor model string to IPASettings", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "24281efe9e34b413965b745bf9970350dadfe9dc", "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/11658/mbox/", "series": [ { "id": 1821, "url": "https://patchwork.libcamera.org/api/series/1821/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1821", "date": "2021-03-23T12:27:32", "name": "Raspberry Pi: ipa::init() restructuring", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1821/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11658/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11658/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 37FC8C32E5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 12:27:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E70368D6C;\n\tTue, 23 Mar 2021 13:27:47 +0100 (CET)", "from mail-ej1-x635.google.com (mail-ej1-x635.google.com\n\t[IPv6:2a00:1450:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5251D602D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 13:27:45 +0100 (CET)", "by mail-ej1-x635.google.com with SMTP id b7so26791279ejv.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 05:27:45 -0700 (PDT)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tu13sm11082295ejy.31.2021.03.23.05.27.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 Mar 2021 05:27:44 -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=\"CqptGzeZ\"; 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=J030fngYYhH7A6mLzY/lY5VD3s2pUrc6fPTU9ImqEVU=;\n\tb=CqptGzeZQeZ+0cqwNgxPytPAtcET0pkuVHiICjqlPJB8wh9ZMt5BlguWBeBz/o6/pD\n\t17kO48U7Aiq9+JXVWYuzHmJzRm5yw/V/V+yqUrRvvoDQbe36h4BAWzKGlVKOiANU6Lr5\n\tCHW5Vs97j/+Q+kMRxXEJCuxI8+uepYIrPByMceb/2rRwhdnA8RZowyaruHAzi+E1BZPq\n\t0hG5Gk+jJg5mtbJetImE6A2xrr619fZ7AyfPchj4FVDNIcAW4hvPJLBelMASoJowDMA4\n\tjxZHdUJcGY4EvJI5cXYv53X7H1CAjdSjrUAu7xY5w5/SY8JjgrTm+uAjvyEnRYmJVaEN\n\tPqcw==", "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=J030fngYYhH7A6mLzY/lY5VD3s2pUrc6fPTU9ImqEVU=;\n\tb=PwYauSLTJy+JhvXYJNiKLL9gOezKk4NOfghoZ4kplO710Esqc3d9ucCP1k6B7YTb5Q\n\tk92vx3hWF3mMfqBwznFPj9jpbdU8jgTVv7nWzY9FAtYZG7TEEpfSnxFhK63QSV6cAq6x\n\tHkxSC1G4B9u7dDjHX4PxsIvvlNxyuanlFqerdbtBfwelhm4X2tHu0ybc6FgglNiIdYQc\n\tHrCAC0Kf2aFs4b7SHxk64kTSTx151J0MDekYq2zU/hc+hTrcWp9varoNYNZTEokM67fy\n\tmlNfaJ2eyo/PZD4y3MDJPgvcQjjJ82rroygDe3m6aKBUjf5G8a9/ijrs5T4WLEG+q8j9\n\tKJEA==", "X-Gm-Message-State": "AOAM5305I3tQSzOofWARwnek/avfGKe0YzVVvtFdZF2i1FvH0LhkvIlf\n\t0gh1AxOtSEjuZwL3A6BS+zDOUqVCpYKNqQ==", "X-Google-Smtp-Source": "ABdhPJyWHddAKwd912/tv/zg1zVyIcmkuNr9uMNq7ruUGNliGa6u9PEeSDobHWwqDtAOVc9iQt3AdQ==", "X-Received": "by 2002:a17:906:3409:: with SMTP id\n\tc9mr4671918ejb.314.1616502464739; \n\tTue, 23 Mar 2021 05:27:44 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 23 Mar 2021 12:27:33 +0000", "Message-Id": "<20210323122739.680560-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210323122739.680560-1-naush@raspberrypi.com>", "References": "<20210323122739.680560-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 1/7] ipa: Add sensor model string to\n\tIPASettings", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Pass the sensor model string to the IPA init() method through the\nIPASettings structure.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/core.mojom | 8 ++++++++\n src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n src/libcamera/pipeline/vimc/vimc.cpp | 2 +-\n test/ipa/ipa_interface_test.cpp | 2 +-\n 5 files changed, 14 insertions(+), 4 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nindex 5236a672461c..5363f1c5b48b 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -145,8 +145,16 @@ struct IPABuffer {\n * This field may be an empty string if the IPA doesn't require a configuration\n * file.\n */\n+\n+ /**\n+ * \\var IPASettings::sensorModel\n+ * \\brief The sensor model name\n+ *\n+ * Provides the sensor model name to the IPA.\n+ */\n struct IPASettings {\n \tstring configurationFile;\n+\tstring sensorModel;\n };\n \n /**\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 2ea13ec9e1b9..c27120710323 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1144,7 +1144,8 @@ int IPU3CameraData::loadIPA()\n \n \tipa_->queueFrameAction.connect(this, &IPU3CameraData::queueFrameAction);\n \n-\tipa_->init(IPASettings{});\n+\tCameraSensor *sensor = cio2_.sensor();\n+\tipa_->init(IPASettings{ \"\", sensor->model() });\n \n \treturn 0;\n }\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 00fa62c972ed..2c8ae31a28ad 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1227,7 +1227,8 @@ int RPiCameraData::loadIPA()\n \tipa_->setIspControls.connect(this, &RPiCameraData::setIspControls);\n \tipa_->setDelayedControls.connect(this, &RPiCameraData::setDelayedControls);\n \n-\tIPASettings settings(ipa_->configurationFile(sensor_->model() + \".json\"));\n+\tIPASettings settings(ipa_->configurationFile(sensor_->model() + \".json\"),\n+\t\t\t sensor_->model());\n \n \treturn ipa_->init(settings);\n }\ndiff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 57c65b021c46..2dfb63ecf2ef 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -425,7 +425,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n \tdata->ipa_ = IPAManager::createIPA<ipa::vimc::IPAProxyVimc>(this, 0, 0);\n \tif (data->ipa_ != nullptr) {\n \t\tstd::string conf = data->ipa_->configurationFile(\"vimc.conf\");\n-\t\tdata->ipa_->init(IPASettings{ conf });\n+\t\tdata->ipa_->init(IPASettings{ conf, data->sensor_->model() });\n \t} else {\n \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n \t}\ndiff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\nindex 4b88806f8f67..d6ca6f5137b0 100644\n--- a/test/ipa/ipa_interface_test.cpp\n+++ b/test/ipa/ipa_interface_test.cpp\n@@ -104,7 +104,7 @@ protected:\n \n \t\t/* Test initialization of IPA module. */\n \t\tstd::string conf = ipa_->configurationFile(\"vimc.conf\");\n-\t\tint ret = ipa_->init(IPASettings{ conf });\n+\t\tint ret = ipa_->init(IPASettings{ conf, \"vimc\" });\n \t\tif (ret < 0) {\n \t\t\tcerr << \"IPA interface init() failed\" << endl;\n \t\t\treturn TestFail;\n", "prefixes": [ "libcamera-devel", "v2", "1/7" ] }