[libcamera-devel] [PATCH v8 00/12] IPA isolation: Part 2: Conversion and plumbing

Paul Elder paul.elder at ideasonboard.com
Sat Feb 13 05:22:13 CET 2021


v8 is split in three parts, core components, conversion + plumbing, and
tests + documentation.

This is part 2, and implements the plumbing for IPA isolation.

Patches 4/12 to 11/12 must be squashed together to avoid bisection
breakage.

Patch 8/12 may be of interest, as it shows how one would write the
interface and data definition. In v2 I have customized the raspberrypi
mojom file to take advantage of the freedom in definition the IPA
interface and data structures (as opposed to v1, where it was
practically a direct translation of IPAOperationData). In v3 I have
added namespace support to the data definition, and this is reflected in
its usage. In v6 I added support for custom start(), and used it. Also
in v6, support for consts was added, so I moved all the enum and const
definitions to the mojom file.

As of v6, namespacing in the mojom files is required, in the form of
/^ipa\.[0-9A-Za-z]+/ and this is reflected in the three mojom files in
this series.

Patch 9/11 is also noteworthy, as it shows how one would use the
interface that has been defined. Since the headers and proxies are
autogenerated, there isn't a patch where the generated code can be seen,
however.

Patches 10/12 to 12/12 also define mojom files and use them, but are
for vimc, rkisp1, and ipu3, respectively. These will also give an idea
on how the mojom definition looks and how it will be used.


Changes in v8:
- copy controls in raspberrypi start() instead of std::move()
- rebase on "libcamera: pipeline: rkisp1: configure IPA from configure
  method instead of start method"
- replace push_back with emplace_back in ipu3

Changes in v7:
- clean up raspberrypi IPA interface while rebasing
- add ipu3 support for the new IPC (from Niklas)

Changes in v6:
- move definitions of libcamera structs to core.mojom (in Part 1)
- move enums and consts from the ipa header to the mojom file
  - remove vimc.h, use the ipa::vimc namespace, and use the new start()
  - same for rkisp1.h
- remove postfix _ in generated struct fields
- use the required ipa namespace
- fill the LS table handle in the raspberry pi pipeline handler, instead
  of passing it from the IPA
- remove per-pipeline ContrlInfoMap from the ipa header
  - remove the ControlInfoMap initializer from raspberrypi header


Niklas Söderlund (1):
  libcamera: pipeline, ipa: ipu3: Support the new IPC mechanism

