[{"id":25381,"web_url":"https://patchwork.libcamera.org/comment/25381/","msgid":"<Y0VwerOrqKrePA4s@pendragon.ideasonboard.com>","date":"2022-10-11T13:32:42","subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Tue, Oct 11, 2022 at 07:58:58PM +0900, Paul Elder via libcamera-devel wrote:\n> Currently, enums that are passed between pipeline handlers and their IPA\n> must be defined in a mojom file. However, there is a use case for\n> enum/flags to be defined in a C++ header, such that the enum can be used\n> in a component other than the pipeline handler and its IPA.\n> \n> To support this, add support for the skipHeader attribute for enums.\n> Like structs, it is only allowed in core.mojom.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> ---\n> New in v5\n> ---\n>  include/libcamera/ipa/core.mojom                              | 4 +++-\n>  include/libcamera/ipa/ipa_interface.h                         | 4 ++--\n>  .../generators/libcamera_templates/core_ipa_interface.h.tmpl  | 2 +-\n>  utils/ipc/generators/mojom_libcamera_generator.py             | 2 +-\n>  4 files changed, 7 insertions(+), 5 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\n> index ef28ff2d..1ff674b0 100644\n> --- a/include/libcamera/ipa/core.mojom\n> +++ b/include/libcamera/ipa/core.mojom\n> @@ -14,7 +14,7 @@ module libcamera;\n>   * - structs\n>   *\n>   * Attributes:\n> - * - skipHeader - structs only, and only in core.mojom\n> + * - skipHeader - allowed only for structs and enums in core.mojom\n>   *   - Do not generate a C++ definition for the structure\n\ns/structure/structure or enum/\n\nIt seems so simple now that it's implemented :-)\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>   *   - Any type used in a mojom interface definition must have a corresponding\n>   *     definition in a mojom file for the code generator to accept it, except\n> @@ -52,6 +52,8 @@ module libcamera;\n>   *   then the type definition in the core.mojom file should have the\n>   *   [skipHeader] attribute only\n>   *   - A (de)serializer will be generated for the type\n> + *   - enums that are defined in a libcamera C++ header also fall in this\n> + *     category\n>   * - If a type definition has [skipHeader], then the header where the type is\n>   *   defined must be included in ipa_interface.h\n>   * - Types that are solely used as array/map members do not require a mojom\n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> index 8afcfe21..8884f0ed 100644\n> --- a/include/libcamera/ipa/ipa_interface.h\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -23,8 +23,8 @@\n>  namespace libcamera {\n>  \n>  /*\n> - * Structs that are defined in core.mojom and have the skipHeader tag must be\n> - * #included here.\n> + * Structs and enums that are defined in core.mojom that have the skipHeader\n> + * tag must be #included here.\n>   */\n>  \n>  class IPAInterface\n> diff --git a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> index a565b59a..c60b99b8 100644\n> --- a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> @@ -26,7 +26,7 @@ namespace libcamera {\n>  static const {{const.kind|name}} {{const.mojom_name}} = {{const.value}};\n>  {% endfor %}\n>  \n> -{% for enum in enums %}\n> +{% for enum in enums_gen_header %}\n>  {{funcs.define_enum(enum)}}\n>  {% endfor %}\n>  \n> diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py\n> index 6c176aba..64987ccd 100644\n> --- a/utils/ipc/generators/mojom_libcamera_generator.py\n> +++ b/utils/ipc/generators/mojom_libcamera_generator.py\n> @@ -483,7 +483,7 @@ class Generator(generator.Generator):\n>      def _GetJinjaExportsForCore(self):\n>          return {\n>              'consts': self.module.constants,\n> -            'enums': self.module.enums,\n> +            'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],\n>              'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,\n>              'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,\n>              'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],","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 4B805BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Oct 2022 13:32:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD14862D74;\n\tTue, 11 Oct 2022 15:32:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9B046603F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Oct 2022 15:32:49 +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 EE848907;\n\tTue, 11 Oct 2022 15:32:48 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665495171;\n\tbh=WJaL8YvOsPAtztYcfyIrYSxzHrboCROrEmxrCIzJ8YM=;\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=nUY73jNkNQgLqs4BrTbZYYKGM7Zd27emMC+YdFd+CGgDU/23saY4bdLpLE/+hrUcY\n\tFdsn+3d3IJAHxl+rUDikhGEiYS0ZjxvDSK7RyBZz+3BK/vmxFISuZg4fOjf9a35irm\n\tCXEuARlHer7fi+xgECRsS0om0eM2pfZ3bCLiQChwRNBeCdGIztF3V5CXW7V3RTbOiq\n\t4yCMLDwIGAVxQd0ysksXbcWh08jIBEMU7JMQa9AyqyKSC3UMrPF86C5PYI1FrfSnzI\n\to/345O3KDK+9JjB++imPUHAK7tfI/kiHzymljyYbQWigo5qYRR16G6jjfvp0hlhmGx\n\tD1oNyQgXxvFMg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665495169;\n\tbh=WJaL8YvOsPAtztYcfyIrYSxzHrboCROrEmxrCIzJ8YM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DTCi6sPvuX2J++2Ln+5muHmNPlfn4uiffRIfyu1s3a5wit4bc0pEiqvvnKyVZ/Dxj\n\tSaoOj1KEuHfaO872Z9phksXmA+kZz6zVpsjwOWbtnmzjeYjdyFFbwoAW0OQPGbCAOg\n\tRm0Xfx6WFx0/j9yz9n7extkxlPz9s/RG2wqjxsps="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DTCi6sPv\"; dkim-atps=neutral","Date":"Tue, 11 Oct 2022 16:32:42 +0300","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<Y0VwerOrqKrePA4s@pendragon.ideasonboard.com>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-9-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221011105859.457567-9-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","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>"}},{"id":25404,"web_url":"https://patchwork.libcamera.org/comment/25404/","msgid":"<20221012135515.2jcnjjz7pbby2mur@uno.localdomain>","date":"2022-10-12T13:55:15","subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Paul\n\nOn Tue, Oct 11, 2022 at 07:58:58PM +0900, Paul Elder via libcamera-devel wrote:\n> Currently, enums that are passed between pipeline handlers and their IPA\n> must be defined in a mojom file. However, there is a use case for\n> enum/flags to be defined in a C++ header, such that the enum can be used\n> in a component other than the pipeline handler and its IPA.\n>\n> To support this, add support for the skipHeader attribute for enums.\n> Like structs, it is only allowed in core.mojom.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n> ---\n> New in v5\n> ---\n>  include/libcamera/ipa/core.mojom                              | 4 +++-\n>  include/libcamera/ipa/ipa_interface.h                         | 4 ++--\n>  .../generators/libcamera_templates/core_ipa_interface.h.tmpl  | 2 +-\n>  utils/ipc/generators/mojom_libcamera_generator.py             | 2 +-\n>  4 files changed, 7 insertions(+), 5 deletions(-)\n>\n> diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\n> index ef28ff2d..1ff674b0 100644\n> --- a/include/libcamera/ipa/core.mojom\n> +++ b/include/libcamera/ipa/core.mojom\n> @@ -14,7 +14,7 @@ module libcamera;\n>   * - structs\n>   *\n>   * Attributes:\n> - * - skipHeader - structs only, and only in core.mojom\n> + * - skipHeader - allowed only for structs and enums in core.mojom\n>   *   - Do not generate a C++ definition for the structure\n\ns/structure/type ?\n\n>   *   - Any type used in a mojom interface definition must have a corresponding\n>   *     definition in a mojom file for the code generator to accept it, except\n\nI guess we don't want [skipSerdes] for enums ? Or do we ?\n\n> @@ -52,6 +52,8 @@ module libcamera;\n>   *   then the type definition in the core.mojom file should have the\n>   *   [skipHeader] attribute only\n>   *   - A (de)serializer will be generated for the type\n> + *   - enums that are defined in a libcamera C++ header also fall in this\n> + *     category\n\nIs this necessary, as we already claimed the attribute applies to\nstruct and enums ?\n\n>   * - If a type definition has [skipHeader], then the header where the type is\n>   *   defined must be included in ipa_interface.h\n>   * - Types that are solely used as array/map members do not require a mojom\n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> index 8afcfe21..8884f0ed 100644\n> --- a/include/libcamera/ipa/ipa_interface.h\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -23,8 +23,8 @@\n>  namespace libcamera {\n>\n>  /*\n> - * Structs that are defined in core.mojom and have the skipHeader tag must be\n> - * #included here.\n> + * Structs and enums that are defined in core.mojom that have the skipHeader\n> + * tag must be #included here.\n\nI would take the occasion to re-phrase this:\n\n    * The header file where symbols used in core.mojom are defined\n    * must be #included here\n\nIf my understanding is correct\n\n>   */\n>\n>  class IPAInterface\n> diff --git a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> index a565b59a..c60b99b8 100644\n> --- a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> @@ -26,7 +26,7 @@ namespace libcamera {\n>  static const {{const.kind|name}} {{const.mojom_name}} = {{const.value}};\n>  {% endfor %}\n>\n> -{% for enum in enums %}\n> +{% for enum in enums_gen_header %}\n>  {{funcs.define_enum(enum)}}\n>  {% endfor %}\n>\n> diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py\n> index 6c176aba..64987ccd 100644\n> --- a/utils/ipc/generators/mojom_libcamera_generator.py\n> +++ b/utils/ipc/generators/mojom_libcamera_generator.py\n> @@ -483,7 +483,7 @@ class Generator(generator.Generator):\n>      def _GetJinjaExportsForCore(self):\n>          return {\n>              'consts': self.module.constants,\n> -            'enums': self.module.enums,\n> +            'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],\n>              'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,\n>              'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,\n>              'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],\n> --\n> 2.30.2\n>","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 6076AC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 13:55:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B9B2262D9E;\n\tWed, 12 Oct 2022 15:55:18 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D073E603D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 15:55:17 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 60486E000A;\n\tWed, 12 Oct 2022 13:55:16 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665582918;\n\tbh=+IUcHhiKOIRpAzNvh1RfOuQ1bEzz2xcRUxZK/4DttSc=;\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=tHD9UklEcrJMV0iVGz8Q0/9wHqDXqcKATG/sw0nZairLXCOpWqEbiHeDHtCh/PW63\n\twbwX+LctCFFkBrF8Dm7Ry621SHwHCqV8mVWO//ZvNVBy6rS/lJ900Eeq3IK+7S/JLO\n\tDq8czHPrsnWiqV/4zZ0RgKEoZXdxF8cIxP8+1665jGwRa3h4/BTqW2QzrFf/Ls32kY\n\tQQForsVbVMC4ztCNOK/QGfKcMWFLlod2H3vu9IqhkD+0rOSyoj7ivFCQN3t3wlRQyF\n\tm8RrNGsCDDDCe0x8WxHf6euyA+wZUXMP1OxDb39+Y8aGfz3dchfsMu9mj+CHQgBo/b\n\tec1uDZKLF/oog==","Date":"Wed, 12 Oct 2022 15:55:15 +0200","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20221012135515.2jcnjjz7pbby2mur@uno.localdomain>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-9-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221011105859.457567-9-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25444,"web_url":"https://patchwork.libcamera.org/comment/25444/","msgid":"<20221018040020.GB3814735@pyrite.rasen.tech>","date":"2022-10-18T04:00:20","subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"On Wed, Oct 12, 2022 at 03:55:15PM +0200, Jacopo Mondi wrote:\n> Hi Paul\n> \n> On Tue, Oct 11, 2022 at 07:58:58PM +0900, Paul Elder via libcamera-devel wrote:\n> > Currently, enums that are passed between pipeline handlers and their IPA\n> > must be defined in a mojom file. However, there is a use case for\n> > enum/flags to be defined in a C++ header, such that the enum can be used\n> > in a component other than the pipeline handler and its IPA.\n> >\n> > To support this, add support for the skipHeader attribute for enums.\n> > Like structs, it is only allowed in core.mojom.\n> >\n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> >\n> > ---\n> > New in v5\n> > ---\n> >  include/libcamera/ipa/core.mojom                              | 4 +++-\n> >  include/libcamera/ipa/ipa_interface.h                         | 4 ++--\n> >  .../generators/libcamera_templates/core_ipa_interface.h.tmpl  | 2 +-\n> >  utils/ipc/generators/mojom_libcamera_generator.py             | 2 +-\n> >  4 files changed, 7 insertions(+), 5 deletions(-)\n> >\n> > diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\n> > index ef28ff2d..1ff674b0 100644\n> > --- a/include/libcamera/ipa/core.mojom\n> > +++ b/include/libcamera/ipa/core.mojom\n> > @@ -14,7 +14,7 @@ module libcamera;\n> >   * - structs\n> >   *\n> >   * Attributes:\n> > - * - skipHeader - structs only, and only in core.mojom\n> > + * - skipHeader - allowed only for structs and enums in core.mojom\n> >   *   - Do not generate a C++ definition for the structure\n> \n> s/structure/type ?\n> \n> >   *   - Any type used in a mojom interface definition must have a corresponding\n> >   *     definition in a mojom file for the code generator to accept it, except\n> \n> I guess we don't want [skipSerdes] for enums ? Or do we ?\n\nenums, like PODs, already get skipSerdes-ed.\n\n> \n> > @@ -52,6 +52,8 @@ module libcamera;\n> >   *   then the type definition in the core.mojom file should have the\n> >   *   [skipHeader] attribute only\n> >   *   - A (de)serializer will be generated for the type\n> > + *   - enums that are defined in a libcamera C++ header also fall in this\n> > + *     category\n> \n> Is this necessary, as we already claimed the attribute applies to\n> struct and enums ?\n>\n> \n> >   * - If a type definition has [skipHeader], then the header where the type is\n> >   *   defined must be included in ipa_interface.h\n> >   * - Types that are solely used as array/map members do not require a mojom\n> > diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> > index 8afcfe21..8884f0ed 100644\n> > --- a/include/libcamera/ipa/ipa_interface.h\n> > +++ b/include/libcamera/ipa/ipa_interface.h\n> > @@ -23,8 +23,8 @@\n> >  namespace libcamera {\n> >\n> >  /*\n> > - * Structs that are defined in core.mojom and have the skipHeader tag must be\n> > - * #included here.\n> > + * Structs and enums that are defined in core.mojom that have the skipHeader\n> > + * tag must be #included here.\n> \n> I would take the occasion to re-phrase this:\n> \n>     * The header file where symbols used in core.mojom are defined\n>     * must be #included here\n> \n> If my understanding is correct\n\nIt's not wrong, I just think it's less precise.\n\n\nPaul\n\n> \n> >   */\n> >\n> >  class IPAInterface\n> > diff --git a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> > index a565b59a..c60b99b8 100644\n> > --- a/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> > +++ b/utils/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl\n> > @@ -26,7 +26,7 @@ namespace libcamera {\n> >  static const {{const.kind|name}} {{const.mojom_name}} = {{const.value}};\n> >  {% endfor %}\n> >\n> > -{% for enum in enums %}\n> > +{% for enum in enums_gen_header %}\n> >  {{funcs.define_enum(enum)}}\n> >  {% endfor %}\n> >\n> > diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py\n> > index 6c176aba..64987ccd 100644\n> > --- a/utils/ipc/generators/mojom_libcamera_generator.py\n> > +++ b/utils/ipc/generators/mojom_libcamera_generator.py\n> > @@ -483,7 +483,7 @@ class Generator(generator.Generator):\n> >      def _GetJinjaExportsForCore(self):\n> >          return {\n> >              'consts': self.module.constants,\n> > -            'enums': self.module.enums,\n> > +            'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],\n> >              'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,\n> >              'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,\n> >              'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],\n> > --\n> > 2.30.2\n> >","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 0F94CC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Oct 2022 04:00:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5C9CC62E0B;\n\tTue, 18 Oct 2022 06:00:29 +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 B619F61F55\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Oct 2022 06:00:27 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 044CC8CC;\n\tTue, 18 Oct 2022 06:00:25 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666065629;\n\tbh=NaiDSyLRnhjABZdJ//74oqLCnSa9hRZvGfKW6VfrneA=;\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=TyM4Dw2TVRVPoxG8lXKA1f3sgdS12cX8M1DkV2LxE9VAlvuvhdXImXk+ynZJXtMVd\n\tMQZNCDzmibDnrRBCAa2DFmCB1iSAMD65ktwpb/iz9Dl/zrPxgW/r2rUD7V4LSJIQ9U\n\tJKa0SVAHYYl5QY0nf2+xyPDqy4qM/doF1WL2HUsrkkgLnyNBzhjNEBzoZzeWBhVJs2\n\t5BURKs6dYQSFo+tYKCHy1pYI3s1EDujs2DyAO/dOVEpxeeE8ZljD0+rASg5f0dCreM\n\tEXR5ImQYrwGPv7OJg61PeWT6HVREHP/0PQbnR17UGAVIpZPR+PoF7ev8jauiZ+Xyvl\n\tGfN7kOScZiLrQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1666065627;\n\tbh=NaiDSyLRnhjABZdJ//74oqLCnSa9hRZvGfKW6VfrneA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=J0TV8I2jJR18xGSJjNSaB5/3TdzLoA2kMSv+rSvwFv4h9ad0ZUuWVUBQd43ADhaGR\n\ty7wd6E4D67gVKWhPg2iwEwW8A9GKkyToNmFLtImyksVTUKI4oBWIdNLkYnN6pzCGPH\n\t0fUunNledskyU0xlYvWDke3mHh4Bgd0/rFb4dFUY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"J0TV8I2j\"; dkim-atps=neutral","Date":"Tue, 18 Oct 2022 13:00:20 +0900","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20221018040020.GB3814735@pyrite.rasen.tech>","References":"<20221011105859.457567-1-paul.elder@ideasonboard.com>\n\t<20221011105859.457567-9-paul.elder@ideasonboard.com>\n\t<20221012135515.2jcnjjz7pbby2mur@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20221012135515.2jcnjjz7pbby2mur@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH v5 8/9] utils: ipc: Allow the\n\tskipHeader attribute on enums","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@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>"}}]