From patchwork Thu Aug 18 06:49:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17146 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 2FC8FC3272 for ; Thu, 18 Aug 2022 06:49:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 74C0B61FC0; Thu, 18 Aug 2022 08:49:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660805376; bh=nyfpckKaYnFmo9U8pl/F+eoE1uK3wQyi9pz1FfoENPM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gOIww7e+rGYKrxhb956YKZi810D+lufVpwLGltQUzcOBGH07XT5mLHyxVABLvKcg7 trGAxhnvsEx8p7uXNjJxrTrnM1FULB4bkUJAi2dAfVy82oY3lVfmqHfMCsaPB6Am6r Vh2ZERQWFMqMCQcJbk/UYWoGHTuw4yBhLf2OyBixpgCjZtbQYWIQnH0Eot4BbfEF0+ o49M3ZVSbE4BUJ5YKued6VGj/zvj+O4JAUV2KUoK7IdV3NuGvaqp8d5njy64nA/3d3 aKJtjvz81QET4A+qPeMqUFec6PO13Yr6A46gDZ19+raF7C5nM5Ch9TCKOMTOW3qz6S izHQ5mhRso80w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AD12661FA3 for ; Thu, 18 Aug 2022 08:49:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dsJC0jvG"; dkim-atps=neutral Received: from pyrite.rasen.tech (KD027085204050.au-net.ne.jp [27.85.204.50]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 03EAA4A8; Thu, 18 Aug 2022 08:49:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1660805375; bh=nyfpckKaYnFmo9U8pl/F+eoE1uK3wQyi9pz1FfoENPM=; h=From:To:Cc:Subject:Date:From; b=dsJC0jvGaM8HLNHOmWfPlrQxn41+fcXSl7S8R4Zlb4lzk17WdjYj7dM81rFcsgC7G XT1V/h5A2hN3MXL3ahw0+1iE+5FEAGSC8Se4RCy0IrJpYa55FDHmfDn+ikwe7EI9j9 8+3mahIKxTdzBYptatZ454n5EwWUV2GLyLQ8VCxc= To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Aug 2022 15:49:15 +0900 Message-Id: <20220818064923.2573060-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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 direction 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. On one hand I want these to be included so that we can continue to have tests for function parameters, but I'm not sure that those patches are the best implementation. 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 [TEST] ipa: vimc: Add IPAOperationCode to init() parameter list [TEST] ipa: vimc: Add Flags to parameters .../libcamera/internal/ipa_data_serializer.h | 46 +++++++++++++++++++ include/libcamera/ipa/ipa_interface.h | 1 + include/libcamera/ipa/vimc.mojom | 14 +++++- src/ipa/vimc/vimc.cpp | 23 ++++++++-- src/libcamera/pipeline/vimc/vimc.cpp | 16 +++++-- test/ipa/ipa_interface_test.cpp | 6 ++- .../generated_serializer_test.cpp | 23 ++++++++++ .../include/libcamera/ipa/test.mojom | 9 ++++ .../definition_functions.tmpl | 2 +- .../libcamera_templates/proxy_functions.tmpl | 20 +++++++- .../libcamera_templates/serializer.tmpl | 4 ++ .../generators/mojom_libcamera_generator.py | 23 +++++++++- 12 files changed, 173 insertions(+), 14 deletions(-)