Paul Elder (11):
  meson: ipa, proxy: Generate headers and proxy with mojo
  tests: Remove IPA wrappers test
  ipa: raspberrypi: meson: Add dependency on generated headers
  libcamera: IPAInterface: Replace C API with the new C++-only API
  libcamera: IPAProxy: Remove stop() override
  libcamera: IPAProxy, IPAManager: Switch to one-proxy-per-pipeline
    scheme
  libcamera: PipelineHandler: Remove IPA from base class
  ipa: raspberrypi: Add mojom data definition file
  libcamera: pipeline, ipa: raspberrypi: Use new data definition
  libcamera: pipeline, ipa: vimc: Support the new IPC mechanism
  libcamera: pipeline, ipa: rkisp1: Support the new IPC mechanism

 Documentation/Doxyfile.in                     |   1 -
 .../libcamera/internal/ipa_context_wrapper.h  |  53 --
 include/libcamera/internal/ipa_manager.h      |  31 +-
 include/libcamera/internal/ipa_module.h       |   4 +-
 include/libcamera/internal/ipa_proxy.h        |  31 -
 include/libcamera/internal/meson.build        |   1 -
 include/libcamera/internal/pipeline_handler.h |   1 -
 include/libcamera/ipa/ipa_interface.h         | 147 +---
 include/libcamera/ipa/ipu3.h                  |  23 -
 include/libcamera/ipa/ipu3.mojom              |  43 ++
 include/libcamera/ipa/meson.build             | 125 ++++
 include/libcamera/ipa/raspberrypi.h           |  31 -
 include/libcamera/ipa/raspberrypi.mojom       | 131 ++++
 include/libcamera/ipa/rkisp1.h                |  22 -
 include/libcamera/ipa/rkisp1.mojom            |  44 ++
 include/libcamera/ipa/vimc.h                  |  28 -
 include/libcamera/ipa/vimc.mojom              |  24 +
 src/ipa/ipu3/ipu3.cpp                         |  74 +-
 src/ipa/ipu3/meson.build                      |   6 +-
 src/ipa/libipa/ipa_interface_wrapper.cpp      | 287 --------
 src/ipa/libipa/ipa_interface_wrapper.h        |  61 --
 src/ipa/libipa/meson.build                    |   2 -
 src/ipa/raspberrypi/meson.build               |   2 +-
 src/ipa/raspberrypi/raspberrypi.cpp           | 180 ++---
 src/ipa/rkisp1/meson.build                    |   2 +-
 src/ipa/rkisp1/rkisp1.cpp                     |  63 +-
 src/ipa/vimc/meson.build                      |   2 +-
 src/ipa/vimc/vimc.cpp                         |  39 +-
 src/libcamera/ipa_context_wrapper.cpp         | 298 --------
 src/libcamera/ipa_interface.cpp               | 650 +-----------------
 src/libcamera/ipa_manager.cpp                 |  47 +-
 src/libcamera/ipa_module.cpp                  |  18 +-
 src/libcamera/ipa_proxy.cpp                   | 101 ---
 src/libcamera/meson.build                     |   2 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  95 +--
 .../pipeline/raspberrypi/raspberrypi.cpp      | 257 ++++---
 .../pipeline/raspberrypi/rpi_stream.cpp       |   6 +-
 .../pipeline/raspberrypi/rpi_stream.h         |   5 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  79 ++-
 src/libcamera/pipeline/vimc/vimc.cpp          |  10 +-
 src/libcamera/pipeline_handler.cpp            |   8 -
 src/libcamera/proxy/ipa_proxy_linux.cpp       | 104 ---
 src/libcamera/proxy/ipa_proxy_thread.cpp      | 175 -----
 src/libcamera/proxy/meson.build               |  21 +-
 .../proxy/worker/ipa_proxy_linux_worker.cpp   |  90 ---
 src/libcamera/proxy/worker/meson.build        |  23 +-
 test/ipa/ipa_interface_test.cpp               |  44 +-
 test/ipa/ipa_wrappers_test.cpp                | 455 ------------
 test/ipa/meson.build                          |   3 +-
 utils/ipc/generators/meson.build              |   3 +
 utils/ipc/meson.build                         |  13 +
 51 files changed, 883 insertions(+), 3082 deletions(-)
 delete mode 100644 include/libcamera/internal/ipa_context_wrapper.h
 delete mode 100644 include/libcamera/ipa/ipu3.h
 create mode 100644 include/libcamera/ipa/ipu3.mojom
 create mode 100644 include/libcamera/ipa/raspberrypi.mojom
 delete mode 100644 include/libcamera/ipa/rkisp1.h
 create mode 100644 include/libcamera/ipa/rkisp1.mojom
 delete mode 100644 include/libcamera/ipa/vimc.h
 create mode 100644 include/libcamera/ipa/vimc.mojom
 delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.cpp
 delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.h
 delete mode 100644 src/libcamera/ipa_context_wrapper.cpp
 delete mode 100644 src/libcamera/proxy/ipa_proxy_linux.cpp
 delete mode 100644 src/libcamera/proxy/ipa_proxy_thread.cpp
 delete mode 100644 src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
 delete mode 100644 test/ipa/ipa_wrappers_test.cpp
 create mode 100644 utils/ipc/generators/meson.build

-- 
2.27.0





Niklas Söderlund (1):
  libcamera: pipeline, ipa: ipu3: Support the new IPC mechanism

