[libcamera-devel] [PATCH 2/2] utils: ipc: proxy: Always reset ControlSerializer during IPA configure

Umang Jain umang.jain at ideasonboard.com
Thu Jul 8 10:21:45 CEST 2021


ControlSerializer should be reset during IPA (re)configuration,
so that it doesn't look up stale deserialized cache built from
consecutive previous runs. This is already recommended in
ControlSerializer docs but the implementation seems missing.

The stale cache lookup seems to the core issue with Bug #58.

Bug: https://bugs.libcamera.org/show_bug.cgi?id=58
Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
 .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
index 5a64fe9c..3d27067a 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
@@ -125,6 +125,10 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)
 {% for method in interface_main.methods %}
 {{proxy_funcs.func_sig(proxy_name, method)}}
 {
+{%- if method.mojom_name == "configure" %}
+	controlSerializer_.reset();
+{%- endif %}
+
 	if (isolate_)
 		{{"return " if method|method_return_value != "void"}}{{method.mojom_name}}IPC(
 {%- for param in method|method_param_names -%}
-- 
2.31.1



More information about the libcamera-devel mailing list