From patchwork Thu Jul 8 08:21:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 12867 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 7672DC3224 for ; Thu, 8 Jul 2021 08:22:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3244D6851C; Thu, 8 Jul 2021 10:22:02 +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="Tc8Y4wJV"; 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 8643168509 for ; Thu, 8 Jul 2021 10:22:00 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.59]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 56C40E7; Thu, 8 Jul 2021 10:21:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1625732520; bh=t/gm9f+i6C5UTXUsUhCPqGQ0U2maFNTvkwoGuBYOUkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tc8Y4wJVGaLVrvtVL2TN9iA/zmA/IUQK0D1fE12Jt+IoGN6ZtXOz8QyMpe1MHQMuj lVmrEcAeHRlipRrLn3qJ/0H62ExMOd0nRuu4AYiHyI/9VYPaVi/6lhVj0vfnmpjuj+ OCj84qBOQVuqvgXA7mp7PW9Tr8mDgaaI7NXqLfYQ= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Jul 2021 13:51:45 +0530 Message-Id: <20210708082145.122160-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210708082145.122160-1-umang.jain@ideasonboard.com> References: <20210708082145.122160-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] utils: ipc: proxy: Always 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 --- .../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 -%}