From patchwork Mon Aug 29 23:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17240 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 73B60C3272 for ; Mon, 29 Aug 2022 23:30:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4CCFC61FC2; Tue, 30 Aug 2022 01:30:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1661815828; bh=Gd4n0KriQUmc2CBbMcQqxTNFv0Y9BfT4OxEd/2Xq2/w=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AEZHpcXNcsAPY2zfRMaEh7N5VOZQqGYoHZhb+vybZcWpcxhmjpfw3OThLnGBV8O3S 0/RocvHy9WyTEWB/HLKL+zX94V2nLgSJgsKpueJpmi7CgGUsf53rlaZk4nJsNW+vst S7iQdPLeK/++CzywKzihtzpxljzEEZwt8Jy3ovCcyo20vEpO4dVUhxHmTHxkMAVn5J KivEUhzm8NM4R1EnivniSAK7+NB8n+9l9azmmdoTNG6citPjq8FIB+JONiCHJO0grs GHt3hLA07uEWt2hVfSwKfe77Q03Keya8ODpwL1DnhdhOYg4coUNxYuMxCpi2MAvP9a SLHY02WCAbXJg== 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 B0FFA61F9C for ; Tue, 30 Aug 2022 01:30:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cWKrja9v"; dkim-atps=neutral Received: from pyrite.mediacom.info (unknown [IPv6:2604:2d80:ad8a:9000:1bf9:855b:22de:3645]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4DC66481; Tue, 30 Aug 2022 01:30:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661815826; bh=Gd4n0KriQUmc2CBbMcQqxTNFv0Y9BfT4OxEd/2Xq2/w=; h=From:To:Cc:Subject:Date:From; b=cWKrja9v5Y7AEeX/NPd5Rt0l0fL5jOhjt3djQ9BveBCURjxgN7+4CNLhM1wNixP6I QJy0i+fMoy8PukOdKSFskszFbVjrR8eMN2rd06PdHGDGV/X1pPenwzj1HV1TSehmPm BTRTDz0m17ArO1ZsoN58qtnilwvRC/BpEz/BXvbU= To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Aug 2022 18:30:10 -0500 Message-Id: <20220829233017.2699444-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/7] utils: ipc: Add support for enums and Flags 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: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch series adds support for enums in function parameters, and Flags all-around. "all-around" does happen to exclude direct function return values, though. Patches 1~2 touch enums, where the first patch adds a test for current enum support that hasn't been tested before, and the second actually adds support for enums in function parameters. Patches 3~4 add support for Flags, and 5 adds a test for it. Patches 6 and 7 extend vimc to have dummy function parameters that are enums and Flags to test enums and Flags as function parameters. v4 is mostly the same as v3/v3.1, just with flags being passed by value instead of const reference, and removing "[TEST]" from the last two patches. Mostly ready to push; just sending this just in case. Paul Elder (7): test: generated_serializer: Test enum that is struct member utils: ipc: Add support for enums in function parameters libcamera: ipa_data_serializer: Add serializer for Flags utils: ipc: Add support for Flags test: generated_serializer: Test Flags that is struct member ipa: vimc: Add IPAOperationCode to init() parameter list ipa: vimc: Add Flags to parameters .../libcamera/internal/ipa_data_serializer.h | 46 +++++++++++++++++++ include/libcamera/ipa/core.mojom | 9 ++++ include/libcamera/ipa/ipa_interface.h | 1 + include/libcamera/ipa/vimc.mojom | 14 +++++- src/ipa/vimc/vimc.cpp | 22 +++++++-- src/libcamera/pipeline/vimc/vimc.cpp | 15 ++++-- test/ipa/ipa_interface_test.cpp | 6 ++- .../generated_serializer_test.cpp | 23 ++++++++++ .../include/libcamera/ipa/test.mojom | 9 ++++ .../definition_functions.tmpl | 2 +- .../module_ipa_interface.h.tmpl | 2 +- .../module_ipa_proxy.h.tmpl | 2 +- .../libcamera_templates/proxy_functions.tmpl | 20 +++++++- .../libcamera_templates/serializer.tmpl | 4 ++ .../generators/mojom_libcamera_generator.py | 29 ++++++++++-- 15 files changed, 187 insertions(+), 17 deletions(-)