From patchwork Thu Jul 8 10:54:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 12870 X-Patchwork-Delegate: umang.jain@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 336D6BD794 for ; Thu, 8 Jul 2021 10:54:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD07468513; Thu, 8 Jul 2021 12:54:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qVulVQLa"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C40A768506 for ; Thu, 8 Jul 2021 12:54:20 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.59]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C057E7; Thu, 8 Jul 2021 12:54:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625741660; bh=CGeM7/+uBDXxD8q/Zpe+G7EZ0S4eHT2scLwNdgVm5Bo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qVulVQLacVDOkKFXzLVKNFBA4XgywjAVcS5UHOF86Dw2qI77L5Tnjt3+ODLirYZ8K ahbI28I7SoD5LsyvMBFpiWBNHCQ+2ew9jeGwkpia5dNEcEMRQLINNf7zfadXmiTQYi AFdoszQes+aHMeAKoTO31OP18+DVI8Su5sKkl4cw= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Jul 2021 16:24:05 +0530 Message-Id: <20210708105405.147172-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210708105405.147172-1-umang.jain@ideasonboard.com> References: <20210708105405.147172-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] utils: ipc: proxy: Reset ControlSerializer during IPA configure X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 3 +++ 1 file changed, 3 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..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_++ };