From patchwork Fri Aug 26 15:44:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17206 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 CD08AC0DA4 for ; Fri, 26 Aug 2022 15:44:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD40761FC1; Fri, 26 Aug 2022 17:44:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1661528671; bh=KV9lkfpwyXYL+UQNuDAmJXXF9mmxIpjN+pGTprl0PtA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fn0GmSyff7d9KxLU8TBJMn/5h7tER/kbOW+JkEP0baL/jeDGtLPxKnfm/y/qN/ErA GUJvp+lTgPbniRvYcUvJSnVagiFhuqg6lFN24VOjHWRF50w4Vew5IYa78t3XUN4eGs ud1h2P5ky7002vAFuA1vIvrbZPArabwYnkHL37L+DQyfPoMKKLcVqh2yZB5GE5EfNB 6b1fviwmwOYuifrZJq0Z7ek2xkpjL7cM43Sz9izmpipFg6KFo7TzFuLf54yNOV/flH A6okSfCQX9GD9Vy2Vfzfn3ltD4uKpz2l/fgqcuKEiPgSOgDCP9+tDu2OxjowSCWuE7 7EI2lwXdJOSQw== 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 D43A161FA2 for ; Fri, 26 Aug 2022 17:44:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iNgxxoM9"; 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 C054B2B3; Fri, 26 Aug 2022 17:44:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1661528669; bh=KV9lkfpwyXYL+UQNuDAmJXXF9mmxIpjN+pGTprl0PtA=; h=From:To:Cc:Subject:Date:From; b=iNgxxoM9FxthtoYFhgJXx3scDsrG20nSHllIXTNIXtGxLiSA2yD3FOHfNlxg/KHOe x0dWOlWCa1YkeSWgjv/354vJVMi6Dp5ST7vZdbI+Y0hxODT74gYHka2Jq9r8ejdjuy IkCVp+7Ut5uq6hoj64Msy7Jv1wNa6EKrBmt+kkJU= To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Aug 2022 10:44:12 -0500 Message-Id: <20220826154419.4099372-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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. 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 | 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 +- .../libcamera_templates/proxy_functions.tmpl | 20 +++++++- .../libcamera_templates/serializer.tmpl | 4 ++ .../generators/mojom_libcamera_generator.py | 29 ++++++++++-- 12 files changed, 176 insertions(+), 15 deletions(-)