[{"id":15121,"web_url":"https://patchwork.libcamera.org/comment/15121/","msgid":"<YCXpuKSvrKNDWwYy@pendragon.ideasonboard.com>","date":"2021-02-12T02:36:40","subject":"Re: [libcamera-devel] [PATCH v7 12/12] libcamera: pipeline,\n\tipa: ipu3: Support the new IPC mechanism","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul and Niklas,\n\n(and CC'ing Niklas and Kieran)\n\nThank you for the patch.\n\nOn Thu, Feb 11, 2021 at 04:18:46PM +0900, Paul Elder wrote:\n> From: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> Add support to ipu3 pipeline handler and IPA for the new IPC mechanism.\n> \n> [Original version]\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> [Fixed commit message and small changes]\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> New 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             |  6 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 95 +++++++++++-----------------\n>  6 files changed, 112 insertions(+), 128 deletions(-)\n>  delete mode 100644 include/libcamera/ipa/ipu3.h\n>  create mode 100644 include/libcamera/ipa/ipu3.mojom\n> \n> diff --git a/include/libcamera/ipa/ipu3.h b/include/libcamera/ipa/ipu3.h\n> deleted file mode 100644\n> index 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__ */\n> diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom\n> new file mode 100644\n> index 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> +};\n\nThis looks fine, but should eventually receive the same kind of brush up\nas the RPi IPA protocol. It's fine to do so later, but the conversion\nshould happen either before implementing the IPU3 IPA, or as it gets\nimplemented. We shouldn't start using (and especially extending) the old\nAPI.\n\n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 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',\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 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>  \n> diff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\n> index 444c8245..1ced00ae 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> +                    include_directories : [ipa_includes, libipa_includes],\n> +                    dependencies : libcamera_dep,\n>                      link_with : libipa,\n>                      install : true,\n>                      install_dir : ipa_install_dir)\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 9bc3df33..5c010d05 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,14 @@ 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_.push_back(IPABuffer(buffer->cookie(),\n> +\t\t\t\t\t\tbuffer->planes()));\n\n\t\tipaBuffers_.emplace_back(buffer->cookie(), buffer->planes());\n\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_.push_back(IPABuffer(buffer->cookie(),\n> +\t\t\t\t\t\tbuffer->planes()));\n\nSame here.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \t}\n>  \n>  \tdata->ipa_->mapBuffers(ipaBuffers_);\n> @@ -650,16 +650,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 +661,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 +677,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 +728,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 +1025,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 +1037,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 +1067,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 +1081,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 +1149,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 +1180,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)","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 94364BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Feb 2021 02:37:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 298B763759;\n\tFri, 12 Feb 2021 03:37:08 +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 4C19F602FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Feb 2021 03:37:06 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9E9158B5;\n\tFri, 12 Feb 2021 03:37: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=\"U2zPYfQc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613097425;\n\tbh=Esj03Im3tGQEpbWhhFcQI9dE90fHbPvVxERvTk+bx+o=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=U2zPYfQc0jg53sy28KxYggTY1lkIs2dRqBKhrD70yQBWVW+uC3cs0mbB6CPZNDV7d\n\tsqDJT88Vd/1Aq9EYheDSHd5lOLOcjXQHSmfUUD9ChGysKN/iZOzmiXTJLfiKXUlff6\n\tD4pPcTfKYg87Eyjk40Q7Gtlll73ofBX+xYpr3G5k=","Date":"Fri, 12 Feb 2021 04:36:40 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>, Niklas =?utf-8?q?S=C3=B6derl?=\n\t=?utf-8?q?und?= <niklas.soderlund@ragnatech.se>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>","Message-ID":"<YCXpuKSvrKNDWwYy@pendragon.ideasonboard.com>","References":"<20210211071846.35161-1-paul.elder@ideasonboard.com>\n\t<20210211071846.35161-13-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210211071846.35161-13-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v7 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>","Cc":"libcamera-devel@lists.libcamera.org","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>"}}]