Show a patch.

GET /api/patches/19400/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 19400,
    "url": "https://patchwork.libcamera.org/api/patches/19400/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19400/",
    "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": "<20240113142218.28063-12-hdegoede@redhat.com>",
    "date": "2024-01-13T14:22:11",
    "name": "[libcamera-devel,v2,11/18] libcamera: ipa: add Soft IPA common files",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "dbaadc5865d147ebd05996ae6fa1597a66d2284e",
    "submitter": {
        "id": 102,
        "url": "https://patchwork.libcamera.org/api/people/102/?format=api",
        "name": "Hans de Goede",
        "email": "hdegoede@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19400/mbox/",
    "series": [
        {
            "id": 4142,
            "url": "https://patchwork.libcamera.org/api/series/4142/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4142",
            "date": "2024-01-13T14:22:00",
            "name": "[libcamera-devel,v2,01/18] libcamera: pipeline: simple: fix size adjustment in validate()",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4142/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19400/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19400/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 A6005BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Jan 2024 14:22:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 40A72628BF;\n\tSat, 13 Jan 2024 15:22:59 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75BB461D57\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Jan 2024 15:22:58 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-122-hfXCtJllNQibY1NGF6IR1w-1; Sat, 13 Jan 2024 09:22:54 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id D22CD101A52A;\n\tSat, 13 Jan 2024 14:22:53 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.39.192.58])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id BD58B3C25;\n\tSat, 13 Jan 2024 14:22:51 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705155779;\n\tbh=rg1TgeCZZLMFboNcsBL7nH2K3Xn8d2ogeSG1Md/KNuU=;\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=PlnCqddoLZdsCS46jr1t4hydqpUlxTvR1eNAYO6fIl+Mw/BapBsRHUVjq81y9LRaL\n\tTOL0TGNBcHQVX9af/9DS/hst4wrHg3AufjRdvNURkULDqmE6c9m4mfzytNLMnqAuji\n\tnss4V1s3AS30cOIuKimVFQhAs0DB4L5Rf7yk4ALn67gRfjhBP23ZrzSuGh8Wk5UCQa\n\tB5g0+vfQ4PczKiKHWRX5HHmQFQCMTVpmuTMjm2Xy1rnbq9gQQ2BwSE8NU5CpB25oU6\n\tPjLTwO0ubaOZN51ZYD8OKikBisV7NaRc3eqi70RaKhzlaNg0JOliHf7z4mKIbgupHq\n\txxNbGmfogpYpQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1705155777;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=EGaKKv6I9Xr1v9RAPLt99roTMQxTe+c7/mEGsJKjiHU=;\n\tb=A1hNZrRX7g7pJb2CnA6wwIEcdkt/9xqPl9s106oQ1xZVDNKnYFsnCjibbLfwabCKktML0U\n\t2mixEu6Kn1PP0n2p53qLwzEZ0C4zLJYGfF6fAhdPGn1iKhXRM+TCG0PyVNpR0j8TGNZ6if\n\tWMnShuXcoxOsqt2nv4x0VshgBxJTDJY="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"A1hNZrRX\"; \n\tdkim-atps=neutral",
        "X-MC-Unique": "hfXCtJllNQibY1NGF6IR1w-1",
        "To": "libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov.ynk@gmail.com>",
        "Date": "Sat, 13 Jan 2024 15:22:11 +0100",
        "Message-ID": "<20240113142218.28063-12-hdegoede@redhat.com>",
        "In-Reply-To": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "References": "<20240113142218.28063-1-hdegoede@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "Subject": "[libcamera-devel] [PATCH v2 11/18] 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": "Hans de Goede via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Hans de Goede <hdegoede@redhat.com>",
        "Cc": "Maxime Ripard <mripard@redhat.com>, g.martti@gmail.com,\n\tt.langendam@gmail.com, srinivas.kandagatla@linaro.org,\n\tPavel Machek <pavel@ucw.cz>,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>, admin@dennisbonke.com",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Andrey Konovalov <andrey.konovalov@linaro.org>\n\nDefine 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>\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\nTested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sc8280xp Lenovo x13s\nTested-by: Pavel Machek <pavel@ucw.cz>\n---\n Documentation/Doxyfile.in           |  1 +\n include/libcamera/ipa/meson.build   |  1 +\n include/libcamera/ipa/soft.mojom    | 29 ++++++++++++\n src/ipa/simple/common/meson.build   | 17 +++++++\n src/ipa/simple/common/soft_base.cpp | 73 +++++++++++++++++++++++++++++\n src/ipa/simple/common/soft_base.h   | 50 ++++++++++++++++++++\n src/ipa/simple/meson.build          |  3 ++\n 7 files changed, 174 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/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex a86ea6c1..2be8d47b 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -44,6 +44,7 @@ EXCLUDE                = @TOP_SRCDIR@/include/libcamera/base/span.h \\\n                          @TOP_SRCDIR@/src/libcamera/pipeline/ \\\n                          @TOP_SRCDIR@/src/libcamera/tracepoints.cpp \\\n                          @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \\\n+                         @TOP_BUILDDIR@/include/libcamera/ipa/soft_ipa_interface.h \\\n                          @TOP_BUILDDIR@/src/libcamera/proxy/\n \n EXCLUDE_PATTERNS       = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \\\ndiff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex f3b4881c..894e38a6 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/simple': '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..2dae652b\n--- /dev/null\n+++ b/include/libcamera/ipa/soft.mojom\n@@ -0,0 +1,29 @@\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.SharedFD fdParams,\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+\tsetIspParams(int32 dummy);\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..b4ed9023\n--- /dev/null\n+++ b/src/ipa/simple/common/soft_base.cpp\n@@ -0,0 +1,73 @@\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 SharedFD &fdParams,\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+\tfdParams_ = std::move(fdParams);\n+\tif (!fdParams_.isValid()) {\n+\t\tLOG(IPASoft, Error) << \"Invalid Parameters 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..85c98702\n--- /dev/null\n+++ b/src/ipa/simple/common/soft_base.h\n@@ -0,0 +1,50 @@\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+\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 SharedFD &fdParams,\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+\tSharedFD fdParams_;\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",
        "v2",
        "11/18"
    ]
}