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>
This commit is contained in:
Umang Jain 2021-07-08 13:16:33 +05:30
parent fb970d9cde
commit 89219aea93

View file

@ -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_++ };