libcamera/utils/ipc
Jacopo Mondi 11e9d19288 libcamera: control_serializer: Separate the handles space
Two independent instances of the ControlSerializer class are in use at
the IPC boundaries, one in the Proxy class that serializes data from the
pipeline handler to the IPA, and one in the ProxyWorker which serializes
data in the opposite direction.

Each instance operates autonomously, without any centralized point of
control, and each one assigns a numerical handle to each ControlInfoMap
it serializes. This creates a risk of potential collision on the handle
values, as both instances will use the same numerical space and
are not aware of what handles has been already used by the instance "on
the other side".

To fix that, partition the handles numerical space by initializing the
control serializer with a seed according to the role of the component
that creates the serializer and increment the handle number by 2, to
avoid any collision risk.

While this is temporary and rather hacky solution, it solves an issue
with isolated IPA modules without too much complexity added.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-09-27 14:39:15 +02:00
..
generators libcamera: control_serializer: Separate the handles space 2021-09-27 14:39:15 +02:00
mojo utils: ipc: Update mojo 2021-05-26 13:03:27 +09:00
tools utils: ipc: Update mojo 2021-05-26 13:03:27 +09:00
extract-docs.py utils: ipc: extract-docs: Extract the SPDX header 2021-05-31 13:20:19 +09:00
generate.py utils: ipc: add generator script 2021-02-16 19:21:07 +09:00
meson.build utils: ipc: Add script to extract doxygen docs from mojom files 2021-05-27 17:07:04 +09:00
parser.py utils: ipc: add parser script 2021-02-16 19:21:11 +09:00