libcamera/utils/ipc/generators/libcamera_templates
Jacopo Mondi 7fde7c7aeb ipa: proxy_worker: Reset ControlSerializer on worker
When running the IPA in isolated mode, each side of the IPC boundary
has an instance of the ControlSerializer class which is used to
serializer/deserialize controls before transmitting them on the wire.

The IPAProxyWorker, which creates and manages the process the IPA runs in,
does not reset its ControlSerializer upon an IPA::configure() call, while
the IPAProxy does, effectively creating a misalignment between the
two sides of the fence.

This obviously creates issues as one side of the IPC runs with a
populated and possibly stale cache of ControlInfoMap references, while the
other side gets reset every time a new configuration is applied to the
Camera.

Fix that by resetting the IPAProxyWorker ControlSerializer on an
IPA configure() call.

This change fixes an issue which is easily triggered by running two
consecutive capture sessions with the IPA running in isolated mode:
ERROR Serializer control_serializer.cpp:520 Can't deserialize ControlList: unknown ControlInfoMap

Fixes: 7832e19a59 ("utils: ipc: add templates for code generation for IPC mechanism")
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-09-27 14:35:51 +02:00
..
core_ipa_interface.h.tmpl utils: ipc: add templates for code generation for IPC mechanism 2021-02-16 19:21:00 +09:00
core_ipa_serializer.h.tmpl utils: ipc: add templates for code generation for IPC mechanism 2021-02-16 19:21:00 +09:00
definition_functions.tmpl ipa: Move core IPA interface documentation to a .cpp file 2021-05-24 14:13:01 +03:00
meson.build utils: ipc: add templates for code generation for IPC mechanism 2021-02-16 19:21:00 +09:00
module_ipa_interface.h.tmpl utils: ipc: add templates for code generation for IPC mechanism 2021-02-16 19:21:00 +09:00
module_ipa_proxy.cpp.tmpl ipa: Use FileDescriptor instead of int in layers above IPC payload 2021-08-19 16:54:02 +09:00
module_ipa_proxy.h.tmpl ipa: Use FileDescriptor instead of int in layers above IPC payload 2021-08-19 16:54:02 +09:00
module_ipa_proxy_worker.cpp.tmpl ipa: proxy_worker: Reset ControlSerializer on worker 2021-09-27 14:35:51 +02:00
module_ipa_serializer.h.tmpl utils: ipc: Use the proper namespace for mojom structs 2021-04-27 17:34:58 +09:00
proxy_functions.tmpl ipa: Use FileDescriptor instead of int in layers above IPC payload 2021-08-19 16:54:02 +09:00
serializer.tmpl ipa: Use FileDescriptor instead of int in layers above IPC payload 2021-08-19 16:54:02 +09:00