summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2021-07-08 13:16:33 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2021-07-09 22:56:27 +0530
commit89219aea936b23cabb03204e80dcf958f3474e32 (patch)
tree091079695915c7364a92e593faa734889739d56a /utils
parentfb970d9cde339b89971465b854945798c27db7bf (diff)
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 <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl3
1 files changed, 3 insertions, 0 deletions
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<uint32_t>({{cmd}}), seq_++ };