[{"id":27053,"web_url":"https://patchwork.libcamera.org/comment/27053/","msgid":"<20230504153831.GM4551@pendragon.ideasonboard.com>","date":"2023-05-04T15:38:31","subject":"Re: [libcamera-devel] [PATCH 01/13] meson: ipa: Add mapping for\n\tpipeline handler to mojom interface file","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Wed, May 03, 2023 at 01:20:23PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Allow an arbitrary mapping between the pipeline handler and IPA mojom\n> interface file in the build system. This removes the 1:1 mapping of\n> pipeline handler name to mojom filename, and allows more flexibility to\n> pipeline developers.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> ---\n>  Documentation/guides/ipa.rst      | 39 ++++++++++++++++++++-----------\n>  include/libcamera/ipa/meson.build | 36 +++++++++++++++++-----------\n>  2 files changed, 48 insertions(+), 27 deletions(-)\n> \n> diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> index fc0317451e24..51dbe3aad5f5 100644\n> --- a/Documentation/guides/ipa.rst\n> +++ b/Documentation/guides/ipa.rst\n> @@ -19,6 +19,16 @@ connect to, in order to receive data from the IPA asynchronously. In addition,\n>  it contains any custom data structures that the pipeline handler and IPA may\n>  pass to each other.\n>  \n> +It is possible to use the same IPA interface with multiple pipeline handlers\n> +on different hardware platforms. Generally in such cases, these platforms would\n> +have a common hardware ISP pipeline. For instance, the rkisp1 pipeline handler\n> +supports both the RK3399 and the i.MX8MP as they integrate the same ISP.\n> +However, the i.MX8MP has a more complex camera pipeline, which may call for a\n> +dedicated pipeline handler in the future. As the ISP is the same as for RK3399,\n> +the same IPA interface could be used for both pipeline handlers. The build files\n> +provide a mapping from pipeline handler to the IPA interface name as detailed in\n> +:ref:`compiling-section`.\n> +\n>  The IPA protocol refers to the agreement between the pipeline handler and the\n>  IPA regarding the expected response(s) from the IPA for given calls to the IPA.\n>  This protocol doesn't need to be declared anywhere in code, but it shall be\n> @@ -43,7 +53,7 @@ interface definition is thus written by the pipeline handler author, based on\n>  how they design the interactions between the pipeline handler and the IPA.\n>  \n>  The entire IPA interface, including the functions, signals, and any custom\n> -structs shall be defined in a file named {pipeline_name}.mojom under\n> +structs shall be defined in a file named {interface_name}.mojom under\n>  include/libcamera/ipa/.\n>  \n>  .. _mojo Interface Definition Language: https://chromium.googlesource.com/chromium/src.git/+/master/mojo/public/tools/bindings/README.md\n> @@ -150,8 +160,6 @@ and the Event IPA interface, which describes the signals received by the\n>  pipeline handler that the IPA can emit. Both must be defined. This section\n>  focuses on the Main IPA interface.\n>  \n> -The main interface must be named as IPA{pipeline_name}Interface.\n> -\n\nDid you drop this on purpose ?\n\n>  The functions that the pipeline handler can call from the IPA may be\n>  synchronous or asynchronous. Synchronous functions do not return until the IPA\n>  returns from the function, while asynchronous functions return immediately\n> @@ -243,7 +251,7 @@ then it may be empty. These emissions are meant to notify the pipeline handler\n>  of some event, such as request data is ready, and *must not* be used to drive\n>  the camera pipeline from the IPA.\n>  \n> -The event interface must be named as IPA{pipeline_name}EventInterface.\n> +The event interface must be named as IPA{interface_name}EventInterface.\n>  \n>  Functions defined in the event interface are implicitly asynchronous.\n>  Thus they cannot return any value. Specifying the [async] tag is not\n> @@ -266,38 +274,41 @@ The following is an example of an event interface definition:\n>                  setStaggered(libcamera.ControlList controls);\n>          };\n>  \n> +.. _compiling-section:\n> +\n>  Compiling the IPA interface\n>  ---------------------------\n>  \n> -After the IPA interface is defined in include/libcamera/ipa/{pipeline_name}.mojom,\n> +After the IPA interface is defined in include/libcamera/ipa/{interface_name}.mojom,\n>  an entry for it must be added in meson so that it can be compiled. The filename\n> -must be added to the ipa_mojom_files object in include/libcamera/ipa/meson.build.\n> +must be added to the pipeline_ipa_mojom_mapping object in include/libcamera/ipa/meson.build.\n> +This object maps the pipeline handler name with an ipa interface file.\n\nIt's not an object but a variable, I'll fix this while at it.\n\ns/with an ipa/to its IPA/\n\n>  \n>  For example, adding the raspberrypi.mojom file to meson:\n>  \n>  .. code-block:: none\n>  \n> -        ipa_mojom_files = [\n> -            'raspberrypi.mojom',\n> +        pipeline_ipa_mojom_mapping = [\n> +            'rpi/vc4': 'raspberrypi.mojom',\n>          ]\n>  \n>  This will cause the mojo data definition file to be compiled. Specifically, it\n>  generates five files:\n>  \n>  - a header describing the custom data structures, and the complete IPA\n> -  interface (at {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_interface.h)\n> +  interface (at {$build_dir}/include/libcamera/ipa/{interface}_ipa_interface.h)\n>  \n>  - a serializer implementing de/serialization for the custom data structures (at\n> -  {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_serializer.h)\n> +  {$build_dir}/include/libcamera/ipa/{interface}_ipa_serializer.h)\n>  \n>  - a proxy header describing a specialized IPA proxy (at\n> -  {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_proxy.h)\n> +  {$build_dir}/include/libcamera/ipa/{interface}_ipa_proxy.h)\n>  \n>  - a proxy source implementing the IPA proxy (at\n> -  {$build_dir}/src/libcamera/proxy/{pipeline}_ipa_proxy.cpp)\n> +  {$build_dir}/src/libcamera/proxy/{interface}_ipa_proxy.cpp)\n>  \n>  - a proxy worker source implementing the other end of the IPA proxy (at\n> -  {$build_dir}/src/libcamera/proxy/worker/{pipeline}_ipa_proxy_worker.cpp)\n> +  {$build_dir}/src/libcamera/proxy/worker/{interface}_ipa_proxy_worker.cpp)\n>  \n>  The IPA proxy serves as the layer between the pipeline handler and the IPA, and\n>  handles threading vs isolation transparently. The pipeline handler and the IPA\n> @@ -312,7 +323,7 @@ file, the following header must be included:\n>  \n>  .. code-block:: C++\n>  \n> -   #include <libcamera/ipa/{pipeline_name}_ipa_interface.h>\n> +   #include <libcamera/ipa/{interface_name}_ipa_interface.h>\n>  \n>  The POD types of the structs simply become their C++ counterparts, eg. uint32\n>  in mojo will become uint32_t in C++. mojo map becomes C++ std::map, and mojo\n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 442ca3dd7e1c..c57b3a5e1570 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -60,13 +60,15 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n>                        './' +'@INPUT@'\n>                    ])\n>  \n> -ipa_mojom_files = [\n> -    'ipu3.mojom',\n> -    'raspberrypi.mojom',\n> -    'rkisp1.mojom',\n> -    'vimc.mojom',\n> -]\n> -\n> +# Mapping from pipeline handler name to mojom file\n> +pipeline_ipa_mojom_mapping = {\n> +    'ipu3': 'ipu3.mojom',\n> +    'rkisp1': 'rkisp1.mojom',\n> +    'raspberrypi': 'raspberrypi.mojom',\n> +    'vimc': 'vimc.mojom',\n> +}\n> +\n> +ipa_mojom_files = []\n>  ipa_mojoms = []\n>  \n>  #\n> @@ -75,14 +77,22 @@ ipa_mojoms = []\n>  \n>  # TODO Define per-pipeline ControlInfoMap with yaml?\n>  \n> -foreach file : ipa_mojom_files\n> +foreach pipeline, file : pipeline_ipa_mojom_mapping\n> +\n\nNo need for a blank line.\n\nI'll apply all these small changes, no need to resubmit.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>      name = file.split('.')[0]\n>  \n> -    if name not in pipelines\n> +    # Ensure we do not build duplicate mojom modules\n> +    if file in ipa_mojom_files\n> +        continue\n> +    endif\n> +\n> +    ipa_mojom_files += file\n> +\n> +    if pipeline not in pipelines\n>          continue\n>      endif\n>  \n> -    # {pipeline}.mojom-module\n> +    # {interface}.mojom-module\n>      mojom = custom_target(name + '_mojom_module',\n>                            input : file,\n>                            output : file + '-module',\n> @@ -94,7 +104,7 @@ foreach file : ipa_mojom_files\n>                                '--mojoms', '@INPUT@'\n>                            ])\n>  \n> -    # {pipeline}_ipa_interface.h\n> +    # {interface}_ipa_interface.h\n>      header = custom_target(name + '_ipa_interface_h',\n>                             input : mojom,\n>                             output : name + '_ipa_interface.h',\n> @@ -110,7 +120,7 @@ foreach file : ipa_mojom_files\n>                                 './' +'@INPUT@'\n>                             ])\n>  \n> -    # {pipeline}_ipa_serializer.h\n> +    # {interface}_ipa_serializer.h\n>      serializer = custom_target(name + '_ipa_serializer_h',\n>                                 input : mojom,\n>                                 output : name + '_ipa_serializer.h',\n> @@ -124,7 +134,7 @@ foreach file : ipa_mojom_files\n>                                     './' +'@INPUT@'\n>                                 ])\n>  \n> -    # {pipeline}_ipa_proxy.h\n> +    # {interface}_ipa_proxy.h\n>      proxy_header = custom_target(name + '_proxy_h',\n>                                   input : mojom,\n>                                   output : name + '_ipa_proxy.h',","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 99F4BBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 May 2023 15:38:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 138D5633B4;\n\tThu,  4 May 2023 17:38:23 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E8F261EAE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 May 2023 17:38:21 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0CAEB6E0;\n\tThu,  4 May 2023 17:38:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1683214703;\n\tbh=6WP2hG4q7iAoapTsxXxnEwyKgnlG4g6CtGoA6bLCv4A=;\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=AQE79LEdGnw1YhmJW7RiVIluf/XdJ6uuGtAIGRTmEbrZugDV4BExd3OFtNiEX7OhK\n\tvJ3REXksuvtlbbwiinZRnsfD4hJmmLWYxHbKP2s1cl+MGpu1lq1V3xJfqFNk9/WMGy\n\t+5jGSJKjI4G2m46yOp/HnN+R0P5IeD7k39tqjGKLmbHJMDV5jihZFgbVr6dWlHjadB\n\tu8561M3hVZN9F2AXvQgbclbV/wu32ZTTabA5uWHKQC5FWMy6wkUmu23d5AXEuogtGT\n\tGf5mbK6B+xbpKO2G1iFZpHBCZKpG8Xa0HfX/aDu9K5ENNqdwT95coArazCIsH48dWW\n\tAgOsYMn3xXaoA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1683214698;\n\tbh=6WP2hG4q7iAoapTsxXxnEwyKgnlG4g6CtGoA6bLCv4A=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KGbcZVIJ96s8KpWu7VFvZAn0l2/tp0sk/d2+rozY/dED9sWxaaAK9ZILFdWZAmoRm\n\t/swi76trk9RKJmgnEy3dWP8uqsMSM78yrlKDXYbmZLAN9ekRjdNrHg+QLc4p73qpIt\n\tVFaOD7AXT8x2LogEoCYcCNwpwSaa4S2TnLT/NCQQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KGbcZVIJ\"; dkim-atps=neutral","Date":"Thu, 4 May 2023 18:38:31 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230504153831.GM4551@pendragon.ideasonboard.com>","References":"<20230503122035.32026-1-naush@raspberrypi.com>\n\t<20230503122035.32026-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230503122035.32026-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 01/13] meson: ipa: Add mapping for\n\tpipeline handler to mojom interface file","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":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27057,"web_url":"https://patchwork.libcamera.org/comment/27057/","msgid":"<CAEmqJPogCzd3WkYuA-xHzgtqR8AMx0ixmTj_uKGbD6v81TS3gQ@mail.gmail.com>","date":"2023-05-04T16:26:24","subject":"Re: [libcamera-devel] [PATCH 01/13] meson: ipa: Add mapping for\n\tpipeline handler to mojom interface file","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Thu, 4 May 2023 at 16:38, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Wed, May 03, 2023 at 01:20:23PM +0100, Naushir Patuck via libcamera-devel wrote:\n> > Allow an arbitrary mapping between the pipeline handler and IPA mojom\n> > interface file in the build system. This removes the 1:1 mapping of\n> > pipeline handler name to mojom filename, and allows more flexibility to\n> > pipeline developers.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > ---\n> >  Documentation/guides/ipa.rst      | 39 ++++++++++++++++++++-----------\n> >  include/libcamera/ipa/meson.build | 36 +++++++++++++++++-----------\n> >  2 files changed, 48 insertions(+), 27 deletions(-)\n> >\n> > diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> > index fc0317451e24..51dbe3aad5f5 100644\n> > --- a/Documentation/guides/ipa.rst\n> > +++ b/Documentation/guides/ipa.rst\n> > @@ -19,6 +19,16 @@ connect to, in order to receive data from the IPA asynchronously. In addition,\n> >  it contains any custom data structures that the pipeline handler and IPA may\n> >  pass to each other.\n> >\n> > +It is possible to use the same IPA interface with multiple pipeline handlers\n> > +on different hardware platforms. Generally in such cases, these platforms would\n> > +have a common hardware ISP pipeline. For instance, the rkisp1 pipeline handler\n> > +supports both the RK3399 and the i.MX8MP as they integrate the same ISP.\n> > +However, the i.MX8MP has a more complex camera pipeline, which may call for a\n> > +dedicated pipeline handler in the future. As the ISP is the same as for RK3399,\n> > +the same IPA interface could be used for both pipeline handlers. The build files\n> > +provide a mapping from pipeline handler to the IPA interface name as detailed in\n> > +:ref:`compiling-section`.\n> > +\n> >  The IPA protocol refers to the agreement between the pipeline handler and the\n> >  IPA regarding the expected response(s) from the IPA for given calls to the IPA.\n> >  This protocol doesn't need to be declared anywhere in code, but it shall be\n> > @@ -43,7 +53,7 @@ interface definition is thus written by the pipeline handler author, based on\n> >  how they design the interactions between the pipeline handler and the IPA.\n> >\n> >  The entire IPA interface, including the functions, signals, and any custom\n> > -structs shall be defined in a file named {pipeline_name}.mojom under\n> > +structs shall be defined in a file named {interface_name}.mojom under\n> >  include/libcamera/ipa/.\n> >\n> >  .. _mojo Interface Definition Language: https://chromium.googlesource.com/chromium/src.git/+/master/mojo/public/tools/bindings/README.md\n> > @@ -150,8 +160,6 @@ and the Event IPA interface, which describes the signals received by the\n> >  pipeline handler that the IPA can emit. Both must be defined. This section\n> >  focuses on the Main IPA interface.\n> >\n> > -The main interface must be named as IPA{pipeline_name}Interface.\n> > -\n>\n> Did you drop this on purpose ?\n\nOops, no I didn't.  But we do need to replace pipeline_name with\ninterface_name.  Finger trouble on my part.\n\n>\n> >  The functions that the pipeline handler can call from the IPA may be\n> >  synchronous or asynchronous. Synchronous functions do not return until the IPA\n> >  returns from the function, while asynchronous functions return immediately\n> > @@ -243,7 +251,7 @@ then it may be empty. These emissions are meant to notify the pipeline handler\n> >  of some event, such as request data is ready, and *must not* be used to drive\n> >  the camera pipeline from the IPA.\n> >\n> > -The event interface must be named as IPA{pipeline_name}EventInterface.\n> > +The event interface must be named as IPA{interface_name}EventInterface.\n> >\n> >  Functions defined in the event interface are implicitly asynchronous.\n> >  Thus they cannot return any value. Specifying the [async] tag is not\n> > @@ -266,38 +274,41 @@ The following is an example of an event interface definition:\n> >                  setStaggered(libcamera.ControlList controls);\n> >          };\n> >\n> > +.. _compiling-section:\n> > +\n> >  Compiling the IPA interface\n> >  ---------------------------\n> >\n> > -After the IPA interface is defined in include/libcamera/ipa/{pipeline_name}.mojom,\n> > +After the IPA interface is defined in include/libcamera/ipa/{interface_name}.mojom,\n> >  an entry for it must be added in meson so that it can be compiled. The filename\n> > -must be added to the ipa_mojom_files object in include/libcamera/ipa/meson.build.\n> > +must be added to the pipeline_ipa_mojom_mapping object in include/libcamera/ipa/meson.build.\n> > +This object maps the pipeline handler name with an ipa interface file.\n>\n> It's not an object but a variable, I'll fix this while at it.\n>\n> s/with an ipa/to its IPA/\n>\n> >\n> >  For example, adding the raspberrypi.mojom file to meson:\n> >\n> >  .. code-block:: none\n> >\n> > -        ipa_mojom_files = [\n> > -            'raspberrypi.mojom',\n> > +        pipeline_ipa_mojom_mapping = [\n> > +            'rpi/vc4': 'raspberrypi.mojom',\n> >          ]\n> >\n> >  This will cause the mojo data definition file to be compiled. Specifically, it\n> >  generates five files:\n> >\n> >  - a header describing the custom data structures, and the complete IPA\n> > -  interface (at {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_interface.h)\n> > +  interface (at {$build_dir}/include/libcamera/ipa/{interface}_ipa_interface.h)\n> >\n> >  - a serializer implementing de/serialization for the custom data structures (at\n> > -  {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_serializer.h)\n> > +  {$build_dir}/include/libcamera/ipa/{interface}_ipa_serializer.h)\n> >\n> >  - a proxy header describing a specialized IPA proxy (at\n> > -  {$build_dir}/include/libcamera/ipa/{pipeline}_ipa_proxy.h)\n> > +  {$build_dir}/include/libcamera/ipa/{interface}_ipa_proxy.h)\n> >\n> >  - a proxy source implementing the IPA proxy (at\n> > -  {$build_dir}/src/libcamera/proxy/{pipeline}_ipa_proxy.cpp)\n> > +  {$build_dir}/src/libcamera/proxy/{interface}_ipa_proxy.cpp)\n> >\n> >  - a proxy worker source implementing the other end of the IPA proxy (at\n> > -  {$build_dir}/src/libcamera/proxy/worker/{pipeline}_ipa_proxy_worker.cpp)\n> > +  {$build_dir}/src/libcamera/proxy/worker/{interface}_ipa_proxy_worker.cpp)\n> >\n> >  The IPA proxy serves as the layer between the pipeline handler and the IPA, and\n> >  handles threading vs isolation transparently. The pipeline handler and the IPA\n> > @@ -312,7 +323,7 @@ file, the following header must be included:\n> >\n> >  .. code-block:: C++\n> >\n> > -   #include <libcamera/ipa/{pipeline_name}_ipa_interface.h>\n> > +   #include <libcamera/ipa/{interface_name}_ipa_interface.h>\n> >\n> >  The POD types of the structs simply become their C++ counterparts, eg. uint32\n> >  in mojo will become uint32_t in C++. mojo map becomes C++ std::map, and mojo\n> > diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> > index 442ca3dd7e1c..c57b3a5e1570 100644\n> > --- a/include/libcamera/ipa/meson.build\n> > +++ b/include/libcamera/ipa/meson.build\n> > @@ -60,13 +60,15 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n> >                        './' +'@INPUT@'\n> >                    ])\n> >\n> > -ipa_mojom_files = [\n> > -    'ipu3.mojom',\n> > -    'raspberrypi.mojom',\n> > -    'rkisp1.mojom',\n> > -    'vimc.mojom',\n> > -]\n> > -\n> > +# Mapping from pipeline handler name to mojom file\n> > +pipeline_ipa_mojom_mapping = {\n> > +    'ipu3': 'ipu3.mojom',\n> > +    'rkisp1': 'rkisp1.mojom',\n> > +    'raspberrypi': 'raspberrypi.mojom',\n> > +    'vimc': 'vimc.mojom',\n> > +}\n> > +\n> > +ipa_mojom_files = []\n> >  ipa_mojoms = []\n> >\n> >  #\n> > @@ -75,14 +77,22 @@ ipa_mojoms = []\n> >\n> >  # TODO Define per-pipeline ControlInfoMap with yaml?\n> >\n> > -foreach file : ipa_mojom_files\n> > +foreach pipeline, file : pipeline_ipa_mojom_mapping\n> > +\n>\n> No need for a blank line.\n>\n> I'll apply all these small changes, no need to resubmit.\n\nThanks for that!\n\nRegards,\nNaush\n\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> >      name = file.split('.')[0]\n> >\n> > -    if name not in pipelines\n> > +    # Ensure we do not build duplicate mojom modules\n> > +    if file in ipa_mojom_files\n> > +        continue\n> > +    endif\n> > +\n> > +    ipa_mojom_files += file\n> > +\n> > +    if pipeline not in pipelines\n> >          continue\n> >      endif\n> >\n> > -    # {pipeline}.mojom-module\n> > +    # {interface}.mojom-module\n> >      mojom = custom_target(name + '_mojom_module',\n> >                            input : file,\n> >                            output : file + '-module',\n> > @@ -94,7 +104,7 @@ foreach file : ipa_mojom_files\n> >                                '--mojoms', '@INPUT@'\n> >                            ])\n> >\n> > -    # {pipeline}_ipa_interface.h\n> > +    # {interface}_ipa_interface.h\n> >      header = custom_target(name + '_ipa_interface_h',\n> >                             input : mojom,\n> >                             output : name + '_ipa_interface.h',\n> > @@ -110,7 +120,7 @@ foreach file : ipa_mojom_files\n> >                                 './' +'@INPUT@'\n> >                             ])\n> >\n> > -    # {pipeline}_ipa_serializer.h\n> > +    # {interface}_ipa_serializer.h\n> >      serializer = custom_target(name + '_ipa_serializer_h',\n> >                                 input : mojom,\n> >                                 output : name + '_ipa_serializer.h',\n> > @@ -124,7 +134,7 @@ foreach file : ipa_mojom_files\n> >                                     './' +'@INPUT@'\n> >                                 ])\n> >\n> > -    # {pipeline}_ipa_proxy.h\n> > +    # {interface}_ipa_proxy.h\n> >      proxy_header = custom_target(name + '_proxy_h',\n> >                                   input : mojom,\n> >                                   output : name + '_ipa_proxy.h',\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 069B3BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 May 2023 16:26:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8F317633B1;\n\tThu,  4 May 2023 18:26:43 +0200 (CEST)","from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com\n\t[IPv6:2607:f8b0:4864:20::b34])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0876D627DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 May 2023 18:26:42 +0200 (CEST)","by mail-yb1-xb34.google.com with SMTP id\n\t3f1490d57ef6-b9d9dad9edfso1010989276.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 04 May 2023 09:26:41 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1683217603;\n\tbh=QJApTp2HRU24LvfZqCKun0QwG8XJ1La4AQXmCoj5kR4=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=S4VEQfjdhNXJGTiVyBjZRdi8O1j4Wbt0P1zKxX12qKRYjycMIHW6M/Fz9rMs5wQSG\n\tvWqnsqTBaTklx5OvGpe0Eori7zIo0fMdd15ecQJzg7PAJGNywl0w1BBRwGCI2d+sRQ\n\tMUv+JHaCe0rQlyj3uOokIf/FYZRuPYTNAhAyt/Q3mhxEyIyXd522KEnMfdTFM+/psP\n\txR1ta6LheXmag/BmrAn3bhho65ef4Q+2EPA29KT4BYbnN1aWDvVVRSP4bifHjPQcZ2\n\tmPzJeN8WreJsqNY6/cvjJqJ3gKHwdHnhMRD9AmouEffMt8rjQn1xzd8IFzGxvduwdR\n\t87j4nOT09Sd2A==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1683217601; x=1685809601;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=y4Oq75Mg1epf4uSr5d1wiryIz5HGKgE/CzmUUCVauSc=;\n\tb=pPrlMrHnedBHfnINlMqqbWfzq7k2xqbrQrBQfGaQJS/YmZ2c89EcmCRg2+zFJAcHF1\n\tYEyE/bKeSGMhDszVLbt2Qk5EAY7Sstg5DPT0kEGIZ6Q76jua3DR5FfnSubncBLnFgQw8\n\tQk44pmo6FVJH8Xi1o2UJX8JFGkfu2gpbCSTpYhrB72hQpxk6TTYK/DgmwbigJ2ecVf+G\n\tLWvGmkWW4xxklguwoVyq5qmS7GbNoI3VwPZnpIRvn8aTmq3KdpUiObB24xbX8KBCIAqw\n\tDb15Unt2cwDLBS1Omy1k4VQb+ijTqX7bAcAAzdpQtlr1VFM7QI3I8fLYfOsxhJPaPOFR\n\tLRfg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"pPrlMrHn\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1683217601; x=1685809601;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=y4Oq75Mg1epf4uSr5d1wiryIz5HGKgE/CzmUUCVauSc=;\n\tb=TnKeJTzZq3nrO84C8yA3Mmtct+inPc71ejGF0RpXWFNtTBwp4w9Jx8fcXLtYLzrccp\n\tRDAD6MOpogKr+H5smqmDF8vFiQBJFVdl/eN1sWEDxLmn02N/P/ZZ0H8sbL0x2uId5b7i\n\tau23Zaxty8hCd5Ha5df1UqDPGa2lKrnZaNo5AVfyZKpJtbOJR03bRbUIFY8Ph3xYzHve\n\t82LyrLsyoqohWbR3UoqK2l00xz/3DmFhYBrBPn+02L0C8wXARY8jSielRSFf36ksjmTc\n\tFNz1Ow/vMU2Z8FVawE6p05FleZsj5z2/mLYoSEIoeaj8XhwzSG+rHTAAJ65Ncog0Yf1a\n\tOs1Q==","X-Gm-Message-State":"AC+VfDzWOm4Oy23buoytOC3GlZdNQ1Kes8t9CKCoolf+OdSwWgwpPEXv\n\tMSiRW6BS4rvtKz56OvaVzaJZPD7Z0Zq4ZHVb30mkWT9x/syiDdan1mQ=","X-Google-Smtp-Source":"ACHHUZ4rukcCj/yCDehSqhNI3mv/KSha0lyg4ujdtpcRAqpUaj6qSR8jt7rz3GMkpKXEL8HWhQEEXMrCUSZNvw7bX5k=","X-Received":"by 2002:a25:adca:0:b0:b69:8770:9d95 with SMTP id\n\td10-20020a25adca000000b00b6987709d95mr569004ybe.17.1683217600769;\n\tThu, 04 May 2023 09:26:40 -0700 (PDT)","MIME-Version":"1.0","References":"<20230503122035.32026-1-naush@raspberrypi.com>\n\t<20230503122035.32026-2-naush@raspberrypi.com>\n\t<20230504153831.GM4551@pendragon.ideasonboard.com>","In-Reply-To":"<20230504153831.GM4551@pendragon.ideasonboard.com>","Date":"Thu, 4 May 2023 17:26:24 +0100","Message-ID":"<CAEmqJPogCzd3WkYuA-xHzgtqR8AMx0ixmTj_uKGbD6v81TS3gQ@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 01/13] meson: ipa: Add mapping for\n\tpipeline handler to mojom interface file","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]