Paul Elder (11):
  meson: ipa, proxy: Generate headers and proxy with mojo
  tests: Remove IPA wrappers test
  ipa: raspberrypi: meson: Add dependency on generated headers
  libcamera: IPAInterface: Replace C API with the new C++-only API
  libcamera: IPAProxy: Remove stop() override
  libcamera: IPAProxy, IPAManager: Switch to one-proxy-per-pipeline
    scheme
  libcamera: PipelineHandler: Remove IPA from base class
  ipa: raspberrypi: Add mojom data definition file
  libcamera: pipeline, ipa: raspberrypi: Use new data definition
  libcamera: pipeline, ipa: vimc: Support the new IPC mechanism
  libcamera: pipeline, ipa: rkisp1: Support the new IPC mechanism

 Documentation/Doxyfile.in                     |   1 -
 .../libcamera/internal/ipa_context_wrapper.h  |  53 --
 include/libcamera/internal/ipa_manager.h      |  31 +-
 include/libcamera/internal/ipa_module.h       |   4 +-
 include/libcamera/internal/ipa_proxy.h        |  31 -
 include/libcamera/internal/meson.build        |   1 -
 include/libcamera/internal/pipeline_handler.h |   1 -
 include/libcamera/ipa/ipa_interface.h         | 147 +---
 include/libcamera/ipa/ipu3.h                  |  23 -
 include/libcamera/ipa/ipu3.mojom              |  43 ++
 include/libcamera/ipa/meson.build             | 125 ++++
 include/libcamera/ipa/raspberrypi.h           |  31 -
 include/libcamera/ipa/raspberrypi.mojom       | 131 ++++
 include/libcamera/ipa/rkisp1.h                |  22 -
 include/libcamera/ipa/rkisp1.mojom            |  44 ++
 include/libcamera/ipa/vimc.h                  |  28 -
 include/libcamera/ipa/vimc.mojom              |  24 +
 src/ipa/ipu3/ipu3.cpp                         |  74 +-
 src/ipa/ipu3/meson.build                      |   4 +-
 src/ipa/libipa/ipa_interface_wrapper.cpp      | 287 --------
 src/ipa/libipa/ipa_interface_wrapper.h        |  61 --
 src/ipa/libipa/meson.build                    |   2 -
 src/ipa/raspberrypi/meson.build               |   2 +-
 src/ipa/raspberrypi/raspberrypi.cpp           | 180 ++---
 src/ipa/rkisp1/meson.build                    |   2 +-
 src/ipa/rkisp1/rkisp1.cpp                     |  63 +-
 src/ipa/vimc/meson.build                      |   2 +-
 src/ipa/vimc/vimc.cpp                         |  39 +-
 src/libcamera/ipa_context_wrapper.cpp         | 298 --------
 src/libcamera/ipa_interface.cpp               | 643 ++----------------
 src/libcamera/ipa_manager.cpp                 |  47 +-
 src/libcamera/ipa_module.cpp                  |  18 +-
 src/libcamera/ipa_proxy.cpp                   | 101 ---
 src/libcamera/meson.build                     |   2 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  93 +--
 .../pipeline/raspberrypi/raspberrypi.cpp      | 257 ++++---
 .../pipeline/raspberrypi/rpi_stream.cpp       |   6 +-
 .../pipeline/raspberrypi/rpi_stream.h         |   5 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  74 +-
 src/libcamera/pipeline/vimc/vimc.cpp          |  10 +-
 src/libcamera/pipeline_handler.cpp            |   8 -
 src/libcamera/proxy/ipa_proxy_linux.cpp       | 104 ---
 src/libcamera/proxy/ipa_proxy_thread.cpp      | 175 -----
 src/libcamera/proxy/meson.build               |  21 +-
 .../proxy/worker/ipa_proxy_linux_worker.cpp   |  90 ---
 src/libcamera/proxy/worker/meson.build        |  23 +-
 test/ipa/ipa_interface_test.cpp               |  44 +-
 test/ipa/ipa_wrappers_test.cpp                | 455 -------------
 test/ipa/meson.build                          |   3 +-
 utils/ipc/generators/meson.build              |   3 +
 utils/ipc/meson.build                         |  13 +
 51 files changed, 885 insertions(+), 3064 deletions(-)
 delete mode 100644 include/libcamera/internal/ipa_context_wrapper.h
 delete mode 100644 include/libcamera/ipa/ipu3.h
 create mode 100644 include/libcamera/ipa/ipu3.mojom
 create mode 100644 include/libcamera/ipa/raspberrypi.mojom
 delete mode 100644 include/libcamera/ipa/rkisp1.h
 create mode 100644 include/libcamera/ipa/rkisp1.mojom
 delete mode 100644 include/libcamera/ipa/vimc.h
 create mode 100644 include/libcamera/ipa/vimc.mojom
 delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.cpp
 delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.h
 delete mode 100644 src/libcamera/ipa_context_wrapper.cpp
 delete mode 100644 src/libcamera/proxy/ipa_proxy_linux.cpp
 delete mode 100644 src/libcamera/proxy/ipa_proxy_thread.cpp
 delete mode 100644 src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
 delete mode 100644 test/ipa/ipa_wrappers_test.cpp
 create mode 100644 utils/ipc/generators/meson.build

-- 
2.27.0



More information about the libcamera-devel mailing list