libcamera/utils
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
..
hooks utils: hooks: pre-push: Reject commits with a Change-Id 2020-11-02 01:03:31 +02:00
ipc libcamera: control_serializer: Separate the handles space 2021-09-27 14:39:15 +02:00
ipu3 licenses: License all meson files under CC0-1.0 2020-05-13 16:46:24 +03:00
raspberrypi utils: raspberrypi: ctt: Fix namespace for sklearn NearestCentroid function 2021-08-03 10:54:26 +03:00
rkisp1 utils: rkisp1: Don't enable immutable link 2020-03-20 01:44:57 +01:00
tracepoints utils: tracepoints: Add simple statistics script 2020-11-03 11:33:41 +09:00
checkstyle.py utils: checkstyle.py: Use single-quoted strings when possible 2021-08-27 19:26:03 +03:00
gen-controls.py utils: gen-controls: Fix enumerators documentation 2020-12-27 12:28:00 +02:00
gen-formats.py utils: gen-formats: Support big-endian DRM formats 2021-02-01 22:33:55 +02:00
gen-header.sh libcamera: Move Header generation utilities to utils 2020-09-24 10:55:49 +01:00
gen-ipa-priv-key.sh libcamera: ipa: Move key generation to utils 2020-09-24 10:56:22 +01:00
gen-ipa-pub-key.py libcamera: ipa: Move key generation to utils 2020-09-24 10:56:22 +01:00
gen-version.sh libcamera: Add build time to version string for dirty builds 2020-08-06 16:20:15 +02:00
meson.build README, meson: Add dependency on ply and jinja2 for IPA interface generation 2020-11-11 19:23:16 +09:00
update-kernel-headers.sh utils: Add kernel headers update script 2021-03-08 16:54:29 +02:00
update-mojo.sh utils: update-mojo.sh: Add script for updating mojo 2021-05-26 13:03:12 +09:00