Patch Detail
Show a patch.
GET /api/1.1/patches/11667/?format=api
{ "id": 11667, "url": "https://patchwork.libcamera.org/api/1.1/patches/11667/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11667/", "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": "<20210323143610.787760-2-naush@raspberrypi.com>", "date": "2021-03-23T14:36:04", "name": "[libcamera-devel,v3,1/7] ipa: Add sensor model string to IPASettings", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "24281efe9e34b413965b745bf9970350dadfe9dc", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11667/mbox/", "series": [ { "id": 1823, "url": "https://patchwork.libcamera.org/api/1.1/series/1823/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1823", "date": "2021-03-23T14:36:03", "name": "Raspberry Pi: ipa::init() restructuring", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1823/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11667/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11667/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 C68ACC32E5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 14:36:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E05F68D74;\n\tTue, 23 Mar 2021 15:36:19 +0100 (CET)", "from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com\n\t[IPv6:2a00:1450:4864:20::52a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6C06A68D65\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 15:36:17 +0100 (CET)", "by mail-ed1-x52a.google.com with SMTP id e7so23646129edu.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 07:36:17 -0700 (PDT)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tn6sm11282430eji.37.2021.03.23.07.36.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 23 Mar 2021 07:36:16 -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=\"CvpXxGbf\"; 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=Pzvorr6SD2Xy1ydO1rmjBLXE5yybuLLY0wcln6JsWjg=;\n\tb=CvpXxGbfc80quu7weBjisOo8rX20sfWdC7pZsrvfoKubmgNhjf2RwVll/IRwRmxZRQ\n\tp9+9pcGhs4GeO92nXEqwjdoGgBg1sAmWIBjMsvLpLPtudl1tV+2CjiM69Q9ToNe1Izw8\n\t9FxeSOPQnskR2MLccs+YIUvvJTxzrM+h+YrqFycdsnk0KXFGVmVNMdLngMz0Mh5/acwW\n\tQfHbHEs1Rtedx9voJpw215Dbm8LsFjmwknnRh6VUaucNrP5jHBckTGiUSmjTujAxRM9Y\n\t7tbKuFKPqFby1cghAz1t2J/jlOB+Z1VUGBTxikM6r5tval4G8BGiLNFZMDmjgi+0I+is\n\tcNbw==", "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=Pzvorr6SD2Xy1ydO1rmjBLXE5yybuLLY0wcln6JsWjg=;\n\tb=kkiEdgJtumWZsBk5AZ49Wo/7dn9h+MMfh+0iWHu5bYs8DKTXsdihfU9IJYMllJXbgt\n\txeov2dku6Nn6W/rxkg3Ibe/HIJWhxYQzaQER0LqHNCJGQdyDIZN4go4rd6TtrOn03pUB\n\tb853RaSkJRAf4H5ZznylaxFeYvPTRneLMVqCbzIjv+z+0d2N3k789e9Sus+AnUGNdaXL\n\ty7apw1i6e2+1YylzRaPLftMNZmlx45s8UOuvg2CDOkKHb0pyCNXOm+kEoP/J+gI0cUKL\n\t6yleT6G5imCdiGvJtogwVXx6K7ETpmnuz6VaC+AIVVqiRItcYgTroJ1vQW32p7leqgCT\n\tMBag==", "X-Gm-Message-State": "AOAM533TzyThZwq5jyDhFdYo+JlDBp+Z8W3QD72q/Y22Cn4LWOTt/ofi\n\tQA3d+Bc3njiCnGUCGhcv5O4xj8MwE7Fk+A==", "X-Google-Smtp-Source": "ABdhPJwQPsNfkhSlfnnW8RdCXsyHfrsAAGrq5Msoc/5SucarQ6/1G/9MJxJl3nFVJQUrvvDZqdSiRA==", "X-Received": "by 2002:aa7:da04:: with SMTP id r4mr4887289eds.343.1616510176643;\n\tTue, 23 Mar 2021 07:36:16 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 23 Mar 2021 14:36:04 +0000", "Message-Id": "<20210323143610.787760-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210323143610.787760-1-naush@raspberrypi.com>", "References": "<20210323143610.787760-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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", "v3", "1/7" ] }