From patchwork Mon Sep 2 22:13:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 21149 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 9116CC324C for ; Mon, 2 Sep 2024 22:13:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C44B3634E0; Tue, 3 Sep 2024 00:13:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tJKGOT0h"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4895D618FF for ; Tue, 3 Sep 2024 00:13:50 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9EF1C21E; Tue, 3 Sep 2024 00:12:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1725315158; bh=8zkx8BzCml3W0WN12swY2XYCZqb0+JJQve+/k7bSdtQ=; h=From:To:Cc:Subject:Date:From; b=tJKGOT0hDPo394NFzH+hTl5qj8pDCeFcGQKJF7XhrB3TMR5YpjiUbCdd7lnw/cbx+ iBdoXpQ6qm4FetPylsMQ52NzFP2gX5CxIashXDFOfF+7wEHgWAi0eRC2qJdRw4xjfa gdx+isWd9EMxZ1kRZn+rUv0nELKsrx8rSGLHM688= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Milan Zamazal Subject: [PATCH 1/2] utils: ipc: Include in generated headers where needed Date: Tue, 3 Sep 2024 01:13:16 +0300 Message-ID: <20240902221317.19005-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 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" Depending on the types used in the IPA interface, generated headers may use the std::string class. Include when needed. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham --- .../libcamera_templates/core_ipa_interface.h.tmpl | 1 + .../libcamera_templates/module_ipa_interface.h.tmpl | 7 ++++--- utils/codegen/ipc/generators/mojom_libcamera_generator.py | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) base-commit: ac1c57fcf5dff06ae4e7e5fad7baa8f93c413e37 diff --git a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl index 7f2d0810823b..590135b88421 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl @@ -15,6 +15,7 @@ #pragma once {% if has_map %}#include {% endif %} +{% if has_string %}#include {% endif %} {% if has_array %}#include {% endif %} #include diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl index 4d88a3d77d0f..0111d0c4c591 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl @@ -14,12 +14,13 @@ #pragma once +{% if has_map %}#include {% endif %} +{% if has_string %}#include {% endif %} +{% if has_array %}#include {% endif %} + #include #include -{% if has_map %}#include {% endif %} -{% if has_array %}#include {% endif %} - namespace libcamera { {%- if has_namespace %} {% for ns in namespace %} diff --git a/utils/codegen/ipc/generators/mojom_libcamera_generator.py b/utils/codegen/ipc/generators/mojom_libcamera_generator.py index b8209e516297..d9c620a05e2a 100644 --- a/utils/codegen/ipc/generators/mojom_libcamera_generator.py +++ b/utils/codegen/ipc/generators/mojom_libcamera_generator.py @@ -467,6 +467,7 @@ class Generator(generator.Generator): 'enums': self.module.enums, 'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0, 'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0, + 'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0, 'has_namespace': self.module.mojom_namespace != '', 'interface_event': GetEventInterface(self.module.interfaces), 'interface_main': GetMainInterface(self.module.interfaces), @@ -486,6 +487,7 @@ class Generator(generator.Generator): 'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes], 'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0, 'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0, + 'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0, 'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes], 'structs_gen_serializer': [x for x in self.module.structs if x.attributes is None or 'skipSerdes' not in x.attributes], } From patchwork Mon Sep 2 22:13:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 21150 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 88689C324C for ; Mon, 2 Sep 2024 22:13:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 63B37634E7; Tue, 3 Sep 2024 00:13:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RK3U+gve"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E193F63466 for ; Tue, 3 Sep 2024 00:13:51 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6034D51B; Tue, 3 Sep 2024 00:12:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1725315160; bh=dutM9cqWogZLWEDoG1SapEYTQjhyvGKKgs8X+sbmDYM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RK3U+gvevyN2wwm5YNkjj3SftdzgSsDZUsweUdUWHDhj2UlFki5GH64/Imzq7ckB+ Gdp+o33TXnfeQqPORqQjeUqpGZqTna0pv7k9Pt76WaWS4j7rSjINSdj+tpVrMtpv8i gCgkr2nCJvzuD8/EmyZpD8HLPmkX1aeA8v0qP4Ok= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Milan Zamazal Subject: [PATCH 2/2] libcamera: ipa: Drop unneded includes from ipa_interface.h Date: Tue, 3 Sep 2024 01:13:17 +0300 Message-ID: <20240902221317.19005-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240902221317.19005-1-laurent.pinchart@ideasonboard.com> References: <20240902221317.19005-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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" The ipa_interface.h file includes a number of headers that are not directly used. Remove them, and add them to the source files that include ipa_interface.h as required. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham --- include/libcamera/ipa/ipa_interface.h | 7 ------- src/ipa/ipu3/ipu3.cpp | 2 ++ src/ipa/rkisp1/rkisp1.cpp | 1 + src/ipa/vimc/vimc.cpp | 1 + src/libcamera/pipeline/vimc/vimc.cpp | 3 +++ .../libcamera_templates/core_ipa_interface.h.tmpl | 4 ++++ .../libcamera_templates/module_ipa_interface.h.tmpl | 7 +++++++ 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h index 2fdc085e771f..dce9637a2238 100644 --- a/include/libcamera/ipa/ipa_interface.h +++ b/include/libcamera/ipa/ipa_interface.h @@ -7,13 +7,6 @@ #pragma once -#include -#include - -#include -#include -#include - namespace libcamera { /* diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 6ebf7c1dcab4..10a8c86d8e64 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -23,7 +23,9 @@ #include #include +#include #include +#include #include #include diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index f164d7c51ccf..78d2c375d6dc 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp index ebd63fa6cc09..5495401f1731 100644 --- a/src/ipa/vimc/vimc.cpp +++ b/src/ipa/vimc/vimc.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp index 0ec9928eec23..325174b90087 100644 --- a/src/libcamera/pipeline/vimc/vimc.cpp +++ b/src/libcamera/pipeline/vimc/vimc.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -21,6 +22,8 @@ #include #include #include +#include +#include #include #include diff --git a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl index 590135b88421..3942e5708d98 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl @@ -18,6 +18,10 @@ {% if has_string %}#include {% endif %} {% if has_array %}#include {% endif %} +#include +#include +#include + #include namespace libcamera { diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl index 0111d0c4c591..5d70ea6a2c29 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl @@ -18,6 +18,13 @@ {% if has_string %}#include {% endif %} {% if has_array %}#include {% endif %} +#include +#include + +#include +#include +#include + #include #include