Patch Detail
Show a patch.
GET /api/patches/11530/?format=api
{ "id": 11530, "url": "https://patchwork.libcamera.org/api/patches/11530/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11530/", "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": "<20210309063829.8710-4-dafna.hirschfeld@collabora.com>", "date": "2021-03-09T06:38:29", "name": "[libcamera-devel,v3,3/3] ipa: rkisp1: fail on init if hw revision is not RKISP1_V10", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7ae3de633024e5d0361920b2cffb4d098e201d8c", "submitter": { "id": 46, "url": "https://patchwork.libcamera.org/api/people/46/?format=api", "name": "Dafna Hirschfeld", "email": "dafna.hirschfeld@collabora.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11530/mbox/", "series": [ { "id": 1775, "url": "https://patchwork.libcamera.org/api/series/1775/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1775", "date": "2021-03-09T06:38:27", "name": "rkisp1: add an initial support to different hw revision", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1775/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11530/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11530/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 004B6BD80E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 9 Mar 2021 06:38:42 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B9FD68AAC;\n\tTue, 9 Mar 2021 07:38:42 +0100 (CET)", "from bhuna.collabora.co.uk (bhuna.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9347C68AA7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 9 Mar 2021 07:38:39 +0100 (CET)", "from [127.0.0.1] (localhost [127.0.0.1])\n\t(Authenticated sender: dafna) with ESMTPSA id B8B881F4521B" ], "From": "Dafna Hirschfeld <dafna.hirschfeld@collabora.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 9 Mar 2021 07:38:29 +0100", "Message-Id": "<20210309063829.8710-4-dafna.hirschfeld@collabora.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210309063829.8710-1-dafna.hirschfeld@collabora.com>", "References": "<20210309063829.8710-1-dafna.hirschfeld@collabora.com>", "Subject": "[libcamera-devel] [PATCH v3 3/3] ipa: rkisp1: fail on init if hw\n\trevision is not RKISP1_V10", "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>", "Cc": "kernel@collabora.com", "MIME-Version": "1.0", "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": "In kernel 5.11 the rkisp1 uapi had changed to support\ndifferent hardware revisions. Currently only revision 10\nis supported by the rkisp1 IPA and therefore 'init'\nshould fail if the revision is not 10.\n\nSigned-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>\n---\n include/libcamera/ipa/rkisp1.mojom | 2 +-\n src/ipa/rkisp1/rkisp1.cpp | 17 +++++++++++++----\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++------\n 3 files changed, 18 insertions(+), 11 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom\nindex 95fa0d93..29f726e1 100644\n--- a/include/libcamera/ipa/rkisp1.mojom\n+++ b/include/libcamera/ipa/rkisp1.mojom\n@@ -25,7 +25,7 @@ struct RkISP1Action {\n };\n \n interface IPARkISP1Interface {\n-\tinit(IPASettings settings) => (int32 ret);\n+\tinit(uint32 hwRevision) => (int32 ret);\n \tstart() => (int32 ret);\n \tstop();\n \ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 0b0f31e4..197c2389 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -31,10 +31,7 @@ LOG_DEFINE_CATEGORY(IPARkISP1)\n class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface\n {\n public:\n-\tint init([[maybe_unused]] const IPASettings &settings) override\n-\t{\n-\t\treturn 0;\n-\t}\n+\tint init(unsigned int hwRevision) override;\n \tint start() override { return 0; }\n \tvoid stop() override {}\n \n@@ -69,6 +66,18 @@ private:\n \tuint32_t maxGain_;\n };\n \n+int IPARkISP1::init(unsigned int hwRevision)\n+{\n+\t/* todo add support for other revisions */\n+\tif (hwRevision != RKISP1_V10) {\n+\t\tLOG(IPARkISP1, Error) << \"Hardware version \" << hwRevision <<\n+\t\t\t\" is currently not supported\";\n+\t\treturn -ENODEV;\n+\t}\n+\tLOG(IPARkISP1, Info) << \"Hardware revision is \" << hwRevision;\n+\treturn 0;\n+}\n+;\n /**\n * \\todo The RkISP1 pipeline currently provides an empty CameraSensorInfo\n * if the connected sensor does not provide enough information to properly\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 34814f62..24c622a8 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -85,7 +85,7 @@ public:\n \t{\n \t}\n \n-\tint loadIPA();\n+\tint loadIPA(unsigned int hwRevision);\n \n \tStream mainPathStream_;\n \tStream selfPathStream_;\n@@ -300,7 +300,7 @@ RkISP1FrameInfo *RkISP1Frames::find(Request *request)\n \treturn nullptr;\n }\n \n-int RkISP1CameraData::loadIPA()\n+int RkISP1CameraData::loadIPA(unsigned int hwRevision)\n {\n \tipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(pipe_, 1, 1);\n \tif (!ipa_)\n@@ -309,9 +309,7 @@ int RkISP1CameraData::loadIPA()\n \tipa_->queueFrameAction.connect(this,\n \t\t\t\t &RkISP1CameraData::queueFrameAction);\n \n-\tipa_->init(IPASettings{});\n-\n-\treturn 0;\n+\treturn ipa_->init(hwRevision);\n }\n \n void RkISP1CameraData::queueFrameAction(unsigned int frame,\n@@ -952,7 +950,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \tisp_->frameStart.connect(data->delayedCtrls_.get(),\n \t\t\t\t &DelayedControls::applyControls);\n \n-\tret = data->loadIPA();\n+\tret = data->loadIPA(media_->hwRevision());\n \tif (ret)\n \t\treturn ret;\n \n", "prefixes": [ "libcamera-devel", "v3", "3/3" ] }