Patch Detail
Show a patch.
GET /api/patches/19308/?format=api
{ "id": 19308, "url": "https://patchwork.libcamera.org/api/patches/19308/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19308/", "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": "<20231212115046.102726-4-andrey.konovalov@linaro.org>", "date": "2023-12-12T11:50:42", "name": "[libcamera-devel,RFC,v2,3/7] libcamera: ipa: add Soft IPA common files", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2f7b9ce1ada90a54dfd030473cfc7dacb2a4e08b", "submitter": { "id": 25, "url": "https://patchwork.libcamera.org/api/people/25/?format=api", "name": "Andrey Konovalov", "email": "andrey.konovalov@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19308/mbox/", "series": [ { "id": 4114, "url": "https://patchwork.libcamera.org/api/series/4114/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4114", "date": "2023-12-12T11:50:39", "name": "libcamera: introduce Software ISP and Software IPA", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4114/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19308/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19308/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 54DE3C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Dec 2023 11:51:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E699062B52;\n\tTue, 12 Dec 2023 12:51:24 +0100 (CET)", "from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com\n\t[IPv6:2a00:1450:4864:20::52e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2AA8662B41\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Dec 2023 12:51:23 +0100 (CET)", "by mail-ed1-x52e.google.com with SMTP id\n\t4fb4d7f45d1cf-55193d5e8cdso511841a12.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Dec 2023 03:51:23 -0800 (PST)", "from Lat-5310.. ([87.116.161.153]) by smtp.gmail.com with ESMTPSA\n\tid\n\ttx17-20020a1709078e9100b00a1b75e0e061sm6213188ejc.130.2023.12.12.03.51.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 12 Dec 2023 03:51:22 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702381884;\n\tbh=CJI8FQq0mtavduac21Ymmof0RKxobTxU+1R/iZoaOig=;\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:Cc:\n\tFrom;\n\tb=AX9iC/Wvoy55Ma34FUozOGuB2ofBHck4PUQ4IQu+vR1i2eh+/Il9+v4zL9XgkSTnI\n\tWWkfRWvcofE8rFp/VAwg4pCfDp76f6xxsCtyyjnPfdHAkazgV6UtEUmXf7GnnTAW8X\n\tPXlQAzJed8KzXaAxyQ9/stWR8VYyy9bHabkHb6nDWMzD2KIi1opBmqSy8RhQZprawj\n\taAy/v8DezaV7LA8V33q5Xif6SDS2+JwmdzMhzQ5q26Cu4qfXaEIc9VpS5dwWywzilx\n\tw9OUdiXX40JR409yynu9gFI1iGfBF/I7AvwJTQB90e1B08sICNFw0vTNwT0MbMByLB\n\tnHj5PyM6OcfDA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1702381882; x=1702986682;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=UMHEt2nX/fX21DwzK+lb5B5tJv/czMRUFMKk7pQX9aQ=;\n\tb=yr9a8pMnlbo2KMa9e09SmdDP7UNVlw1QyP8fv3MX0re7QHhJYKe+Ex01KqGTTbFFff\n\tXlUDYUO7r489gUp5JOZdZmnR5oR1kekV79+3IDwetGYJcyuyNDwPAr0YyCC12SrRab6n\n\tWf0a5Zw8Z9WR010HiSoSIx7+XfzvGDZdQR1ufaZnmmiUx2Kv8OZsN7FiCLEG+7JW+3w8\n\tOZKipKr1ckX4S+bBGZixtnPzNkG9LoHB/PVUElT/bR9Fwjh7PZi2XbdsL//KwLLYYdXX\n\tzTKWw2/kjuEAfWBJa3fhHG1cVVlnTQUr1ZpP8l8nHeTJ0S+GCr0HcXz5y0B2CYm9Rm/0\n\tAHnw==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=linaro.org\n\theader.i=@linaro.org header.b=\"yr9a8pMn\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1702381882; x=1702986682;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=UMHEt2nX/fX21DwzK+lb5B5tJv/czMRUFMKk7pQX9aQ=;\n\tb=LUFkfF4xLoVGsLDnqimc3LbJ9E74CwZPceDpAk1YtPkUaSAte6mhNOekw8nCQ18Qyy\n\tOrciP8UiV9P2oFtHCPBeoLKYegg91lG46j047Pt18vS5RKdik/s7ZxZcP3KbsmPnieDK\n\t5W54drGeVfpDFg9EivLPxx9ErK08ayr5VV3sdSGIxY3PPHfaRrt95GVS9OdEhxk5x3tj\n\tw238aq4x/0Nn+iifOmhzBMcX3DgEJllC2x9h7WGzbeM1JntW9UusE3ZUukUEQOcjWRBd\n\tgk+p+SLOo0Ae5pWOz8+y3j8Cw65l6XPHE8v3bhybMuQPTecyrknfh3F/eQcqFvdb3fCi\n\t+lVQ==", "X-Gm-Message-State": "AOJu0Ywk7wOb0UX/eqC4Y4adN1m6p5zMhMrnF5HRer6RChQD0RPZjO3N\n\t9NyjtUaU0+qNhCeAzG3fuKtQZi97Vgk1nsGxbfk=", "X-Google-Smtp-Source": "AGHT+IGMqLximQEeYHKJnpqgG+iwSG6I868OH7WHfbl1p214rixjj6lGbk6f5N0Zh3DBSQZtjsCRBQ==", "X-Received": "by 2002:a17:906:1db:b0:a1d:932f:9098 with SMTP id\n\t27-20020a17090601db00b00a1d932f9098mr2876607ejj.97.1702381882708; \n\tTue, 12 Dec 2023 03:51:22 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 12 Dec 2023 14:50:42 +0300", "Message-Id": "<20231212115046.102726-4-andrey.konovalov@linaro.org>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231212115046.102726-1-andrey.konovalov@linaro.org>", "References": "<20231212115046.102726-1-andrey.konovalov@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH v2 3/7] libcamera: ipa: add Soft IPA\n\tcommon files", "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": "Andrey Konovalov via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Andrey Konovalov <andrey.konovalov@linaro.org>", "Cc": "mripard@redhat.com, g.martti@gmail.com, t.langendam@gmail.com,\n\tsrinivas.kandagatla@linaro.org, pavel@ucw.cz,\n\tbryan.odonoghue@linaro.org, admin@dennisbonke.com", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Define the Soft IPA main and event interfaces, add IPASoftBase\nclass the Soft IPA implementation inherit from.\n\nSigned-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n---\n include/libcamera/ipa/meson.build | 1 +\n include/libcamera/ipa/soft.mojom | 27 ++++++++++++\n src/ipa/simple/common/meson.build | 17 ++++++++\n src/ipa/simple/common/soft_base.cpp | 66 +++++++++++++++++++++++++++++\n src/ipa/simple/common/soft_base.h | 47 ++++++++++++++++++++\n src/ipa/simple/meson.build | 3 ++\n 6 files changed, 161 insertions(+)\n create mode 100644 include/libcamera/ipa/soft.mojom\n create mode 100644 src/ipa/simple/common/meson.build\n create mode 100644 src/ipa/simple/common/soft_base.cpp\n create mode 100644 src/ipa/simple/common/soft_base.h\n create mode 100644 src/ipa/simple/meson.build", "diff": "diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex f3b4881c..aaee5cbf 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -65,6 +65,7 @@ pipeline_ipa_mojom_mapping = {\n 'ipu3': 'ipu3.mojom',\n 'rkisp1': 'rkisp1.mojom',\n 'rpi/vc4': 'raspberrypi.mojom',\n+ 'simple/linaro': 'soft.mojom',\n 'vimc': 'vimc.mojom',\n }\n \ndiff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\nnew file mode 100644\nindex 00000000..c3449188\n--- /dev/null\n+++ b/include/libcamera/ipa/soft.mojom\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+\n+/*\n+ * \\todo Document the interface and remove the related EXCLUDE_PATTERNS entry.\n+ * \\todo Add a way to tell SoftIPA the list of params SoftISP accepts?\n+ */\n+\n+module ipa.soft;\n+\n+import \"include/libcamera/ipa/core.mojom\";\n+\n+interface IPASoftInterface {\n+\tinit(libcamera.IPASettings settings,\n+\t libcamera.SharedFD fdStats,\n+\t libcamera.ControlInfoMap sensorCtrlInfoMap)\n+\t\t=> (int32 ret);\n+\tstart() => (int32 ret);\n+\tstop();\n+\tconfigure(libcamera.ControlInfoMap sensorCtrlInfoMap)\n+\t\t=> (int32 ret);\n+\n+\t[async] processStats(libcamera.ControlList sensorControls);\n+};\n+\n+interface IPASoftEventInterface {\n+\tsetSensorControls(libcamera.ControlList sensorControls);\n+};\ndiff --git a/src/ipa/simple/common/meson.build b/src/ipa/simple/common/meson.build\nnew file mode 100644\nindex 00000000..023e617b\n--- /dev/null\n+++ b/src/ipa/simple/common/meson.build\n@@ -0,0 +1,17 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+soft_ipa_common_sources = files([\n+ 'soft_base.cpp',\n+])\n+\n+soft_ipa_common_includes = [\n+ include_directories('..'),\n+]\n+\n+soft_ipa_common_deps = [\n+ libcamera_private,\n+]\n+\n+soft_ipa_common_lib = static_library('soft_ipa_common', soft_ipa_common_sources,\n+ include_directories : soft_ipa_common_includes,\n+ dependencies : soft_ipa_common_deps)\ndiff --git a/src/ipa/simple/common/soft_base.cpp b/src/ipa/simple/common/soft_base.cpp\nnew file mode 100644\nindex 00000000..7bd9b8de\n--- /dev/null\n+++ b/src/ipa/simple/common/soft_base.cpp\n@@ -0,0 +1,66 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Linaro Ltd\n+ *\n+ * soft-base.cpp - Software IPA base class\n+ */\n+\n+#include \"soft_base.h\"\n+\n+#include <sys/mman.h>\n+\n+#include <libcamera/base/file.h>\n+#include <libcamera/base/log.h>\n+\n+#include <libcamera/control_ids.h>\n+\n+namespace libcamera {\n+\n+LOG_DEFINE_CATEGORY(IPASoft)\n+\n+namespace ipa::soft {\n+\n+IPASoftBase::IPASoftBase()\n+{\n+}\n+\n+IPASoftBase::~IPASoftBase()\n+{\n+}\n+\n+int IPASoftBase::init([[maybe_unused]] const IPASettings &settings,\n+\t\t const SharedFD &fdStats,\n+\t\t const ControlInfoMap &sensorInfoMap)\n+{\n+\tfdStats_ = std::move(fdStats);\n+\tif (!fdStats_.isValid()) {\n+\t\tLOG(IPASoft, Error) << \"Invalid Statistics handle\";\n+\t\treturn -ENODEV;\n+\t}\n+\n+\treturn platformInit(sensorInfoMap);\n+}\n+\n+int IPASoftBase::configure(const ControlInfoMap &sensorInfoMap)\n+{\n+\treturn platformConfigure(sensorInfoMap);\n+}\n+\n+int IPASoftBase::start()\n+{\n+\treturn platformStart();\n+}\n+\n+void IPASoftBase::stop()\n+{\n+\treturn platformStop();\n+}\n+\n+void IPASoftBase::processStats(const ControlList &sensorControls)\n+{\n+\treturn platformProcessStats(sensorControls);\n+}\n+\n+} /* namespace ipa::soft */\n+\n+} /* namespace libcamera */\ndiff --git a/src/ipa/simple/common/soft_base.h b/src/ipa/simple/common/soft_base.h\nnew file mode 100644\nindex 00000000..bff53713\n--- /dev/null\n+++ b/src/ipa/simple/common/soft_base.h\n@@ -0,0 +1,47 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Linaro Ltd\n+ *\n+ * soft-base.h - Software IPA base class\n+ */\n+#pragma once\n+\n+#include <libcamera/base/shared_fd.h>\n+#include <libcamera/controls.h>\n+\n+#include <libcamera/ipa/soft_ipa_interface.h>\n+\n+namespace libcamera {\n+\n+namespace ipa::soft {\n+\n+class IPASoftBase : public ipa::soft::IPASoftInterface\n+{\n+public:\n+\tIPASoftBase();\n+\t~IPASoftBase();\n+\n+\tint init(const IPASettings &settings,\n+\t\t const SharedFD &fdStats,\n+\t\t const ControlInfoMap &sensorInfoMap) override;\n+\tint configure(const ControlInfoMap &sensorInfoMap) override;\n+\n+\tint start() override;\n+\tvoid stop() override;\n+\n+\tvoid processStats(const ControlList &sensorControls) override;\n+\n+protected:\n+\tSharedFD fdStats_;\n+\n+private:\n+\tvirtual int platformInit(const ControlInfoMap &sensorInfoMap) = 0;\n+\tvirtual int platformConfigure(const ControlInfoMap &sensorInfoMap) = 0;\n+\tvirtual int platformStart() = 0;\n+\tvirtual void platformStop() = 0;\n+\tvirtual void platformProcessStats(const ControlList &sensorControls) = 0;\n+};\n+\n+} /* namespace ipa::soft */\n+\n+} /* namespace libcamera */\ndiff --git a/src/ipa/simple/meson.build b/src/ipa/simple/meson.build\nnew file mode 100644\nindex 00000000..9688bbdb\n--- /dev/null\n+++ b/src/ipa/simple/meson.build\n@@ -0,0 +1,3 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+subdir('common')\n", "prefixes": [ "libcamera-devel", "RFC", "v2", "3/7" ] }