libcamera/test
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
..
camera libcamera: Use simpler Signal::disconnect() function 2021-09-02 01:16:44 +03:00
controls controls: Add boolean constructors for ControlInfo 2021-08-02 18:07:16 +09:00
gstreamer test: gstreamer: Add a test for gstreamer multi stream 2021-09-24 18:01:15 +09:00
ipa libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
ipc libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
libtest libcamera: v4l2_videodevice: Drop toV4L2PixelFormat() 2021-09-07 19:17:46 +03:00
log libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
media_device libcamera: Rename 'method' to 'function' 2021-08-09 15:40:32 +03:00
pipeline libcamera/base: Validate internal headers as private 2021-06-25 16:11:11 +01:00
process libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
serialization libcamera: control_serializer: Separate the handles space 2021-09-27 14:39:15 +02:00
stream libcamera: rename public libcamera dependency 2021-06-25 16:11:11 +01:00
v4l2_compat test: v4l2_compat: Skip vimc as a test candidate 2021-09-23 16:04:57 +09:00
v4l2_subdevice libcamera: buffer: Rename buffer.h to framebuffer.h 2021-07-11 17:42:02 +03:00
v4l2_videodevice libcamera: buffer: Rename buffer.h to framebuffer.h 2021-07-11 17:42:02 +03:00
bayer-format.cpp test: bayer-format: Rectify internal header's #include path 2021-05-05 10:32:33 +02:00
byte-stream-buffer.cpp test: byte-stream-buffer: Initialize data array 2021-05-26 10:24:15 +02:00
camera-sensor.cpp libcamera: camera_sensor: Transform CameraSensor::sizes() 2021-08-31 12:26:54 +05:30
delayed_controls.cpp test: delayed_controls: Rename delayed_contols.cpp to delayed_controls.cpp 2021-03-12 14:20:51 +00:00
event-dispatcher.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
event-thread.cpp libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
event.cpp libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
file-descriptor.cpp libcamera/base: Move utils to the base library 2021-06-25 16:11:02 +01:00
file.cpp libcamera: file: Turn MapFlag and OpenModeFlag into enum class 2021-08-03 10:55:33 +03:00
flags.cpp test: Add tests for the Flags class 2021-08-03 10:55:21 +03:00
geometry.cpp test: geometry: Add unit tests for new geometry helper functions 2020-10-27 14:06:51 +02:00
hotplug-cameras.cpp libcamera/base: Move File to base library 2021-06-25 16:11:10 +01:00
mapped-buffer.cpp libcamera: MappedFrameBuffer: Use typed Flags<MapModes> 2021-08-10 10:57:04 +01:00
meson.build test: gstreamer: Add test for gstreamer single stream 2021-08-14 22:58:46 +03:00
message.cpp test: message: Test recursive Thread::dispatchMessages() calls 2021-07-11 17:41:59 +03:00
object-delete.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
object-invoke.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
object.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
pixel-format.cpp libcamera/base: Move utils to the base library 2021-06-25 16:11:02 +01:00
public-api.cpp test: Ensure LIBCAMERA_BASE_PRIVATE isn't public 2021-06-25 16:11:11 +01:00
signal-threads.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
signal.cpp libcamera: base: signal: Support connecting signals to functors 2021-09-02 01:16:45 +03:00
span.cpp libcamera/base: Move span to base library 2021-06-25 16:11:11 +01:00
threads.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
timer-thread.cpp libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
timer.cpp libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
utils.cpp libcamera: base: utils: Use size_t for index in utils::enumerate() 2021-09-07 19:17:37 +03:00