Show a patch.

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

{
    "id": 19320,
    "url": "https://patchwork.libcamera.org/api/patches/19320/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19320/",
    "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": "<20231214121350.206015-8-hdegoede@redhat.com>",
    "date": "2023-12-14T12:13:45",
    "name": "[libcamera-devel,07/11] libcamera: ipa: add Soft IPA common files",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4a82616b3818199b2241439c58773df2c8b19bba",
    "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/19320/mbox/",
    "series": [
        {
            "id": 4117,
            "url": "https://patchwork.libcamera.org/api/series/4117/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4117",
            "date": "2023-12-14T12:13:38",
            "name": "libcamera: introduce Software ISP and Software IPA",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4117/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19320/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19320/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 C6466C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Dec 2023 12:14:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 302BD62B54;\n\tThu, 14 Dec 2023 13:14:07 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6B0662B30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Dec 2023 13:14:05 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-651-tOeBJRxNNCW_8GxD3RRmVA-1;\n\tThu, 14 Dec 2023 07:14:03 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3])\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 132071C0512F;\n\tThu, 14 Dec 2023 12:14:03 +0000 (UTC)",
            "from shalem.redhat.com (unknown [10.39.194.72])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id BB57A1121306;\n\tThu, 14 Dec 2023 12:14:01 +0000 (UTC)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702556047;\n\tbh=Ay3s0M6HwV3o+TGd2e9TbWFIv6IMJfwN8Yo1FmDwhrc=;\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=i3LnDCLbShyI1NYVtRhQZO0afgWddCNdQgL6B4OPvUC6jbc+CqBla2Fk9YCaQ4Ouz\n\th7535qVYez4lwb07jwfPbwhEvIk7ifKdEaxJxbSi+ur9w2N3BrZNRmeeR/GsiuFeMq\n\tuy8+tUw/yNvun0GHEt8ffQBRFXstIXe4LNuALpdmvA/kwWbkl7hq5E6YEC/tZ8AS1B\n\tZUj4s8zmq4WAlJz/IkVCWRZ0lZJTXY9G3UHztuDnOZffIgT1qMR/IpnZqUrpieyYGp\n\tny2N2CyYz18S3RV3QdTlbqVUjpbbcKEdYQAR4I97MKQkYDNVdpEDtVOYDc2sBuAuUD\n\t91J5JAygV/A/g==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1702556044;\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=6Y0U7F+ZB5/Naom5DJvGoBaR9EWGu1cAcFIzHl/r3f0=;\n\tb=DqlEgsGPaaVBB8Q1JEklTpiRpY7AHiieKpR9vx34FgvGalRqmqtovpuY0r1CTkB8OFjhbH\n\tDZAJYReZgw0oNofD7d+q11+PWlJUUw8Rv4IVL1iFMnEGB1pJk+fHBGu3oWkOZyTVyH+2eV\n\tlC9hr6lDT7vssgJunr5rp3f1K9ivwjc="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"DqlEgsGP\"; \n\tdkim-atps=neutral",
        "X-MC-Unique": "tOeBJRxNNCW_8GxD3RRmVA-1",
        "To": "libcamera-devel@lists.libcamera.org,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>",
        "Date": "Thu, 14 Dec 2023 13:13:45 +0100",
        "Message-ID": "<20231214121350.206015-8-hdegoede@redhat.com>",
        "In-Reply-To": "<20231214121350.206015-1-hdegoede@redhat.com>",
        "References": "<20231214121350.206015-1-hdegoede@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.3",
        "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 07/11] libcamera: ipa: add Soft IPA common\n\tfiles",
        "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\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>\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..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..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",
        "07/11"
    ]
}