From 89219aea936b23cabb03204e80dcf958f3474e32 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Thu, 8 Jul 2021 13:16:33 +0530 Subject: utils: ipc: proxy: Reset ControlSerializer during IPA configure 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 Reviewed-by: Paul Elder Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham --- utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils/ipc') 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..a4e008c7 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl @@ -184,6 +184,9 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data) {{proxy_funcs.func_sig(proxy_name, method, "IPC")}} { +{%- if method.mojom_name == "configure" %} + controlSerializer_.reset(); +{%- endif %} {%- set has_output = true if method|method_param_outputs|length > 0 or method|method_return_value != "void" %} {%- set cmd = cmd_enum_name + "::" + method.mojom_name|cap %} IPCMessage::Header _header = { static_cast({{cmd}}), seq_++ }; -- cgit v1.2.1