From patchwork Wed Aug 3 11:21:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 16935 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 9B910BE173 for ; Wed, 3 Aug 2022 11:22:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DC6C463310; Wed, 3 Aug 2022 13:22:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659525721; bh=cVOAun//LkjUC3gUiuCTYTt527eQUMI0J22w5lLEWig=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dgc/QjE5Dp/NwW6KaDvigMsFI2bwFQzKl7HYoOqgxJm9cW8j6+H6e5CmeZ6RNAyNZ SfYhGOXYMqpfTMgFgyg/OIYtKZJqOeUQL65R9MrIeqCnwRpck25zD8bKa5hRvk+iLB IjZXeAjhEdtN9Klzg2j01rs+IzRepOfc9xinogfYLKD7P2xRTIQrkKoyAzMEFi5Q3N G/ESjE5H+uOzotOcMaV6vK7Y7aopBLwi/s1iFdNOn8ru/mNqxob/st/Cx8g2EwkfoQ xnr/34O9lLBmFagaLAgtD5c3fPrFVAGHWPhh1naKoYbYvIheFB+x2aCf6q5wiOlRBa I1xzlmGFoQMOg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 932C7603E6 for ; Wed, 3 Aug 2022 13:22:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="l0u/pTPz"; dkim-atps=neutral Received: from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp [175.177.42.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 41E8C8B; Wed, 3 Aug 2022 13:21:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659525720; bh=cVOAun//LkjUC3gUiuCTYTt527eQUMI0J22w5lLEWig=; h=From:To:Cc:Subject:Date:From; b=l0u/pTPz14G0gxlmpYJ+66ryH5gwMVGSnL+aTAvaItExNUtZszUWdueuMyqsjKnvf L+P6xVR6tPE6vh5QSzjTbVQzHH3q+JDpGrT4FLtyNm8oKRQSUQ/VjRSFSgpI6lamqE f06VaTkfrydLJSfjSnjJJT/2btRYdCpoX0KVux3g= To: libcamera-devel@lists.libcamera.org Date: Wed, 3 Aug 2022 20:21:41 +0900 Message-Id: <20220803112150.3040287-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/9] 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~7 add support for Flags. Patches 8 and 9 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 (9): test: generated_serializer: Test enum that is struct member utils: ipc: Add support for enums in function parameters libcamera: flags: Add friend class IPADataSerializer libcamera: ipa_data_serializer: Add serializer for Flags libcamera: ipa_interface: Include flags.h 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 include/libcamera/base/flags.h | 3 ++ .../libcamera/internal/ipa_data_serializer.h | 48 +++++++++++++++++++ include/libcamera/ipa/ipa_interface.h | 1 + include/libcamera/ipa/vimc.mojom | 13 ++++- 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 ++++ .../core_ipa_interface.h.tmpl | 4 ++ .../definition_functions.tmpl | 13 +++++ .../module_ipa_interface.h.tmpl | 4 ++ .../libcamera_templates/proxy_functions.tmpl | 17 ++++++- .../libcamera_templates/serializer.tmpl | 4 ++ .../generators/mojom_libcamera_generator.py | 35 +++++++++++++- 15 files changed, 206 insertions(+), 13 deletions(-)