Show a patch.

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

{
    "id": 11286,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11286/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11286/",
    "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": "<20210213042225.112477-13-paul.elder@ideasonboard.com>",
    "date": "2021-02-13T04:22:25",
    "name": "[libcamera-devel,v8,12/12] libcamera: pipeline, ipa: ipu3: Support the new IPC mechanism",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5b27ca8c93779d87d48f8c51ab6d72296e4ed803",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11286/mbox/",
    "series": [
        {
            "id": 1688,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1688/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1688",
            "date": "2021-02-13T04:22:13",
            "name": "IPA isolation: Part 2: Conversion and plumbing",
            "version": 8,
            "mbox": "https://patchwork.libcamera.org/series/1688/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11286/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11286/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 D7858BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Feb 2021 04:23:09 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E6E1637C3;\n\tSat, 13 Feb 2021 05:23:09 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FD606379C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Feb 2021 05:23:08 +0100 (CET)",
            "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3C61D1576;\n\tSat, 13 Feb 2021 05:23:05 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"srAod0Tj\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613190188;\n\tbh=4Zp9YBk/LWPGHbY/jo8Cw9vpZ43YBouSIhPsbhzQ/Ug=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=srAod0TjNIULgYXlSIUOOwowbYu9uzGjCxFzmqLKwCrsYf67Fm2gIAdwCYNx0Fk+R\n\tQwOF+8uTDKCIv+Wd3R3w7ki68VFY/028GTpYhT+mcpdL3hYZnpZ2yLnkguednVh3cU\n\tTtF1OZuLV7MjKeFfBOQu0jcKZiFNLRA0qJ9cWGk8=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 13 Feb 2021 13:22:25 +0900",
        "Message-Id": "<20210213042225.112477-13-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210213042225.112477-1-paul.elder@ideasonboard.com>",
        "References": "<20210213042225.112477-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v8 12/12] libcamera: pipeline,\n\tipa: ipu3: Support the new IPC mechanism",
        "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=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nAdd support to ipu3 pipeline handler and IPA for the new IPC mechanism.\n\n[Original version]\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n[Fixed commit message and small changes]\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v8:\n- replace push_back with emplace_back\n\nNew in v7\n- was \"ipu3: Translate IPA protocol to new mojo interface\"\n- remove include core_ipa_interface.h from pipeline ipu3.cpp\n- change commit message\n- move removal of include ipa_interface_wrapper.h to \"libcamera:\n  IPAInterface: Replace C API with the new C++-only API\"\n---\n include/libcamera/ipa/ipu3.h         | 23 -------\n include/libcamera/ipa/ipu3.mojom     | 43 +++++++++++++\n include/libcamera/ipa/meson.build    |  1 +\n src/ipa/ipu3/ipu3.cpp                | 72 +++++++++------------\n src/ipa/ipu3/meson.build             |  4 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 93 +++++++++++-----------------\n 6 files changed, 109 insertions(+), 127 deletions(-)\n delete mode 100644 include/libcamera/ipa/ipu3.h\n create mode 100644 include/libcamera/ipa/ipu3.mojom",
    "diff": "diff --git a/include/libcamera/ipa/ipu3.h b/include/libcamera/ipa/ipu3.h\ndeleted file mode 100644\nindex cbaaef04..00000000\n--- a/include/libcamera/ipa/ipu3.h\n+++ /dev/null\n@@ -1,23 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2020, Google Inc.\n- *\n- * ipu3.h - Image Processing Algorithm interface for IPU3\n- */\n-#ifndef __LIBCAMERA_IPA_INTERFACE_IPU3_H__\n-#define __LIBCAMERA_IPA_INTERFACE_IPU3_H__\n-\n-#ifndef __DOXYGEN__\n-\n-enum IPU3Operations {\n-\tIPU3_IPA_ACTION_SET_SENSOR_CONTROLS = 1,\n-\tIPU3_IPA_ACTION_PARAM_FILLED = 2,\n-\tIPU3_IPA_ACTION_METADATA_READY = 3,\n-\tIPU3_IPA_EVENT_PROCESS_CONTROLS = 4,\n-\tIPU3_IPA_EVENT_STAT_READY = 5,\n-\tIPU3_IPA_EVENT_FILL_PARAMS = 6,\n-};\n-\n-#endif /* __DOXYGEN__ */\n-\n-#endif /* __LIBCAMERA_IPA_INTERFACE_IPU3_H__ */\ndiff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom\nnew file mode 100644\nindex 00000000..6ee11333\n--- /dev/null\n+++ b/include/libcamera/ipa/ipu3.mojom\n@@ -0,0 +1,43 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+\n+module ipa.ipu3;\n+\n+import \"include/libcamera/ipa/core.mojom\";\n+\n+enum IPU3Operations {\n+\tActionSetSensorControls = 1,\n+\tActionParamFilled = 2,\n+\tActionMetadataReady = 3,\n+\tEventProcessControls = 4,\n+\tEventStatReady = 5,\n+\tEventFillParams = 6,\n+};\n+\n+struct IPU3Event {\n+\tIPU3Operations op;\n+\tuint32 frame;\n+\tuint32 bufferId;\n+\tControlList controls;\n+};\n+\n+struct IPU3Action {\n+\tIPU3Operations op;\n+\tControlList controls;\n+};\n+\n+interface IPAIPU3Interface {\n+\tinit(IPASettings settings) => (int32 ret);\n+\tstart() => (int32 ret);\n+\tstop();\n+\n+\tconfigure(map<uint32, ControlInfoMap> entityControls) => ();\n+\n+\tmapBuffers(array<IPABuffer> buffers);\n+\tunmapBuffers(array<uint32> ids);\n+\n+\t[async] processEvent(IPU3Event ev);\n+};\n+\n+interface IPAIPU3EventInterface {\n+\tqueueFrameAction(uint32 frame, IPU3Action action);\n+};\ndiff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\nindex d701bccc..fe8aa65b 100644\n--- a/include/libcamera/ipa/meson.build\n+++ b/include/libcamera/ipa/meson.build\n@@ -55,6 +55,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n                   ])\n \n ipa_mojom_files = [\n+    'ipu3.mojom',\n     'raspberrypi.mojom',\n     'rkisp1.mojom',\n     'vimc.mojom',\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex d5bde223..fcd8889c 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -5,8 +5,6 @@\n  * ipu3.cpp - IPU3 Image Processing Algorithms\n  */\n \n-#include <libcamera/ipa/ipu3.h>\n-\n #include <stdint.h>\n #include <sys/mman.h>\n \n@@ -17,6 +15,7 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/ipa/ipa_interface.h>\n #include <libcamera/ipa/ipa_module_info.h>\n+#include <libcamera/ipa/ipu3_ipa_interface.h>\n #include <libcamera/request.h>\n \n #include \"libcamera/internal/buffer.h\"\n@@ -26,25 +25,21 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(IPAIPU3)\n \n-class IPAIPU3 : public IPAInterface\n+class IPAIPU3 : public ipa::ipu3::IPAIPU3Interface\n {\n public:\n \tint init([[maybe_unused]] const IPASettings &settings) override\n \t{\n \t\treturn 0;\n \t}\n-\tint start([[maybe_unused]] const IPAOperationData &data,\n-\t\t  [[maybe_unused]] IPAOperationData *result) override { return 0; }\n+\tint start() override { return 0; }\n \tvoid stop() override {}\n \n-\tvoid configure(const CameraSensorInfo &info,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *response) override;\n+\tvoid configure(const std::map<uint32_t, ControlInfoMap> &entityControls) override;\n+\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n-\tvoid processEvent(const IPAOperationData &event) override;\n+\tvoid processEvent(const ipa::ipu3::IPU3Event &event) override;\n \n private:\n \tvoid processControls(unsigned int frame, const ControlList &controls);\n@@ -67,11 +62,7 @@ private:\n \tuint32_t maxGain_;\n };\n \n-void IPAIPU3::configure([[maybe_unused]] const CameraSensorInfo &info,\n-\t\t\t[[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\tconst std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t[[maybe_unused]] const IPAOperationData &ipaConfig,\n-\t\t\t[[maybe_unused]] IPAOperationData *result)\n+void IPAIPU3::configure(const std::map<uint32_t, ControlInfoMap> &entityControls)\n {\n \tif (entityControls.empty())\n \t\treturn;\n@@ -121,19 +112,15 @@ void IPAIPU3::unmapBuffers(const std::vector<unsigned int> &ids)\n \t}\n }\n \n-void IPAIPU3::processEvent(const IPAOperationData &event)\n+void IPAIPU3::processEvent(const ipa::ipu3::IPU3Event &event)\n {\n-\tswitch (event.operation) {\n-\tcase IPU3_IPA_EVENT_PROCESS_CONTROLS: {\n-\t\tunsigned int frame = event.data[0];\n-\t\tprocessControls(frame, event.controls[0]);\n+\tswitch (event.op) {\n+\tcase ipa::ipu3::EventProcessControls: {\n+\t\tprocessControls(event.frame, event.controls);\n \t\tbreak;\n \t}\n-\tcase IPU3_IPA_EVENT_STAT_READY: {\n-\t\tunsigned int frame = event.data[0];\n-\t\tunsigned int bufferId = event.data[1];\n-\n-\t\tauto it = buffers_.find(bufferId);\n+\tcase ipa::ipu3::EventStatReady: {\n+\t\tauto it = buffers_.find(event.bufferId);\n \t\tif (it == buffers_.end()) {\n \t\t\tLOG(IPAIPU3, Error) << \"Could not find stats buffer!\";\n \t\t\treturn;\n@@ -143,14 +130,11 @@ void IPAIPU3::processEvent(const IPAOperationData &event)\n \t\tconst ipu3_uapi_stats_3a *stats =\n \t\t\treinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());\n \n-\t\tparseStatistics(frame, stats);\n+\t\tparseStatistics(event.frame, stats);\n \t\tbreak;\n \t}\n-\tcase IPU3_IPA_EVENT_FILL_PARAMS: {\n-\t\tunsigned int frame = event.data[0];\n-\t\tunsigned int bufferId = event.data[1];\n-\n-\t\tauto it = buffers_.find(bufferId);\n+\tcase ipa::ipu3::EventFillParams: {\n+\t\tauto it = buffers_.find(event.bufferId);\n \t\tif (it == buffers_.end()) {\n \t\t\tLOG(IPAIPU3, Error) << \"Could not find param buffer!\";\n \t\t\treturn;\n@@ -160,11 +144,11 @@ void IPAIPU3::processEvent(const IPAOperationData &event)\n \t\tipu3_uapi_params *params =\n \t\t\treinterpret_cast<ipu3_uapi_params *>(mem.data());\n \n-\t\tfillParams(frame, params);\n+\t\tfillParams(event.frame, params);\n \t\tbreak;\n \t}\n \tdefault:\n-\t\tLOG(IPAIPU3, Error) << \"Unknown event \" << event.operation;\n+\t\tLOG(IPAIPU3, Error) << \"Unknown event \" << event.op;\n \t\tbreak;\n \t}\n }\n@@ -182,8 +166,8 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n \n \t/* \\todo Fill in parameters buffer. */\n \n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_ACTION_PARAM_FILLED;\n+\tipa::ipu3::IPU3Action op;\n+\top.op = ipa::ipu3::ActionParamFilled;\n \n \tqueueFrameAction.emit(frame, op);\n \n@@ -199,22 +183,22 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n \t/* \\todo React to statistics and update internal state machine. */\n \t/* \\todo Add meta-data information to ctrls. */\n \n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_ACTION_METADATA_READY;\n-\top.controls.push_back(ctrls);\n+\tipa::ipu3::IPU3Action op;\n+\top.op = ipa::ipu3::ActionMetadataReady;\n+\top.controls = ctrls;\n \n \tqueueFrameAction.emit(frame, op);\n }\n \n void IPAIPU3::setControls(unsigned int frame)\n {\n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_ACTION_SET_SENSOR_CONTROLS;\n+\tipa::ipu3::IPU3Action op;\n+\top.op = ipa::ipu3::ActionSetSensorControls;\n \n \tControlList ctrls(ctrls_);\n \tctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_));\n \tctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));\n-\top.controls.push_back(ctrls);\n+\top.controls = ctrls;\n \n \tqueueFrameAction.emit(frame, op);\n }\n@@ -231,9 +215,9 @@ const struct IPAModuleInfo ipaModuleInfo = {\n \t\"ipu3\",\n };\n \n-struct ipa_context *ipaCreate()\n+IPAInterface *ipaCreate()\n {\n-\treturn new IPAInterfaceWrapper(std::make_unique<IPAIPU3>());\n+\treturn new IPAIPU3();\n }\n }\n \ndiff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\nindex d31594fc..a241f617 100644\n--- a/src/ipa/ipu3/meson.build\n+++ b/src/ipa/ipu3/meson.build\n@@ -3,10 +3,10 @@\n ipa_name = 'ipa_ipu3'\n \n mod = shared_module(ipa_name,\n-                    'ipu3.cpp',\n+                    ['ipu3.cpp', libcamera_generated_ipa_headers],\n                     name_prefix : '',\n                     include_directories : [ipa_includes, libipa_includes],\n-                    dependencies : [libatomic, libcamera_dep],\n+                    dependencies : libcamera_dep,\n                     link_with : libipa,\n                     install : true,\n                     install_dir : ipa_install_dir)\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 61f7bf43..3e6b88af 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -14,7 +14,8 @@\n #include <libcamera/camera.h>\n #include <libcamera/control_ids.h>\n #include <libcamera/formats.h>\n-#include <libcamera/ipa/ipu3.h>\n+#include <libcamera/ipa/ipu3_ipa_interface.h>\n+#include <libcamera/ipa/ipu3_ipa_proxy.h>\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n@@ -77,8 +78,11 @@ public:\n \tstd::unique_ptr<DelayedControls> delayedCtrls_;\n \tIPU3Frames frameInfos_;\n \n+\tstd::unique_ptr<ipa::ipu3::IPAProxyIPU3> ipa_;\n+\n private:\n-\tvoid queueFrameAction(unsigned int id, const IPAOperationData &op);\n+\tvoid queueFrameAction(unsigned int id,\n+\t\t\t      const ipa::ipu3::IPU3Action &action);\n };\n \n class IPU3CameraConfiguration : public CameraConfiguration\n@@ -609,18 +613,12 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera)\n \n \tfor (const std::unique_ptr<FrameBuffer> &buffer : imgu->paramBuffers_) {\n \t\tbuffer->setCookie(ipaBufferId++);\n-\t\tipaBuffers_.push_back({\n-\t\t\t.id = buffer->cookie(),\n-\t\t\t.planes = buffer->planes()\n-\t\t});\n+\t\tipaBuffers_.emplace_back(buffer->cookie(), buffer->planes());\n \t}\n \n \tfor (const std::unique_ptr<FrameBuffer> &buffer : imgu->statBuffers_) {\n \t\tbuffer->setCookie(ipaBufferId++);\n-\t\tipaBuffers_.push_back({\n-\t\t\t.id = buffer->cookie(),\n-\t\t\t.planes = buffer->planes()\n-\t\t});\n+\t\tipaBuffers_.emplace_back(buffer->cookie(), buffer->planes());\n \t}\n \n \tdata->ipa_->mapBuffers(ipaBuffers_);\n@@ -650,16 +648,10 @@ int PipelineHandlerIPU3::freeBuffers(Camera *camera)\n \n int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] ControlList *controls)\n {\n+\tstd::map<uint32_t, ControlInfoMap> entityControls;\n \tIPU3CameraData *data = cameraData(camera);\n \tCIO2Device *cio2 = &data->cio2_;\n \tImgUDevice *imgu = data->imgu_;\n-\n-\tCameraSensorInfo sensorInfo = {};\n-\tstd::map<unsigned int, IPAStream> streamConfig;\n-\tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n-\tIPAOperationData ipaConfig;\n-\tIPAOperationData result = {};\n-\n \tint ret;\n \n \t/* Allocate buffers for internal pipeline usage. */\n@@ -667,8 +659,7 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] ControlList *con\n \tif (ret)\n \t\treturn ret;\n \n-\tIPAOperationData ipaData = {};\n-\tret = data->ipa_->start(ipaData, nullptr);\n+\tret = data->ipa_->start();\n \tif (ret)\n \t\tgoto error;\n \n@@ -684,24 +675,8 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] ControlList *con\n \tif (ret)\n \t\tgoto error;\n \n-\t/* Inform IPA of stream configuration and sensor controls. */\n-\tret = data->cio2_.sensor()->sensorInfo(&sensorInfo);\n-\tif (ret)\n-\t\tgoto error;\n-\n-\tstreamConfig[0] = {\n-\t\t.pixelFormat = data->outStream_.configuration().pixelFormat,\n-\t\t.size = data->outStream_.configuration().size,\n-\t};\n-\tstreamConfig[1] = {\n-\t\t.pixelFormat = data->vfStream_.configuration().pixelFormat,\n-\t\t.size = data->vfStream_.configuration().size,\n-\t};\n-\n \tentityControls.emplace(0, data->cio2_.sensor()->controls());\n-\n-\tdata->ipa_->configure(sensorInfo, streamConfig, entityControls,\n-\t\t\t      ipaConfig, &result);\n+\tdata->ipa_->configure(entityControls);\n \n \treturn 0;\n \n@@ -751,11 +726,11 @@ int PipelineHandlerIPU3::queueRequestDevice(Camera *camera, Request *request)\n \n \tinfo->rawBuffer = rawBuffer;\n \n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_EVENT_PROCESS_CONTROLS;\n-\top.data = { info->id };\n-\top.controls = { request->controls() };\n-\tdata->ipa_->processEvent(op);\n+\tipa::ipu3::IPU3Event ev;\n+\tev.op = ipa::ipu3::EventProcessControls;\n+\tev.frame = info->id;\n+\tev.controls = request->controls();\n+\tdata->ipa_->processEvent(ev);\n \n \treturn 0;\n }\n@@ -1048,7 +1023,7 @@ int PipelineHandlerIPU3::registerCameras()\n \n int IPU3CameraData::loadIPA()\n {\n-\tipa_ = IPAManager::createIPA(pipe_, 1, 1);\n+\tipa_ = IPAManager::createIPA<ipa::ipu3::IPAProxyIPU3>(pipe_, 1, 1);\n \tif (!ipa_)\n \t\treturn -ENOENT;\n \n@@ -1060,15 +1035,15 @@ int IPU3CameraData::loadIPA()\n }\n \n void IPU3CameraData::queueFrameAction(unsigned int id,\n-\t\t\t\t      const IPAOperationData &action)\n+\t\t\t\t      const ipa::ipu3::IPU3Action &action)\n {\n-\tswitch (action.operation) {\n-\tcase IPU3_IPA_ACTION_SET_SENSOR_CONTROLS: {\n-\t\tconst ControlList &controls = action.controls[0];\n+\tswitch (action.op) {\n+\tcase ipa::ipu3::ActionSetSensorControls: {\n+\t\tconst ControlList &controls = action.controls;\n \t\tdelayedCtrls_->push(controls);\n \t\tbreak;\n \t}\n-\tcase IPU3_IPA_ACTION_PARAM_FILLED: {\n+\tcase ipa::ipu3::ActionParamFilled: {\n \t\tIPU3Frames::Info *info = frameInfos_.find(id);\n \t\tif (!info)\n \t\t\tbreak;\n@@ -1090,13 +1065,13 @@ void IPU3CameraData::queueFrameAction(unsigned int id,\n \n \t\tbreak;\n \t}\n-\tcase IPU3_IPA_ACTION_METADATA_READY: {\n+\tcase ipa::ipu3::ActionMetadataReady: {\n \t\tIPU3Frames::Info *info = frameInfos_.find(id);\n \t\tif (!info)\n \t\t\tbreak;\n \n \t\tRequest *request = info->request;\n-\t\trequest->metadata() = action.controls[0];\n+\t\trequest->metadata() = action.controls;\n \t\tinfo->metadataProcessed = true;\n \t\tif (frameInfos_.tryComplete(info))\n \t\t\tpipe_->completeRequest(request);\n@@ -1104,7 +1079,7 @@ void IPU3CameraData::queueFrameAction(unsigned int id,\n \t\tbreak;\n \t}\n \tdefault:\n-\t\tLOG(IPU3, Error) << \"Unknown action \" << action.operation;\n+\t\tLOG(IPU3, Error) << \"Unknown action \" << action.op;\n \t\tbreak;\n \t}\n }\n@@ -1172,10 +1147,11 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \tif (request->findBuffer(&rawStream_))\n \t\tpipe_->completeBuffer(request, buffer);\n \n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_EVENT_FILL_PARAMS;\n-\top.data = { info->id, info->paramBuffer->cookie() };\n-\tipa_->processEvent(op);\n+\tipa::ipu3::IPU3Event ev;\n+\tev.op = ipa::ipu3::EventFillParams;\n+\tev.frame = info->id;\n+\tev.bufferId = info->paramBuffer->cookie();\n+\tipa_->processEvent(ev);\n }\n \n void IPU3CameraData::paramBufferReady(FrameBuffer *buffer)\n@@ -1202,10 +1178,11 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)\n \t\treturn;\n \t}\n \n-\tIPAOperationData op;\n-\top.operation = IPU3_IPA_EVENT_STAT_READY;\n-\top.data = { info->id, info->statBuffer->cookie() };\n-\tipa_->processEvent(op);\n+\tipa::ipu3::IPU3Event ev;\n+\tev.op = ipa::ipu3::EventStatReady;\n+\tev.frame = info->id;\n+\tev.bufferId = info->statBuffer->cookie();\n+\tipa_->processEvent(ev);\n }\n \n REGISTER_PIPELINE_HANDLER(PipelineHandlerIPU3)\n",
    "prefixes": [
        "libcamera-devel",
        "v8",
        "12/12"
    ]
}