[{"id":26952,"web_url":"https://patchwork.libcamera.org/comment/26952/","msgid":"<iqwyioneef36djfozyziqobp7bliwcznrcc7szijijc5xsytmr@wpl7h4h5ykyh>","date":"2023-04-27T08:18:41","subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush,\n\nOn Wed, Apr 26, 2023 at 02:10:47PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Split the Raspberry Pi pipeline handler code into common and VC4/BCM2835\n> specific file structures.\n>\n> The common code files now live in src/libcamera/pipeline/rpi/common/\n> and the vc4 specific files in src/libcamera/pipeline/rpi/vc4/.\n>\n> To build the pipeline handler, the meson configuration option to select\n> the Raspberry Pi pipeline handler has now changed from \"raspberrypi\" to\n> \"rpi/vc4\":\n>\n> meson setup build -Dpipelines=rpi/vc4\n>\n> There are no functional changes in the pipeline handler code itself.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nLooks good!\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> ---\n>  Documentation/environment_variables.rst                  | 2 +-\n>  Documentation/guides/introduction.rst                    | 2 +-\n>  Documentation/guides/ipa.rst                             | 2 +-\n>  Documentation/guides/pipeline-handler.rst                | 2 +-\n>  include/libcamera/ipa/meson.build                        | 2 +-\n>  meson.build                                              | 2 +-\n>  meson_options.txt                                        | 2 +-\n>  src/libcamera/pipeline/meson.build                       | 9 +++++++++\n>  .../{raspberrypi => rpi/common}/delayed_controls.cpp     | 0\n>  .../{raspberrypi => rpi/common}/delayed_controls.h       | 0\n>  src/libcamera/pipeline/rpi/common/meson.build            | 8 ++++++++\n>  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp  | 0\n>  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.h    | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/data/example.yaml  | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/data/meson.build   | 2 +-\n>  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp      | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h        | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/meson.build        | 2 --\n>  .../pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp    | 2 +-\n>  19 files changed, 26 insertions(+), 11 deletions(-)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.h (100%)\n>  create mode 100644 src/libcamera/pipeline/rpi/common/meson.build\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.h (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/example.yaml (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/meson.build (63%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/meson.build (71%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp (99%)\n>\n> diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst\n> index ceeb251a2ac0..4bf38b877897 100644\n> --- a/Documentation/environment_variables.rst\n> +++ b/Documentation/environment_variables.rst\n> @@ -40,7 +40,7 @@ LIBCAMERA_IPA_MODULE_PATH\n>  LIBCAMERA_RPI_CONFIG_FILE\n>     Define a custom configuration file to use in the Raspberry Pi pipeline handler.\n>\n> -   Example value: ``/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml``\n> +   Example value: ``/usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml``\n>\n>  Further details\n>  ---------------\n> diff --git a/Documentation/guides/introduction.rst b/Documentation/guides/introduction.rst\n> index 2d1760c1866b..700ec2d33c30 100644\n> --- a/Documentation/guides/introduction.rst\n> +++ b/Documentation/guides/introduction.rst\n> @@ -288,7 +288,7 @@ with dedicated pipeline handlers:\n>\n>     -  Intel IPU3 (ipu3)\n>     -  Rockchip RK3399 (rkisp1)\n> -   -  RaspberryPi 3 and 4 (raspberrypi)\n> +   -  RaspberryPi 3 and 4 (rpi/vc4)\n>\n>  Furthermore, generic platform support is provided for the following:\n>\n> diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> index 89839408672a..10301d89fc80 100644\n> --- a/Documentation/guides/ipa.rst\n> +++ b/Documentation/guides/ipa.rst\n> @@ -279,7 +279,7 @@ For example, adding the raspberrypi.mojom file to meson:\n>  .. code-block:: none\n>\n>          pipeline_ipa_mojom_mapping = [\n> -            'raspberrypi': 'raspberrypi.mojom',\n> +            'rpi/vc4': 'raspberrypi.mojom',\n>          ]\n>\n>  This will cause the mojo data definition file to be compiled. Specifically, it\n> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> index 4d38fa23fbcd..7d143b0eaecb 100644\n> --- a/Documentation/guides/pipeline-handler.rst\n> +++ b/Documentation/guides/pipeline-handler.rst\n> @@ -183,7 +183,7 @@ to the libcamera build options in the top level ``meson_options.txt``.\n>\n>     option('pipelines',\n>             type : 'array',\n> -           choices : ['ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n> +           choices : ['ipu3', 'rpi/vc4', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n>             description : 'Select which pipeline handlers to include')\n>\n>\n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 67c31cb04ccf..bae15d64d7d8 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -64,7 +64,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n>  pipeline_ipa_mojom_mapping = {\n>      'ipu3': 'ipu3.mojom',\n>      'rkisp1': 'rkisp1.mojom',\n> -    'raspberrypi': 'raspberrypi.mojom',\n> +    'rpi/vc4': 'raspberrypi.mojom',\n>      'vimc': 'vimc.mojom',\n>  }\n>\n> diff --git a/meson.build b/meson.build\n> index 8628e6acebee..f60da3e17719 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -179,7 +179,7 @@ arch_x86 = ['x86', 'x86_64']\n>  pipelines_support = {\n>      'imx8-isi':     arch_arm,\n>      'ipu3':         arch_x86,\n> -    'raspberrypi':  arch_arm,\n> +    'rpi/vc4':      arch_arm,\n>      'rkisp1':       arch_arm,\n>      'simple':       arch_arm,\n>      'uvcvideo':     ['any'],\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 78a78b7214d5..e1f4c205aa94 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -43,7 +43,7 @@ option('pipelines',\n>              'auto',\n>              'imx8-isi',\n>              'ipu3',\n> -            'raspberrypi',\n> +            'rpi/vc4',\n>              'rkisp1',\n>              'simple',\n>              'uvcvideo',\n> diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build\n> index f14869f3a3c0..4f55611013db 100644\n> --- a/src/libcamera/pipeline/meson.build\n> +++ b/src/libcamera/pipeline/meson.build\n> @@ -3,6 +3,15 @@\n>  # Location of pipeline specific configuration files\n>  pipeline_data_dir = libcamera_datadir / 'pipeline'\n>\n> +# If the Raspberry Pi VC4 pipeline handler is enabled, ensure we include the\n> +# rpi/common subdirectory in the build.\n> +#\n> +# This is done here and not within rpi/vc4/meson.build as meson does not\n> +# allow the subdir command to traverse up the directory tree.\n> +if pipelines.contains('rpi/vc4')\n> +    subdir('rpi/common')\n> +endif\n> +\n>  foreach pipeline : pipelines\n>      subdir(pipeline)\n>  endforeach\n> diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.cpp b/src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/delayed_controls.cpp\n> rename to src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/rpi/common/delayed_controls.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/delayed_controls.h\n> rename to src/libcamera/pipeline/rpi/common/delayed_controls.h\n> diff --git a/src/libcamera/pipeline/rpi/common/meson.build b/src/libcamera/pipeline/rpi/common/meson.build\n> new file mode 100644\n> index 000000000000..1dec6d3d028b\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rpi/common/meson.build\n> @@ -0,0 +1,8 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_sources += files([\n> +    'delayed_controls.cpp',\n> +    'rpi_stream.cpp',\n> +])\n> +\n> +includes += include_directories('.')\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> rename to src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> rename to src/libcamera/pipeline/rpi/common/rpi_stream.h\n> diff --git a/src/libcamera/pipeline/raspberrypi/data/example.yaml b/src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/data/example.yaml\n> rename to src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> similarity index 63%\n> rename from src/libcamera/pipeline/raspberrypi/data/meson.build\n> rename to src/libcamera/pipeline/rpi/vc4/data/meson.build\n> index 1c70433bbcbc..a7dfa02320e5 100644\n> --- a/src/libcamera/pipeline/raspberrypi/data/meson.build\n> +++ b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> @@ -5,4 +5,4 @@ conf_files = files([\n>  ])\n>\n>  install_data(conf_files,\n> -             install_dir : pipeline_data_dir / 'raspberrypi')\n> +             install_dir : pipeline_data_dir / 'rpi/vc4')\n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/dma_heaps.h\n> rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> diff --git a/src/libcamera/pipeline/raspberrypi/meson.build b/src/libcamera/pipeline/rpi/vc4/meson.build\n> similarity index 71%\n> rename from src/libcamera/pipeline/raspberrypi/meson.build\n> rename to src/libcamera/pipeline/rpi/vc4/meson.build\n> index 59e8fb18c555..228823f30922 100644\n> --- a/src/libcamera/pipeline/raspberrypi/meson.build\n> +++ b/src/libcamera/pipeline/rpi/vc4/meson.build\n> @@ -1,10 +1,8 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n>  libcamera_sources += files([\n> -    'delayed_controls.cpp',\n>      'dma_heaps.cpp',\n>      'raspberrypi.cpp',\n> -    'rpi_stream.cpp',\n>  ])\n>\n>  subdir('data')\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> similarity index 99%\n> rename from src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> rename to src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> index a4fff28bf198..4595773d2517 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2019-2021, Raspberry Pi Ltd\n>   *\n> - * raspberrypi.cpp - Pipeline handler for Raspberry Pi devices\n> + * raspberrypi.cpp - Pipeline handler for VC4 based Raspberry Pi devices\n>   */\n>  #include <algorithm>\n>  #include <assert.h>\n> --\n> 2.34.1\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 130C5BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 08:18:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 81FC8627E0;\n\tThu, 27 Apr 2023 10:18:45 +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 1A68E627D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 10:18:44 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:1cf0:b3bc:c785:4625])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 13EEAC7E;\n\tThu, 27 Apr 2023 10:18:32 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682583525;\n\tbh=d/Myk3Ge11jQegzo8nVvE65XBd0JvMnK2+j6NBv3Bwc=;\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=u8XiuY9rtEMiCwJfqIQmQUQ7ZGe3iXpIsGbLzUn+SJLC3VKd16k8v/JjAjF+SGei9\n\tfMiDK0uEfoPI2lY5d62KwIFlbWtwySwbQle/d+90HMj0j9shRl+3U2hx29xtss9iQW\n\tEeGATRaFJ4Vpblaz9RHUsrhuRfWSmoE6nKkPUCrBiS1CwbusteW1gqrkHCP6iYUQXM\n\toc0AojMAt/Zef+bnBg1J5sQ2v22WtCyfX3BwoBp0OYt/g3x17kACwq/Sw+AKOEzHyd\n\tAOcAC1Peor9LxDPMakYEJwf3QElXtHoP/AI4b9dDESgXQmxMjgAQbLzYRZz3jWLu9T\n\t7QGST7PyLr6OA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682583512;\n\tbh=d/Myk3Ge11jQegzo8nVvE65XBd0JvMnK2+j6NBv3Bwc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eTUt2ad/qMeenQVtwcjith2TW8z8CRCHREKhKoyLYbRRJ2i/lprM/Lrr+haZLeCmH\n\t/rbRNMgab41xRYo0IkVWeOqJZZDlKjczfWsho9mINO9TjcAO89/255E237JCOXS/2f\n\t91XOsTwCqcWLw7hmPcP8WSJAoGofbHHS0oHt4lQE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"eTUt2ad/\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 10:18:41 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<iqwyioneef36djfozyziqobp7bliwcznrcc7szijijc5xsytmr@wpl7h4h5ykyh>","References":"<20230426131057.21550-1-naush@raspberrypi.com>\n\t<20230426131057.21550-4-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230426131057.21550-4-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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.mondi@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":26964,"web_url":"https://patchwork.libcamera.org/comment/26964/","msgid":"<20230427131447.GA26786@pendragon.ideasonboard.com>","date":"2023-04-27T13:14:47","subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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, Apr 26, 2023 at 02:10:47PM +0100, Naushir Patuck via libcamera-devel wrote:\n> Split the Raspberry Pi pipeline handler code into common and VC4/BCM2835\n> specific file structures.\n> \n> The common code files now live in src/libcamera/pipeline/rpi/common/\n> and the vc4 specific files in src/libcamera/pipeline/rpi/vc4/.\n> \n> To build the pipeline handler, the meson configuration option to select\n> the Raspberry Pi pipeline handler has now changed from \"raspberrypi\" to\n> \"rpi/vc4\":\n> \n> meson setup build -Dpipelines=rpi/vc4\n\nThis breaks the selection of IPA modules in src/ipa/meson.build:\n\nforeach pipeline : pipelines\n    if ipa_modules.contains(pipeline)\n        subdir(pipeline)\n        ipa_names += ipa_install_dir / ipa_name + '.so'\n        enabled_ipa_modules += pipeline\n    endif\nendforeach\n\n> There are no functional changes in the pipeline handler code itself.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  Documentation/environment_variables.rst                  | 2 +-\n>  Documentation/guides/introduction.rst                    | 2 +-\n>  Documentation/guides/ipa.rst                             | 2 +-\n>  Documentation/guides/pipeline-handler.rst                | 2 +-\n>  include/libcamera/ipa/meson.build                        | 2 +-\n>  meson.build                                              | 2 +-\n>  meson_options.txt                                        | 2 +-\n>  src/libcamera/pipeline/meson.build                       | 9 +++++++++\n>  .../{raspberrypi => rpi/common}/delayed_controls.cpp     | 0\n>  .../{raspberrypi => rpi/common}/delayed_controls.h       | 0\n>  src/libcamera/pipeline/rpi/common/meson.build            | 8 ++++++++\n>  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp  | 0\n>  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.h    | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/data/example.yaml  | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/data/meson.build   | 2 +-\n>  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp      | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h        | 0\n>  .../pipeline/{raspberrypi => rpi/vc4}/meson.build        | 2 --\n>  .../pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp    | 2 +-\n>  19 files changed, 26 insertions(+), 11 deletions(-)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.h (100%)\n>  create mode 100644 src/libcamera/pipeline/rpi/common/meson.build\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.h (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/example.yaml (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/meson.build (63%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h (100%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/meson.build (71%)\n>  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp (99%)\n> \n> diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst\n> index ceeb251a2ac0..4bf38b877897 100644\n> --- a/Documentation/environment_variables.rst\n> +++ b/Documentation/environment_variables.rst\n> @@ -40,7 +40,7 @@ LIBCAMERA_IPA_MODULE_PATH\n>  LIBCAMERA_RPI_CONFIG_FILE\n>     Define a custom configuration file to use in the Raspberry Pi pipeline handler.\n>  \n> -   Example value: ``/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml``\n> +   Example value: ``/usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml``\n>  \n>  Further details\n>  ---------------\n> diff --git a/Documentation/guides/introduction.rst b/Documentation/guides/introduction.rst\n> index 2d1760c1866b..700ec2d33c30 100644\n> --- a/Documentation/guides/introduction.rst\n> +++ b/Documentation/guides/introduction.rst\n> @@ -288,7 +288,7 @@ with dedicated pipeline handlers:\n>  \n>     -  Intel IPU3 (ipu3)\n>     -  Rockchip RK3399 (rkisp1)\n> -   -  RaspberryPi 3 and 4 (raspberrypi)\n> +   -  RaspberryPi 3 and 4 (rpi/vc4)\n>  \n>  Furthermore, generic platform support is provided for the following:\n>  \n> diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> index 89839408672a..10301d89fc80 100644\n> --- a/Documentation/guides/ipa.rst\n> +++ b/Documentation/guides/ipa.rst\n> @@ -279,7 +279,7 @@ For example, adding the raspberrypi.mojom file to meson:\n>  .. code-block:: none\n>  \n>          pipeline_ipa_mojom_mapping = [\n> -            'raspberrypi': 'raspberrypi.mojom',\n> +            'rpi/vc4': 'raspberrypi.mojom',\n>          ]\n>  \n>  This will cause the mojo data definition file to be compiled. Specifically, it\n> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> index 4d38fa23fbcd..7d143b0eaecb 100644\n> --- a/Documentation/guides/pipeline-handler.rst\n> +++ b/Documentation/guides/pipeline-handler.rst\n> @@ -183,7 +183,7 @@ to the libcamera build options in the top level ``meson_options.txt``.\n>  \n>     option('pipelines',\n>             type : 'array',\n> -           choices : ['ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n> +           choices : ['ipu3', 'rpi/vc4', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n\n'rpi/vc4' should now go after 'rkisp1' in alphabetical order.\n\n>             description : 'Select which pipeline handlers to include')\n>  \n>  \n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 67c31cb04ccf..bae15d64d7d8 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -64,7 +64,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n>  pipeline_ipa_mojom_mapping = {\n>      'ipu3': 'ipu3.mojom',\n>      'rkisp1': 'rkisp1.mojom',\n> -    'raspberrypi': 'raspberrypi.mojom',\n> +    'rpi/vc4': 'raspberrypi.mojom',\n>      'vimc': 'vimc.mojom',\n>  }\n>  \n> diff --git a/meson.build b/meson.build\n> index 8628e6acebee..f60da3e17719 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -179,7 +179,7 @@ arch_x86 = ['x86', 'x86_64']\n>  pipelines_support = {\n>      'imx8-isi':     arch_arm,\n>      'ipu3':         arch_x86,\n> -    'raspberrypi':  arch_arm,\n> +    'rpi/vc4':      arch_arm,\n\nThis should also go after 'rkisp1'. Same below, and possibly in other\npatches in this series.\n\n>      'rkisp1':       arch_arm,\n>      'simple':       arch_arm,\n>      'uvcvideo':     ['any'],\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 78a78b7214d5..e1f4c205aa94 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -43,7 +43,7 @@ option('pipelines',\n>              'auto',\n>              'imx8-isi',\n>              'ipu3',\n> -            'raspberrypi',\n> +            'rpi/vc4',\n>              'rkisp1',\n>              'simple',\n>              'uvcvideo',\n> diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build\n> index f14869f3a3c0..4f55611013db 100644\n> --- a/src/libcamera/pipeline/meson.build\n> +++ b/src/libcamera/pipeline/meson.build\n> @@ -3,6 +3,15 @@\n>  # Location of pipeline specific configuration files\n>  pipeline_data_dir = libcamera_datadir / 'pipeline'\n>  \n> +# If the Raspberry Pi VC4 pipeline handler is enabled, ensure we include the\n> +# rpi/common subdirectory in the build.\n> +#\n> +# This is done here and not within rpi/vc4/meson.build as meson does not\n> +# allow the subdir command to traverse up the directory tree.\n> +if pipelines.contains('rpi/vc4')\n> +    subdir('rpi/common')\n> +endif\n\nI don't like how this becomes a special case :-S If we want to support\nmulti-level directory trees instead of a flat hierarchy, this should be\nautomatic.\n\nWe could do something like this:\n\n----\nsubdirs = []\n\nforeach pipeline : pipelines\n    pipeline = pipeline.split('/')[0]\n    if pipeline in subdirs\n        continue\n    endif\n\n    subdir(pipeline)\n    subdirs += [pipeline]\nendforeach\n----\n\nThe logic in src/libcamera/pipeline/rpi/meson.build would be similar,\niterating over all pipelines and selecting the ones that start with\n'rpi' only. Something like the following should hopefully work:\n\n----\n# SPDX-License-Identifier: CC0-1.0\n\nsubdir('common')\n\nforeach pipeline : pipelines\n    pipeline = pipeline.split('/')\n    if pipeline.length() < 2 or pipeline[0] != 'rpi'\n        continue\n    endif\n\n    subdir(pipeline[1])\nendforeach\n----\n\n> +\n>  foreach pipeline : pipelines\n>      subdir(pipeline)\n>  endforeach\n> diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.cpp b/src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/delayed_controls.cpp\n> rename to src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/rpi/common/delayed_controls.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/delayed_controls.h\n> rename to src/libcamera/pipeline/rpi/common/delayed_controls.h\n> diff --git a/src/libcamera/pipeline/rpi/common/meson.build b/src/libcamera/pipeline/rpi/common/meson.build\n> new file mode 100644\n> index 000000000000..1dec6d3d028b\n> --- /dev/null\n> +++ b/src/libcamera/pipeline/rpi/common/meson.build\n> @@ -0,0 +1,8 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_sources += files([\n> +    'delayed_controls.cpp',\n> +    'rpi_stream.cpp',\n> +])\n> +\n> +includes += include_directories('.')\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> rename to src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> rename to src/libcamera/pipeline/rpi/common/rpi_stream.h\n> diff --git a/src/libcamera/pipeline/raspberrypi/data/example.yaml b/src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/data/example.yaml\n> rename to src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> similarity index 63%\n> rename from src/libcamera/pipeline/raspberrypi/data/meson.build\n> rename to src/libcamera/pipeline/rpi/vc4/data/meson.build\n> index 1c70433bbcbc..a7dfa02320e5 100644\n> --- a/src/libcamera/pipeline/raspberrypi/data/meson.build\n> +++ b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> @@ -5,4 +5,4 @@ conf_files = files([\n>  ])\n>  \n>  install_data(conf_files,\n> -             install_dir : pipeline_data_dir / 'raspberrypi')\n> +             install_dir : pipeline_data_dir / 'rpi/vc4')\n\n             install_dir : pipeline_data_dir / 'rpi' / 'vc4')\n\n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> similarity index 100%\n> rename from src/libcamera/pipeline/raspberrypi/dma_heaps.h\n> rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> diff --git a/src/libcamera/pipeline/raspberrypi/meson.build b/src/libcamera/pipeline/rpi/vc4/meson.build\n> similarity index 71%\n> rename from src/libcamera/pipeline/raspberrypi/meson.build\n> rename to src/libcamera/pipeline/rpi/vc4/meson.build\n> index 59e8fb18c555..228823f30922 100644\n> --- a/src/libcamera/pipeline/raspberrypi/meson.build\n> +++ b/src/libcamera/pipeline/rpi/vc4/meson.build\n> @@ -1,10 +1,8 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libcamera_sources += files([\n> -    'delayed_controls.cpp',\n>      'dma_heaps.cpp',\n\nI wondered if this could be a good candidate for the common directory,\nbut I think we should turn it into a core libcamera helper if it gets\nshared by multiple pipeline handlers, so I'm happy to leave it here.\n\n>      'raspberrypi.cpp',\n> -    'rpi_stream.cpp',\n>  ])\n>  \n>  subdir('data')\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> similarity index 99%\n> rename from src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> rename to src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> index a4fff28bf198..4595773d2517 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> @@ -2,7 +2,7 @@\n>  /*\n>   * Copyright (C) 2019-2021, Raspberry Pi Ltd\n>   *\n> - * raspberrypi.cpp - Pipeline handler for Raspberry Pi devices\n> + * raspberrypi.cpp - Pipeline handler for VC4 based Raspberry Pi devices\n\ns/VC4 based/VC4-based/\n\n>   */\n>  #include <algorithm>\n>  #include <assert.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 5E3BFBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 13:14:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B7EC6627DF;\n\tThu, 27 Apr 2023 15:14:37 +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 63650627B7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 15:14:36 +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 4A5B89DE;\n\tThu, 27 Apr 2023 15:14:22 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682601277;\n\tbh=W7JcLknH/rgSl6CbyufLXRrvEtBeY0oh/UV8gWdEnV0=;\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=N4iag2crlLrqNIhO4ghyGVBog8gaqeCtyUtwjqWeVIeiaNkXJEITB+4e87qAbwIMY\n\talHbL7amtNjJJRA1pBmpLyN9JcjTtl4twREuSumCQodf/Kr558rLVEqjNt/p7Fva8j\n\tRjgt8J1B5LBgjZIep2CtDu9pgdJF01CdBj1Pv0DD7RRK75KFe0F/O4+z26n0IrU0uo\n\tH/OdxHS9cNJNtWe0jEvqeJ6UM/jER4JkGbdz2iyM4t2Hvr2RoUUPKjalPpGnRg6HDQ\n\tvMoWbp4OXYJAEwUvcmyu0ocrvb2mcTsNbMklqzMYyhoH3d8qKcpcsPC+Y7CWLSjnTG\n\tKeAOJIjJgpVEg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682601264;\n\tbh=W7JcLknH/rgSl6CbyufLXRrvEtBeY0oh/UV8gWdEnV0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=gmTaUrbyVlEYLH90lChmN4r6/YtKiOxpGZJwhivAo3pjYc9MQKa94mnw+eRjxLVsg\n\tQFbBM/hKl8ydkyDhf/5vC+cr8smUg9Tny8+iauC7w963Koyyp/+u4sVKx4b6uxw4Mf\n\te6lJkwU2YP8UTV8cGGUUZschWryN3vC+m4O2Vdew="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"gmTaUrby\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 16:14:47 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230427131447.GA26786@pendragon.ideasonboard.com>","References":"<20230426131057.21550-1-naush@raspberrypi.com>\n\t<20230426131057.21550-4-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230426131057.21550-4-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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":26968,"web_url":"https://patchwork.libcamera.org/comment/26968/","msgid":"<CAEmqJPoQsafofPWyk+9agW9JBQjTrcZRMpS=pba4HenoUPZ1nw@mail.gmail.com>","date":"2023-04-27T14:02:03","subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nThank you for your feedback.\n\nOn Thu, 27 Apr 2023 at 14:14, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Wed, Apr 26, 2023 at 02:10:47PM +0100, Naushir Patuck via libcamera-devel wrote:\n> > Split the Raspberry Pi pipeline handler code into common and VC4/BCM2835\n> > specific file structures.\n> >\n> > The common code files now live in src/libcamera/pipeline/rpi/common/\n> > and the vc4 specific files in src/libcamera/pipeline/rpi/vc4/.\n> >\n> > To build the pipeline handler, the meson configuration option to select\n> > the Raspberry Pi pipeline handler has now changed from \"raspberrypi\" to\n> > \"rpi/vc4\":\n> >\n> > meson setup build -Dpipelines=rpi/vc4\n>\n> This breaks the selection of IPA modules in src/ipa/meson.build:\n>\n> foreach pipeline : pipelines\n>     if ipa_modules.contains(pipeline)\n>         subdir(pipeline)\n>         ipa_names += ipa_install_dir / ipa_name + '.so'\n>         enabled_ipa_modules += pipeline\n>     endif\n> endforeach\n\nSorry, I forgot to note in my cover letter that patches 2 and 3 want to be\nsquashed before merging for this very reason. I've keep them separate for\neasier review.\n>\n> > There are no functional changes in the pipeline handler code itself.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  Documentation/environment_variables.rst                  | 2 +-\n> >  Documentation/guides/introduction.rst                    | 2 +-\n> >  Documentation/guides/ipa.rst                             | 2 +-\n> >  Documentation/guides/pipeline-handler.rst                | 2 +-\n> >  include/libcamera/ipa/meson.build                        | 2 +-\n> >  meson.build                                              | 2 +-\n> >  meson_options.txt                                        | 2 +-\n> >  src/libcamera/pipeline/meson.build                       | 9 +++++++++\n> >  .../{raspberrypi => rpi/common}/delayed_controls.cpp     | 0\n> >  .../{raspberrypi => rpi/common}/delayed_controls.h       | 0\n> >  src/libcamera/pipeline/rpi/common/meson.build            | 8 ++++++++\n> >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp  | 0\n> >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.h    | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/data/example.yaml  | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/data/meson.build   | 2 +-\n> >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp      | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h        | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/meson.build        | 2 --\n> >  .../pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp    | 2 +-\n> >  19 files changed, 26 insertions(+), 11 deletions(-)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.h (100%)\n> >  create mode 100644 src/libcamera/pipeline/rpi/common/meson.build\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.h (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/example.yaml (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/meson.build (63%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/meson.build (71%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp (99%)\n> >\n> > diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst\n> > index ceeb251a2ac0..4bf38b877897 100644\n> > --- a/Documentation/environment_variables.rst\n> > +++ b/Documentation/environment_variables.rst\n> > @@ -40,7 +40,7 @@ LIBCAMERA_IPA_MODULE_PATH\n> >  LIBCAMERA_RPI_CONFIG_FILE\n> >     Define a custom configuration file to use in the Raspberry Pi pipeline handler.\n> >\n> > -   Example value: ``/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml``\n> > +   Example value: ``/usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml``\n> >\n> >  Further details\n> >  ---------------\n> > diff --git a/Documentation/guides/introduction.rst b/Documentation/guides/introduction.rst\n> > index 2d1760c1866b..700ec2d33c30 100644\n> > --- a/Documentation/guides/introduction.rst\n> > +++ b/Documentation/guides/introduction.rst\n> > @@ -288,7 +288,7 @@ with dedicated pipeline handlers:\n> >\n> >     -  Intel IPU3 (ipu3)\n> >     -  Rockchip RK3399 (rkisp1)\n> > -   -  RaspberryPi 3 and 4 (raspberrypi)\n> > +   -  RaspberryPi 3 and 4 (rpi/vc4)\n> >\n> >  Furthermore, generic platform support is provided for the following:\n> >\n> > diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> > index 89839408672a..10301d89fc80 100644\n> > --- a/Documentation/guides/ipa.rst\n> > +++ b/Documentation/guides/ipa.rst\n> > @@ -279,7 +279,7 @@ For example, adding the raspberrypi.mojom file to meson:\n> >  .. code-block:: none\n> >\n> >          pipeline_ipa_mojom_mapping = [\n> > -            'raspberrypi': 'raspberrypi.mojom',\n> > +            'rpi/vc4': 'raspberrypi.mojom',\n> >          ]\n> >\n> >  This will cause the mojo data definition file to be compiled. Specifically, it\n> > diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> > index 4d38fa23fbcd..7d143b0eaecb 100644\n> > --- a/Documentation/guides/pipeline-handler.rst\n> > +++ b/Documentation/guides/pipeline-handler.rst\n> > @@ -183,7 +183,7 @@ to the libcamera build options in the top level ``meson_options.txt``.\n> >\n> >     option('pipelines',\n> >             type : 'array',\n> > -           choices : ['ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n> > +           choices : ['ipu3', 'rpi/vc4', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n>\n> 'rpi/vc4' should now go after 'rkisp1' in alphabetical order.\n>\n> >             description : 'Select which pipeline handlers to include')\n> >\n> >\n> > diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> > index 67c31cb04ccf..bae15d64d7d8 100644\n> > --- a/include/libcamera/ipa/meson.build\n> > +++ b/include/libcamera/ipa/meson.build\n> > @@ -64,7 +64,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n> >  pipeline_ipa_mojom_mapping = {\n> >      'ipu3': 'ipu3.mojom',\n> >      'rkisp1': 'rkisp1.mojom',\n> > -    'raspberrypi': 'raspberrypi.mojom',\n> > +    'rpi/vc4': 'raspberrypi.mojom',\n> >      'vimc': 'vimc.mojom',\n> >  }\n> >\n> > diff --git a/meson.build b/meson.build\n> > index 8628e6acebee..f60da3e17719 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -179,7 +179,7 @@ arch_x86 = ['x86', 'x86_64']\n> >  pipelines_support = {\n> >      'imx8-isi':     arch_arm,\n> >      'ipu3':         arch_x86,\n> > -    'raspberrypi':  arch_arm,\n> > +    'rpi/vc4':      arch_arm,\n>\n> This should also go after 'rkisp1'. Same below, and possibly in other\n> patches in this series.\n>\n> >      'rkisp1':       arch_arm,\n> >      'simple':       arch_arm,\n> >      'uvcvideo':     ['any'],\n> > diff --git a/meson_options.txt b/meson_options.txt\n> > index 78a78b7214d5..e1f4c205aa94 100644\n> > --- a/meson_options.txt\n> > +++ b/meson_options.txt\n> > @@ -43,7 +43,7 @@ option('pipelines',\n> >              'auto',\n> >              'imx8-isi',\n> >              'ipu3',\n> > -            'raspberrypi',\n> > +            'rpi/vc4',\n> >              'rkisp1',\n> >              'simple',\n> >              'uvcvideo',\n> > diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build\n> > index f14869f3a3c0..4f55611013db 100644\n> > --- a/src/libcamera/pipeline/meson.build\n> > +++ b/src/libcamera/pipeline/meson.build\n> > @@ -3,6 +3,15 @@\n> >  # Location of pipeline specific configuration files\n> >  pipeline_data_dir = libcamera_datadir / 'pipeline'\n> >\n> > +# If the Raspberry Pi VC4 pipeline handler is enabled, ensure we include the\n> > +# rpi/common subdirectory in the build.\n> > +#\n> > +# This is done here and not within rpi/vc4/meson.build as meson does not\n> > +# allow the subdir command to traverse up the directory tree.\n> > +if pipelines.contains('rpi/vc4')\n> > +    subdir('rpi/common')\n> > +endif\n>\n> I don't like how this becomes a special case :-S If we want to support\n> multi-level directory trees instead of a flat hierarchy, this should be\n> automatic.\n>\n> We could do something like this:\n>\n> ----\n> subdirs = []\n>\n> foreach pipeline : pipelines\n>     pipeline = pipeline.split('/')[0]\n>     if pipeline in subdirs\n>         continue\n>     endif\n>\n>     subdir(pipeline)\n>     subdirs += [pipeline]\n> endforeach\n> ----\n>\n> The logic in src/libcamera/pipeline/rpi/meson.build would be similar,\n> iterating over all pipelines and selecting the ones that start with\n> 'rpi' only. Something like the following should hopefully work:\n>\n> ----\n> # SPDX-License-Identifier: CC0-1.0\n>\n> subdir('common')\n>\n> foreach pipeline : pipelines\n>     pipeline = pipeline.split('/')\n>     if pipeline.length() < 2 or pipeline[0] != 'rpi'\n>         continue\n>     endif\n>\n>     subdir(pipeline[1])\n> endforeach\n> ----\n\nThis should be fine for the pipeline handler case, but the IPA case is a bit\nmore awkward to do in the IPA case as it appends ipa_name and\nenabled_ipa_modules\nin the outer loop.  Can you suggest a neat way to fix that?\n\nRegards,\nNaush\n\n>\n> > +\n> >  foreach pipeline : pipelines\n> >      subdir(pipeline)\n> >  endforeach\n> > diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.cpp b/src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/delayed_controls.cpp\n> > rename to src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> > diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/rpi/common/delayed_controls.h\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/delayed_controls.h\n> > rename to src/libcamera/pipeline/rpi/common/delayed_controls.h\n> > diff --git a/src/libcamera/pipeline/rpi/common/meson.build b/src/libcamera/pipeline/rpi/common/meson.build\n> > new file mode 100644\n> > index 000000000000..1dec6d3d028b\n> > --- /dev/null\n> > +++ b/src/libcamera/pipeline/rpi/common/meson.build\n> > @@ -0,0 +1,8 @@\n> > +# SPDX-License-Identifier: CC0-1.0\n> > +\n> > +libcamera_sources += files([\n> > +    'delayed_controls.cpp',\n> > +    'rpi_stream.cpp',\n> > +])\n> > +\n> > +includes += include_directories('.')\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > rename to src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > rename to src/libcamera/pipeline/rpi/common/rpi_stream.h\n> > diff --git a/src/libcamera/pipeline/raspberrypi/data/example.yaml b/src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/data/example.yaml\n> > rename to src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> > diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > similarity index 63%\n> > rename from src/libcamera/pipeline/raspberrypi/data/meson.build\n> > rename to src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > index 1c70433bbcbc..a7dfa02320e5 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/data/meson.build\n> > +++ b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > @@ -5,4 +5,4 @@ conf_files = files([\n> >  ])\n> >\n> >  install_data(conf_files,\n> > -             install_dir : pipeline_data_dir / 'raspberrypi')\n> > +             install_dir : pipeline_data_dir / 'rpi/vc4')\n>\n>              install_dir : pipeline_data_dir / 'rpi' / 'vc4')\n>\n> > diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> > rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> > diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> > similarity index 100%\n> > rename from src/libcamera/pipeline/raspberrypi/dma_heaps.h\n> > rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> > diff --git a/src/libcamera/pipeline/raspberrypi/meson.build b/src/libcamera/pipeline/rpi/vc4/meson.build\n> > similarity index 71%\n> > rename from src/libcamera/pipeline/raspberrypi/meson.build\n> > rename to src/libcamera/pipeline/rpi/vc4/meson.build\n> > index 59e8fb18c555..228823f30922 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/meson.build\n> > +++ b/src/libcamera/pipeline/rpi/vc4/meson.build\n> > @@ -1,10 +1,8 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >\n> >  libcamera_sources += files([\n> > -    'delayed_controls.cpp',\n> >      'dma_heaps.cpp',\n>\n> I wondered if this could be a good candidate for the common directory,\n> but I think we should turn it into a core libcamera helper if it gets\n> shared by multiple pipeline handlers, so I'm happy to leave it here.\n>\n> >      'raspberrypi.cpp',\n> > -    'rpi_stream.cpp',\n> >  ])\n> >\n> >  subdir('data')\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > similarity index 99%\n> > rename from src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > rename to src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > index a4fff28bf198..4595773d2517 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > @@ -2,7 +2,7 @@\n> >  /*\n> >   * Copyright (C) 2019-2021, Raspberry Pi Ltd\n> >   *\n> > - * raspberrypi.cpp - Pipeline handler for Raspberry Pi devices\n> > + * raspberrypi.cpp - Pipeline handler for VC4 based Raspberry Pi devices\n>\n> s/VC4 based/VC4-based/\n>\n> >   */\n> >  #include <algorithm>\n> >  #include <assert.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 C9E6ABDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 14:02:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 388B7627B7;\n\tThu, 27 Apr 2023 16:02:21 +0200 (CEST)","from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com\n\t[IPv6:2607:f8b0:4864:20::1134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 552E8627B7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 16:02:19 +0200 (CEST)","by mail-yw1-x1134.google.com with SMTP id\n\t00721157ae682-54fb9384c2dso100575407b3.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 07:02:19 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682604141;\n\tbh=3QZbJIAWnZOUbnfwORWVUuWCzSsH0YVtOtevzCPSkQ4=;\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=xMPD0FdFq87zsF/7WxK5Y1iyW+ajDhqtXxH+bmZ223zb+3dN7b9wIy6Af9U+j/rBW\n\tSV8//wEVXIFoPjkuDVT9ckUpA5tAEfbs6Eg7+RUWykn7+NJ3jbdzXLok0LKsrd37MM\n\tqtuBSd3E1838eMo9ASACFZ8QGZ5+okU34Eetws/GPrpQm57yxInqKYJ4oEkIwRa4Ml\n\t0llFKrE8PRjyFvU7tKAPbdqZvex0x+iBaFVlLaMt9qNfSsWTC35PTNeRLr27t5oNkA\n\t0dn+tcoE6EBxEXxCpC3bb5uNHMuEPOaiTElC1GHBMv5Z87DfuMa801ay4pGlEU/p7e\n\tfjkNXVBwpmPgg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682604138; x=1685196138;\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=YA4VnJVtFY0P3A0pBiSHBd9/1koujlpIg19/qEr0wv0=;\n\tb=GFwhAPtXtFwiQcjEWQooJ2Uv6KmDdQfBYDJCrSsTm8ugcq2HJDGL8O82yJJfgdN4+3\n\trjmTtoEp45iIMJIQiqGu0/wmwu6hh8m/GZPHuSumxoO+RW3zZhWXq3cBRoY1m/LL9oz0\n\tOrPE3990TYyd/S4KGmKjEt6KMqTlIlDCAVrji23tMgK5E1PsVXwQiQFVOpRPm/ykdcOc\n\t/IMIL/mV8/s0RS4lrf+LbRga7XKwRoc3zO0hWYw+pHb0v2r7KsP3sgyiopbEXaGTQ87z\n\tJ+bwMW41TZESD4iI1UNnhBrTPStPbUTMYh6Y+ZtFCjbo9rRx+riPcsfyVgbz5QanFxke\n\tOPpQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"GFwhAPtX\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682604138; x=1685196138;\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=YA4VnJVtFY0P3A0pBiSHBd9/1koujlpIg19/qEr0wv0=;\n\tb=BDd8d3BZX+UI1lwlwTajklPTljSnHt8DcOb1jDwkwhjq2YX2Wq6HRbVb1ldzCJ9SMy\n\tEJfiBuDuBLq310HuVkLpH0EYkfTDwwotBreWvhU1F6l7U8mBoFzH7W/d/DnXz3YxFthg\n\tuLyc0Qx3RH/0qMlW5mynlD0E1YVYvPUtgaovumYnjrKUOZcWq6pN2iDuv7USUJhm6E/C\n\tEDRv1qQHg/wQNZnXWF3warrf3toJhPe6f4K6QhVM9akdxU5Xcvwgh3QwZqIPrINHV9z1\n\tB6JOUX1UgPkRUpxCeaAI+U2F4Vmgh3Ybw3lyHcNRyqNKeb7nhPYSr9BwNNOaTcZ+SXVC\n\tycPw==","X-Gm-Message-State":"AC+VfDyogKWROPxKlHXbHHSAA3PTENf4/KHcV177kDhqAWmGM9mYgtFr\n\t4QbKGXKmtmjMj9Z7s6DHgon6JD9ZVHTFaQgMX16IamYNFkdBXF2kntwhzA==","X-Google-Smtp-Source":"ACHHUZ6rAlcwQhd2UFYYh0XfsPV8dnjMEDfI9U1cS70b6lIF5CR/OMKzaTPTlX1W+leUiitdby8/wwtnKxPrcvMcYHQ=","X-Received":"by 2002:a0d:d593:0:b0:54e:dc37:582 with SMTP id\n\tx141-20020a0dd593000000b0054edc370582mr1310776ywd.14.1682604137964;\n\tThu, 27 Apr 2023 07:02:17 -0700 (PDT)","MIME-Version":"1.0","References":"<20230426131057.21550-1-naush@raspberrypi.com>\n\t<20230426131057.21550-4-naush@raspberrypi.com>\n\t<20230427131447.GA26786@pendragon.ideasonboard.com>","In-Reply-To":"<20230427131447.GA26786@pendragon.ideasonboard.com>","Date":"Thu, 27 Apr 2023 15:02:03 +0100","Message-ID":"<CAEmqJPoQsafofPWyk+9agW9JBQjTrcZRMpS=pba4HenoUPZ1nw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26972,"web_url":"https://patchwork.libcamera.org/comment/26972/","msgid":"<20230427142438.GF28489@pendragon.ideasonboard.com>","date":"2023-04-27T14:24:38","subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Thu, Apr 27, 2023 at 03:02:03PM +0100, Naushir Patuck wrote:\n> On Thu, 27 Apr 2023 at 14:14, Laurent Pinchart wrote:\n> > On Wed, Apr 26, 2023 at 02:10:47PM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > Split the Raspberry Pi pipeline handler code into common and VC4/BCM2835\n> > > specific file structures.\n> > >\n> > > The common code files now live in src/libcamera/pipeline/rpi/common/\n> > > and the vc4 specific files in src/libcamera/pipeline/rpi/vc4/.\n> > >\n> > > To build the pipeline handler, the meson configuration option to select\n> > > the Raspberry Pi pipeline handler has now changed from \"raspberrypi\" to\n> > > \"rpi/vc4\":\n> > >\n> > > meson setup build -Dpipelines=rpi/vc4\n> >\n> > This breaks the selection of IPA modules in src/ipa/meson.build:\n> >\n> > foreach pipeline : pipelines\n> >     if ipa_modules.contains(pipeline)\n> >         subdir(pipeline)\n> >         ipa_names += ipa_install_dir / ipa_name + '.so'\n> >         enabled_ipa_modules += pipeline\n> >     endif\n> > endforeach\n> \n> Sorry, I forgot to note in my cover letter that patches 2 and 3 want to be\n> squashed before merging for this very reason. I've keep them separate for\n> easier review.\n\nNo worries. I appreciate the patches being separate for review :-)\n\n> > > There are no functional changes in the pipeline handler code itself.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  Documentation/environment_variables.rst                  | 2 +-\n> > >  Documentation/guides/introduction.rst                    | 2 +-\n> > >  Documentation/guides/ipa.rst                             | 2 +-\n> > >  Documentation/guides/pipeline-handler.rst                | 2 +-\n> > >  include/libcamera/ipa/meson.build                        | 2 +-\n> > >  meson.build                                              | 2 +-\n> > >  meson_options.txt                                        | 2 +-\n> > >  src/libcamera/pipeline/meson.build                       | 9 +++++++++\n> > >  .../{raspberrypi => rpi/common}/delayed_controls.cpp     | 0\n> > >  .../{raspberrypi => rpi/common}/delayed_controls.h       | 0\n> > >  src/libcamera/pipeline/rpi/common/meson.build            | 8 ++++++++\n> > >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp  | 0\n> > >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.h    | 0\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/data/example.yaml  | 0\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/data/meson.build   | 2 +-\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp      | 0\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h        | 0\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/meson.build        | 2 --\n> > >  .../pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp    | 2 +-\n> > >  19 files changed, 26 insertions(+), 11 deletions(-)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.cpp (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.h (100%)\n> > >  create mode 100644 src/libcamera/pipeline/rpi/common/meson.build\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.h (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/example.yaml (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/meson.build (63%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h (100%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/meson.build (71%)\n> > >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp (99%)\n> > >\n> > > diff --git a/Documentation/environment_variables.rst b/Documentation/environment_variables.rst\n> > > index ceeb251a2ac0..4bf38b877897 100644\n> > > --- a/Documentation/environment_variables.rst\n> > > +++ b/Documentation/environment_variables.rst\n> > > @@ -40,7 +40,7 @@ LIBCAMERA_IPA_MODULE_PATH\n> > >  LIBCAMERA_RPI_CONFIG_FILE\n> > >     Define a custom configuration file to use in the Raspberry Pi pipeline handler.\n> > >\n> > > -   Example value: ``/usr/local/share/libcamera/pipeline/raspberrypi/minimal_mem.yaml``\n> > > +   Example value: ``/usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml``\n> > >\n> > >  Further details\n> > >  ---------------\n> > > diff --git a/Documentation/guides/introduction.rst b/Documentation/guides/introduction.rst\n> > > index 2d1760c1866b..700ec2d33c30 100644\n> > > --- a/Documentation/guides/introduction.rst\n> > > +++ b/Documentation/guides/introduction.rst\n> > > @@ -288,7 +288,7 @@ with dedicated pipeline handlers:\n> > >\n> > >     -  Intel IPU3 (ipu3)\n> > >     -  Rockchip RK3399 (rkisp1)\n> > > -   -  RaspberryPi 3 and 4 (raspberrypi)\n> > > +   -  RaspberryPi 3 and 4 (rpi/vc4)\n> > >\n> > >  Furthermore, generic platform support is provided for the following:\n> > >\n> > > diff --git a/Documentation/guides/ipa.rst b/Documentation/guides/ipa.rst\n> > > index 89839408672a..10301d89fc80 100644\n> > > --- a/Documentation/guides/ipa.rst\n> > > +++ b/Documentation/guides/ipa.rst\n> > > @@ -279,7 +279,7 @@ For example, adding the raspberrypi.mojom file to meson:\n> > >  .. code-block:: none\n> > >\n> > >          pipeline_ipa_mojom_mapping = [\n> > > -            'raspberrypi': 'raspberrypi.mojom',\n> > > +            'rpi/vc4': 'raspberrypi.mojom',\n> > >          ]\n> > >\n> > >  This will cause the mojo data definition file to be compiled. Specifically, it\n> > > diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> > > index 4d38fa23fbcd..7d143b0eaecb 100644\n> > > --- a/Documentation/guides/pipeline-handler.rst\n> > > +++ b/Documentation/guides/pipeline-handler.rst\n> > > @@ -183,7 +183,7 @@ to the libcamera build options in the top level ``meson_options.txt``.\n> > >\n> > >     option('pipelines',\n> > >             type : 'array',\n> > > -           choices : ['ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n> > > +           choices : ['ipu3', 'rpi/vc4', 'rkisp1', 'simple', 'uvcvideo', 'vimc', 'vivid'],\n> >\n> > 'rpi/vc4' should now go after 'rkisp1' in alphabetical order.\n> >\n> > >             description : 'Select which pipeline handlers to include')\n> > >\n> > >\n> > > diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> > > index 67c31cb04ccf..bae15d64d7d8 100644\n> > > --- a/include/libcamera/ipa/meson.build\n> > > +++ b/include/libcamera/ipa/meson.build\n> > > @@ -64,7 +64,7 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',\n> > >  pipeline_ipa_mojom_mapping = {\n> > >      'ipu3': 'ipu3.mojom',\n> > >      'rkisp1': 'rkisp1.mojom',\n> > > -    'raspberrypi': 'raspberrypi.mojom',\n> > > +    'rpi/vc4': 'raspberrypi.mojom',\n> > >      'vimc': 'vimc.mojom',\n> > >  }\n> > >\n> > > diff --git a/meson.build b/meson.build\n> > > index 8628e6acebee..f60da3e17719 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -179,7 +179,7 @@ arch_x86 = ['x86', 'x86_64']\n> > >  pipelines_support = {\n> > >      'imx8-isi':     arch_arm,\n> > >      'ipu3':         arch_x86,\n> > > -    'raspberrypi':  arch_arm,\n> > > +    'rpi/vc4':      arch_arm,\n> >\n> > This should also go after 'rkisp1'. Same below, and possibly in other\n> > patches in this series.\n> >\n> > >      'rkisp1':       arch_arm,\n> > >      'simple':       arch_arm,\n> > >      'uvcvideo':     ['any'],\n> > > diff --git a/meson_options.txt b/meson_options.txt\n> > > index 78a78b7214d5..e1f4c205aa94 100644\n> > > --- a/meson_options.txt\n> > > +++ b/meson_options.txt\n> > > @@ -43,7 +43,7 @@ option('pipelines',\n> > >              'auto',\n> > >              'imx8-isi',\n> > >              'ipu3',\n> > > -            'raspberrypi',\n> > > +            'rpi/vc4',\n> > >              'rkisp1',\n> > >              'simple',\n> > >              'uvcvideo',\n> > > diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build\n> > > index f14869f3a3c0..4f55611013db 100644\n> > > --- a/src/libcamera/pipeline/meson.build\n> > > +++ b/src/libcamera/pipeline/meson.build\n> > > @@ -3,6 +3,15 @@\n> > >  # Location of pipeline specific configuration files\n> > >  pipeline_data_dir = libcamera_datadir / 'pipeline'\n> > >\n> > > +# If the Raspberry Pi VC4 pipeline handler is enabled, ensure we include the\n> > > +# rpi/common subdirectory in the build.\n> > > +#\n> > > +# This is done here and not within rpi/vc4/meson.build as meson does not\n> > > +# allow the subdir command to traverse up the directory tree.\n> > > +if pipelines.contains('rpi/vc4')\n> > > +    subdir('rpi/common')\n> > > +endif\n> >\n> > I don't like how this becomes a special case :-S If we want to support\n> > multi-level directory trees instead of a flat hierarchy, this should be\n> > automatic.\n> >\n> > We could do something like this:\n> >\n> > ----\n> > subdirs = []\n> >\n> > foreach pipeline : pipelines\n> >     pipeline = pipeline.split('/')[0]\n> >     if pipeline in subdirs\n> >         continue\n> >     endif\n> >\n> >     subdir(pipeline)\n> >     subdirs += [pipeline]\n> > endforeach\n> > ----\n> >\n> > The logic in src/libcamera/pipeline/rpi/meson.build would be similar,\n> > iterating over all pipelines and selecting the ones that start with\n> > 'rpi' only. Something like the following should hopefully work:\n> >\n> > ----\n> > # SPDX-License-Identifier: CC0-1.0\n> >\n> > subdir('common')\n> >\n> > foreach pipeline : pipelines\n> >     pipeline = pipeline.split('/')\n> >     if pipeline.length() < 2 or pipeline[0] != 'rpi'\n> >         continue\n> >     endif\n> >\n> >     subdir(pipeline[1])\n> > endforeach\n> > ----\n> \n> This should be fine for the pipeline handler case, but the IPA case is a bit\n> more awkward to do in the IPA case as it appends ipa_name and enabled_ipa_modules\n> in the outer loop.  Can you suggest a neat way to fix that?\n\nI'll have a look once I finish reviewing the series. It may need to wait\nuntil Monday I'm afraid.\n\n> > > +\n> > >  foreach pipeline : pipelines\n> > >      subdir(pipeline)\n> > >  endforeach\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.cpp b/src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/delayed_controls.cpp\n> > > rename to src/libcamera/pipeline/rpi/common/delayed_controls.cpp\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/rpi/common/delayed_controls.h\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/delayed_controls.h\n> > > rename to src/libcamera/pipeline/rpi/common/delayed_controls.h\n> > > diff --git a/src/libcamera/pipeline/rpi/common/meson.build b/src/libcamera/pipeline/rpi/common/meson.build\n> > > new file mode 100644\n> > > index 000000000000..1dec6d3d028b\n> > > --- /dev/null\n> > > +++ b/src/libcamera/pipeline/rpi/common/meson.build\n> > > @@ -0,0 +1,8 @@\n> > > +# SPDX-License-Identifier: CC0-1.0\n> > > +\n> > > +libcamera_sources += files([\n> > > +    'delayed_controls.cpp',\n> > > +    'rpi_stream.cpp',\n> > > +])\n> > > +\n> > > +includes += include_directories('.')\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > > rename to src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > > rename to src/libcamera/pipeline/rpi/common/rpi_stream.h\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/data/example.yaml b/src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/data/example.yaml\n> > > rename to src/libcamera/pipeline/rpi/vc4/data/example.yaml\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > > similarity index 63%\n> > > rename from src/libcamera/pipeline/raspberrypi/data/meson.build\n> > > rename to src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > > index 1c70433bbcbc..a7dfa02320e5 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/data/meson.build\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/data/meson.build\n> > > @@ -5,4 +5,4 @@ conf_files = files([\n> > >  ])\n> > >\n> > >  install_data(conf_files,\n> > > -             install_dir : pipeline_data_dir / 'raspberrypi')\n> > > +             install_dir : pipeline_data_dir / 'rpi/vc4')\n> >\n> >              install_dir : pipeline_data_dir / 'rpi' / 'vc4')\n> >\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> > > rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> > > similarity index 100%\n> > > rename from src/libcamera/pipeline/raspberrypi/dma_heaps.h\n> > > rename to src/libcamera/pipeline/rpi/vc4/dma_heaps.h\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/meson.build b/src/libcamera/pipeline/rpi/vc4/meson.build\n> > > similarity index 71%\n> > > rename from src/libcamera/pipeline/raspberrypi/meson.build\n> > > rename to src/libcamera/pipeline/rpi/vc4/meson.build\n> > > index 59e8fb18c555..228823f30922 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/meson.build\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/meson.build\n> > > @@ -1,10 +1,8 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >\n> > >  libcamera_sources += files([\n> > > -    'delayed_controls.cpp',\n> > >      'dma_heaps.cpp',\n> >\n> > I wondered if this could be a good candidate for the common directory,\n> > but I think we should turn it into a core libcamera helper if it gets\n> > shared by multiple pipeline handlers, so I'm happy to leave it here.\n> >\n> > >      'raspberrypi.cpp',\n> > > -    'rpi_stream.cpp',\n> > >  ])\n> > >\n> > >  subdir('data')\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > > similarity index 99%\n> > > rename from src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > rename to src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > > index a4fff28bf198..4595773d2517 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/raspberrypi.cpp\n> > > @@ -2,7 +2,7 @@\n> > >  /*\n> > >   * Copyright (C) 2019-2021, Raspberry Pi Ltd\n> > >   *\n> > > - * raspberrypi.cpp - Pipeline handler for Raspberry Pi devices\n> > > + * raspberrypi.cpp - Pipeline handler for VC4 based Raspberry Pi devices\n> >\n> > s/VC4 based/VC4-based/\n> >\n> > >   */\n> > >  #include <algorithm>\n> > >  #include <assert.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 8FBA1BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 14:24:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD154627E0;\n\tThu, 27 Apr 2023 16:24:28 +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 AD7B7627D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 16:24:27 +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 8E2FE802;\n\tThu, 27 Apr 2023 16:24:14 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682605468;\n\tbh=9Jzc9g3I8wUf7meGkHyRCBIP+2kUMA3fpdidlrHvdWs=;\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=hwuAfPxRKTkAEnO9wXPeXnQFtQj9HK/P+1DhXCZDolzXQicHDGGRfzS8N3n+D+Ixk\n\tYzkWQeGqkRilzfGC0RO6decBr+j37tXLrF66BoGz3SNBEJBJU8uqQr9Dox0w1GQBEs\n\t4x00eUmYj7RdxfDdaaAvCkQ+QYS0zj7DHKYD5fSPg8j4r2IdQGXJMNoZFSClKylkMk\n\tNb3ToqOnWXwPQ/OlRgrG7N7f9PPVJHsYfJKskcbttyttoUk4dT32JP3izoWEV66M0u\n\tPwBOxo2EVr936Uy/ATGewWOw1ZZ0xWC/25rbUfISZooXxSHItRxfnfSSsI6g2Cva3S\n\tdp1pKfsQQyTng==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682605455;\n\tbh=9Jzc9g3I8wUf7meGkHyRCBIP+2kUMA3fpdidlrHvdWs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=txlAhhmta4ZNY1Pz0FS5BRbI0r7bIztazslHLLdnoVDbUABcH9K/wANELuFOt7qmI\n\tR7qU2OY1snNZkd8XVhA8kTRSe6VuTzIvnRNBYpmNNcn6SXGQO9Z1mEWQHdRFh67avk\n\ty+CSf4WMKgkterDdUfrWwxWqABzkQOYMEcAzR0zc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"txlAhhmt\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 17:24:38 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230427142438.GF28489@pendragon.ideasonboard.com>","References":"<20230426131057.21550-1-naush@raspberrypi.com>\n\t<20230426131057.21550-4-naush@raspberrypi.com>\n\t<20230427131447.GA26786@pendragon.ideasonboard.com>\n\t<CAEmqJPoQsafofPWyk+9agW9JBQjTrcZRMpS=pba4HenoUPZ1nw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPoQsafofPWyk+9agW9JBQjTrcZRMpS=pba4HenoUPZ1nw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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":26977,"web_url":"https://patchwork.libcamera.org/comment/26977/","msgid":"<20230427155958.GA32342@pendragon.ideasonboard.com>","date":"2023-04-27T15:59:58","subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nAnother comment.\n\nOn Thu, Apr 27, 2023 at 04:14:47PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> On Wed, Apr 26, 2023 at 02:10:47PM +0100, Naushir Patuck via libcamera-devel wrote:\n> > Split the Raspberry Pi pipeline handler code into common and VC4/BCM2835\n> > specific file structures.\n> > \n> > The common code files now live in src/libcamera/pipeline/rpi/common/\n> > and the vc4 specific files in src/libcamera/pipeline/rpi/vc4/.\n> > \n> > To build the pipeline handler, the meson configuration option to select\n> > the Raspberry Pi pipeline handler has now changed from \"raspberrypi\" to\n> > \"rpi/vc4\":\n> > \n> > meson setup build -Dpipelines=rpi/vc4\n> \n> This breaks the selection of IPA modules in src/ipa/meson.build:\n> \n> foreach pipeline : pipelines\n>     if ipa_modules.contains(pipeline)\n>         subdir(pipeline)\n>         ipa_names += ipa_install_dir / ipa_name + '.so'\n>         enabled_ipa_modules += pipeline\n>     endif\n> endforeach\n> \n> > There are no functional changes in the pipeline handler code itself.\n> > \n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  Documentation/environment_variables.rst                  | 2 +-\n> >  Documentation/guides/introduction.rst                    | 2 +-\n> >  Documentation/guides/ipa.rst                             | 2 +-\n> >  Documentation/guides/pipeline-handler.rst                | 2 +-\n> >  include/libcamera/ipa/meson.build                        | 2 +-\n> >  meson.build                                              | 2 +-\n> >  meson_options.txt                                        | 2 +-\n> >  src/libcamera/pipeline/meson.build                       | 9 +++++++++\n> >  .../{raspberrypi => rpi/common}/delayed_controls.cpp     | 0\n> >  .../{raspberrypi => rpi/common}/delayed_controls.h       | 0\n> >  src/libcamera/pipeline/rpi/common/meson.build            | 8 ++++++++\n> >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp  | 0\n> >  .../pipeline/{raspberrypi => rpi/common}/rpi_stream.h    | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/data/example.yaml  | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/data/meson.build   | 2 +-\n> >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp      | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h        | 0\n> >  .../pipeline/{raspberrypi => rpi/vc4}/meson.build        | 2 --\n> >  .../pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp    | 2 +-\n> >  19 files changed, 26 insertions(+), 11 deletions(-)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/delayed_controls.h (100%)\n> >  create mode 100644 src/libcamera/pipeline/rpi/common/meson.build\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/common}/rpi_stream.h (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/example.yaml (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/data/meson.build (63%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.cpp (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/dma_heaps.h (100%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/meson.build (71%)\n> >  rename src/libcamera/pipeline/{raspberrypi => rpi/vc4}/raspberrypi.cpp (99%)\n\n[snip]\n\n> > diff --git a/src/libcamera/pipeline/rpi/common/meson.build b/src/libcamera/pipeline/rpi/common/meson.build\n> > new file mode 100644\n> > index 000000000000..1dec6d3d028b\n> > --- /dev/null\n> > +++ b/src/libcamera/pipeline/rpi/common/meson.build\n> > @@ -0,0 +1,8 @@\n> > +# SPDX-License-Identifier: CC0-1.0\n> > +\n> > +libcamera_sources += files([\n> > +    'delayed_controls.cpp',\n> > +    'rpi_stream.cpp',\n> > +])\n> > +\n> > +includes += include_directories('.')\n\nThis isn't nice, especially given that the common directory will contain\na pipeline_base.h, which is a quite generic name. You can drop this and\nuse relative include paths in the source files.\n\n[snip]","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 60522BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 15:59:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD742627DF;\n\tThu, 27 Apr 2023 17:59:48 +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 56AF4627B7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 17:59:47 +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 4862C802;\n\tThu, 27 Apr 2023 17:59:33 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682611188;\n\tbh=dGN4VVQbfOiQtBqfJZkEvKt652efmkcXYkXfgx1pRO0=;\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:\n\tFrom;\n\tb=JUNAS0dzoW4mB+576S/IKp3zk5P+AoaL1Ky1azLZssEHwclp61BTNtcRWOmH/72PA\n\tADL1Bj5dUMh/6JplEHyFWlAJJwXtlIZtJvrSJXZfk09e34bs2h+RjEpoz7BS3YPsSQ\n\tFvgSZQ+Oz5tcqcEta0hOCHUvnP+MeU0sh8CBWx4jMB1HeBWUTS0FNv+SrXB3W0jsX2\n\tmBwPUSV76HZZq0yhy6LYIDKKA/+zlmlUE84Guc+HB+t4LbPwgYKmmcQe0IHNRWVVtM\n\t9oWGIML25HnALBhVvLd18qPsRTXA6uwjNZj+iKlNlm4bvf5BRAyYfDPGbtHf5ZPfPp\n\tSRG+vvv3N2qnQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682611175;\n\tbh=dGN4VVQbfOiQtBqfJZkEvKt652efmkcXYkXfgx1pRO0=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=dmjkkRCg2ryf9Hbm9TdwZ+Oy6FNwTOmxqdflYcDuOC+2eM0vY4vLrO8nqEAh3P7iV\n\tlukH7eBE2LiQHEAOf4cmDIC9GQrlccBe8gbZMFClfHj5wU2AsnqDYGu1WfxCSwSAdA\n\tQhW0CvuzeQBS3NejpMmiWPzkICK6wxZY6ognEGS4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dmjkkRCg\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 18:59:58 +0300","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20230427155958.GA32342@pendragon.ideasonboard.com>","References":"<20230426131057.21550-1-naush@raspberrypi.com>\n\t<20230426131057.21550-4-naush@raspberrypi.com>\n\t<20230427131447.GA26786@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230427131447.GA26786@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 03/13] pipeline: raspberrypi: Refactor\n\tand move pipeline handler code","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]