[{"id":25383,"web_url":"https://patchwork.libcamera.org/comment/25383/","msgid":"<Y0V3rWnEgbh2I5lC@pendragon.ideasonboard.com>","date":"2022-10-11T14:03:25","subject":"Re: [libcamera-devel] [PATCH v5 0/9] utils: ipc: Add support for\n\tenums and Flags","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Tue, Oct 11, 2022 at 07:58:50PM +0900, Paul Elder via libcamera-devel wrote:\n> v5 fixes a mistake in the scopedEnum implementation in v4, and adds\n> support for skipHeader to enums defined in core.mojom, so that they can\n> be defined in a C++ header and not redefined in mojom.\n> \n> \n> This patch series adds support for enums in function parameters, and\n> Flags all-around.\n> \n> \"all-around\" does happen to exclude direct function return values,\n> though.\n> \n> Patches 1~2 touch enums, where the first patch adds a test for current\n> enum support that hasn't been tested before, and the second actually\n> adds support for enums in function parameters.\n> \n> Patches 3~4 add support for Flags, and 5 adds a test for it.\n> \n> Patches 6 and 7 extend vimc to have dummy function parameters that are\n> enums and Flags to test enums and Flags as function parameters.\n> \n> Patch 8 (new in v5) adds support for skipHeader. This was originally\n> going to posted on top after the rest of the series was merged, but I\n> found an issue with serialization of scoped enums directly, so this\n> series is getting a new version :/\n> \n> Patch 9 adds a test for scoped enums and flags that are designated as\n> skipHeader. It touches core components (it has to, because that's the\n> only place that skipHeader enums can be defined), so it's set as RFC.\n\nWhat prevents using skipHeader enums in other .mojom files ?\n\n> Paul Elder (9):\n>   test: generated_serializer: Test enum that is struct member\n>   utils: ipc: Add support for enums in function parameters\n>   libcamera: ipa_data_serializer: Add serializer for Flags\n>   utils: ipc: Add support for Flags\n>   test: generated_serializer: Test Flags that is struct member\n>   ipa: vimc: Add IPAOperationCode to init() parameter list\n>   ipa: vimc: Add Flags to parameters\n>   utils: ipc: Allow the skipHeader attribute on enums\n>   [RFC] test: generated_serializer: Test skipHeader enums and flags\n> \n>  .../libcamera/internal/ipa_data_serializer.h  | 46 +++++++++++++++++++\n>  include/libcamera/ipa/core.mojom              | 15 +++++-\n>  include/libcamera/ipa/ipa_interface.h         | 12 ++++-\n>  include/libcamera/ipa/vimc.mojom              | 14 +++++-\n>  src/ipa/vimc/vimc.cpp                         | 22 +++++++--\n>  src/libcamera/pipeline/vimc/vimc.cpp          | 15 ++++--\n>  test/ipa/ipa_interface_test.cpp               |  6 ++-\n>  .../generated_serializer_test.cpp             | 36 +++++++++++++++\n>  .../include/libcamera/ipa/test.mojom          | 14 ++++++\n>  .../core_ipa_interface.h.tmpl                 |  2 +-\n>  .../definition_functions.tmpl                 |  2 +-\n>  .../module_ipa_interface.h.tmpl               |  2 +-\n>  .../module_ipa_proxy.h.tmpl                   |  2 +-\n>  .../libcamera_templates/proxy_functions.tmpl  | 20 +++++++-\n>  .../libcamera_templates/serializer.tmpl       |  6 +++\n>  .../generators/mojom_libcamera_generator.py   | 39 ++++++++++++++--\n>  16 files changed, 231 insertions(+), 22 deletions(-)","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 820A3C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Oct 2022 14:03:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3703B62D77;\n\tTue, 11 Oct 2022 16:03:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0BB90603F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Oct 2022 16:03:32 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 877B2907;\n\tTue, 11 Oct 2022 16:03:31 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665497013;\n\tbh=jdScx+xpCVmywxueML6VjFA8QHAKwO3lJJtv+m/vrw8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=mT6bh3Fdz+Bd7VP8PZDc1Jy8Vt+mMklpMbrgjylSsRf6iqEjMR06GtqLfXi4WhMkd\n\tAI4R4Di1y739lXymuexfDiioxN1b5y5y3ucji5NFC0fejnM2yvo4372Ht7KvhJJXiC\n\tHsrfO/YTX10zP95BdSBfnATTfxDzDNgE1i6FWvSubHnGFn6qMnQ0nS5eRVVnHesMkY\n\tyqwWxsWwkc7TSMNjLwyV8YUXoIC7KDxRWYuag7FXDx2+4bE5e2rRM4BkYGsDbGP4f3\n\tZEgX2XOiqGUo8LF/jY6DV4oiE2vT8sJN18cxzk/NEmyOu3Jr0CUoo4iBYblRil1UXg\n\tXLWBhiUZ5i9Ig==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665497011;\n\tbh=jdScx+xpCVmywxueML6VjFA8QHAKwO3lJJtv+m/vrw8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IsAPhj7ovrdwW7irBsOUDyIb9ytWdpSMDuUi+V+EmmBoJZ9Zkv8wrZxYv9xwHG5cR\n\t20immQzi9N80BKYwNt0SwV64Q34yu6zwVPbxRQbKN3AIrsCgoB1+VayI/8JeZJ6Vzk\n\tPSJCET7wi4vnBV6t0x0zdfqAFFgEk1+C89rgKcR8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IsAPhj7o\"; dkim-atps=neutral","Date":"Tue, 11 Oct 2022 17:03:25 +0300","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<Y0V3rWnEgbh2I5lC@pendragon.ideasonboard.com>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221011105859.457567-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/9] utils: ipc: Add support for\n\tenums and Flags","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]