[{"id":32826,"web_url":"https://patchwork.libcamera.org/comment/32826/","msgid":"<20241217162212.GA11809@pendragon.ideasonboard.com>","date":"2024-12-17T16:22:12","subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Barnabás,\n\nThank you for the patch.\n\nOn Tue, Dec 17, 2024 at 03:15:16PM +0000, Barnabás Pőcze wrote:\n> Consider `pipelines=auto,virtual`. Previously that would select\n> everything that `auto` would, but not actually enable the `virtual`\n> pipeline handler because the `pipelines` list was reset.\n\nUse the imperative mood in the commit message, and the present tense to\ndescribe the current behaviour.:\n\nConsider the `pipelines=auto,virtual` meson option. One could expect it\nto auto-select pipeline handlers and to enable the virtual pipeline\nhandler in addition. libcamera however ignores the `virtual` pipeline\nhandler because the `pipelines` list is reset by `auto`. As enabling\nadditional pipeline handlers beside auto-selection, fix this by\nconsidering all pipeline handlers in the list.\n\n> Bug: https://bugs.libcamera.org/show_bug.cgi?id=247\n> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> ---\n>  meson.build | 10 ++++++----\n>  1 file changed, 6 insertions(+), 4 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 33afbb741..5e5e4756d 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -204,7 +204,7 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n>  \n>  # Pipeline handlers\n>  #\n> -pipelines = get_option('pipelines')\n> +wanted_pipelines = get_option('pipelines')\n>  \n>  arch_arm = ['arm', 'aarch64']\n>  arch_x86 = ['x86', 'x86_64']\n> @@ -220,16 +220,18 @@ pipelines_support = {\n>      'virtual':      ['test'],\n>  }\n>  \n> -if pipelines.contains('all')\n> +if wanted_pipelines.contains('all')\n>      pipelines = pipelines_support.keys()\n> -elif pipelines.contains('auto')\n> +elif wanted_pipelines.contains('auto')\n>      host_cpu = host_machine.cpu_family()\n>      pipelines = []\n>      foreach pipeline, archs : pipelines_support\n> -        if host_cpu in archs or 'any' in archs\n> +        if pipeline in wanted_pipelines or host_cpu in archs or 'any' in archs\n>              pipelines += pipeline\n>          endif\n>      endforeach\n> +else\n> +    pipelines = wanted_pipelines\n>  endif\n\nWould the following be clearer ?\n\npipelines = {}\n\nforeach pipeline : get_option('pipelines')\n    if pipeline == 'all'\n        pipelines += pipelines_support\n    elif pipeline == 'auto'\n        host_cpu = host_machine.cpu_family()\n        foreach pipeline, archs : pipelines_support\n            if host_cpu in archs or 'any' in archs\n                pipelines += {pipeline: true}\n            endif\n        endforeach\n    else\n        pipelines += {pipeline: true}\n    endif\nendforeach\n\npipelines = pipelines.keys()\n\nI don't have a strong preference. Either way,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  # Tests require the vimc pipeline handler, include it automatically when tests","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 6B9E0BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Dec 2024 16:22:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6346C67FE5;\n\tTue, 17 Dec 2024 17:22:17 +0100 (CET)","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 E8F2567FDF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Dec 2024 17:22:15 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 773CC4C7;\n\tTue, 17 Dec 2024 17:21:38 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"a92ky9LK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734452498;\n\tbh=QEPRVfVOUWjWY+fJBoGhxiVbSj0zh4sc8tOAJlTKhmk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=a92ky9LK2c8ORUfmublnVf7A9/BbGOxBaMCBtP/9xmSoAZGyGRRidxCUllGmsjMk4\n\t7Hmdz8sA7aSAg+KF0m7YwH+wrAheMeAe7ZvsoJCbnJ4iJflYjEbwZRSMhEaWSDTPpm\n\tk43hrnSlTf+HK2gp7Be0pnnNTeJkmnivt8JKiZvY=","Date":"Tue, 17 Dec 2024 18:22:12 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","Message-ID":"<20241217162212.GA11809@pendragon.ideasonboard.com>","References":"<20241217151513.133599-1-pobrn@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20241217151513.133599-1-pobrn@protonmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32841,"web_url":"https://patchwork.libcamera.org/comment/32841/","msgid":"<173445468400.32744.3221807484555754485@ping.linuxembedded.co.uk>","date":"2024-12-17T16:58:04","subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-12-17 16:22:12)\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> On Tue, Dec 17, 2024 at 03:15:16PM +0000, Barnabás Pőcze wrote:\n> > Consider `pipelines=auto,virtual`. Previously that would select\n> > everything that `auto` would, but not actually enable the `virtual`\n> > pipeline handler because the `pipelines` list was reset.\n> \n> Use the imperative mood in the commit message, and the present tense to\n> describe the current behaviour.:\n> \n> Consider the `pipelines=auto,virtual` meson option. One could expect it\n> to auto-select pipeline handlers and to enable the virtual pipeline\n> handler in addition. libcamera however ignores the `virtual` pipeline\n> handler because the `pipelines` list is reset by `auto`. As enabling\n> additional pipeline handlers beside auto-selection, fix this by\n> considering all pipeline handlers in the list.\n> \n> > Bug: https://bugs.libcamera.org/show_bug.cgi?id=247\n> > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > ---\n> >  meson.build | 10 ++++++----\n> >  1 file changed, 6 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/meson.build b/meson.build\n> > index 33afbb741..5e5e4756d 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -204,7 +204,7 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n> >  \n> >  # Pipeline handlers\n> >  #\n> > -pipelines = get_option('pipelines')\n> > +wanted_pipelines = get_option('pipelines')\n> >  \n> >  arch_arm = ['arm', 'aarch64']\n> >  arch_x86 = ['x86', 'x86_64']\n> > @@ -220,16 +220,18 @@ pipelines_support = {\n> >      'virtual':      ['test'],\n> >  }\n> >  \n> > -if pipelines.contains('all')\n> > +if wanted_pipelines.contains('all')\n> >      pipelines = pipelines_support.keys()\n> > -elif pipelines.contains('auto')\n> > +elif wanted_pipelines.contains('auto')\n> >      host_cpu = host_machine.cpu_family()\n> >      pipelines = []\n> >      foreach pipeline, archs : pipelines_support\n> > -        if host_cpu in archs or 'any' in archs\n> > +        if pipeline in wanted_pipelines or host_cpu in archs or 'any' in archs\n> >              pipelines += pipeline\n> >          endif\n> >      endforeach\n> > +else\n> > +    pipelines = wanted_pipelines\n> >  endif\n> \n> Would the following be clearer ?\n> \n> pipelines = {}\n> \n> foreach pipeline : get_option('pipelines')\n>     if pipeline == 'all'\n>         pipelines += pipelines_support\n>     elif pipeline == 'auto'\n>         host_cpu = host_machine.cpu_family()\n>         foreach pipeline, archs : pipelines_support\n>             if host_cpu in archs or 'any' in archs\n>                 pipelines += {pipeline: true}\n>             endif\n>         endforeach\n>     else\n>         pipelines += {pipeline: true}\n>     endif\n> endforeach\n> \n> pipelines = pipelines.keys()\n> \n> I don't have a strong preference. Either way,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nLikewise, I like the abiltiy to have auto+specific when desired.\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> \n> >  # Tests require the vimc pipeline handler, include it automatically when tests\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 901E4BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Dec 2024 16:58:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3DB6C67FFA;\n\tTue, 17 Dec 2024 17:58:08 +0100 (CET)","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 0F68967FE2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Dec 2024 17:58:07 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B588A4C7;\n\tTue, 17 Dec 2024 17:57:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"O4h56Ytd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734454649;\n\tbh=NhPXIpoFzXZYgAQIOmq730xbbuyTK/ILxvjjMA/YNBw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=O4h56Ytd2HnwsLqkjQ07vFKhMb3qJuJz03c50Lx/rQFa/FSxKIv6+tuEQiMLCJo8Q\n\tZEuCDUGTMmYIMqHM5eST+JKdppEXyXReZw0p6zmvyhsxYp/sxJJnmTnrliJkAvev6u\n\tjUhl8XIKrgp0Fh9BDd4CudNd2BjZKMhkSoZEcz0k=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241217162212.GA11809@pendragon.ideasonboard.com>","References":"<20241217151513.133599-1-pobrn@protonmail.com>\n\t<20241217162212.GA11809@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Tue, 17 Dec 2024 16:58:04 +0000","Message-ID":"<173445468400.32744.3221807484555754485@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32848,"web_url":"https://patchwork.libcamera.org/comment/32848/","msgid":"<SWELh-iG9Ygy2NiMX727bT8DoZYGl6a-bMG_kXglt6vLW34IIeyf8wdUkOYnwPJ5in9Z31h0u-g488UqPDyVdu1Mjd13kNMaFU18FrKfrcY=@protonmail.com>","date":"2024-12-17T18:18:28","subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"2024. december 17., kedd 17:22 keltezéssel, Laurent Pinchart <laurent.pinchart@ideasonboard.com> írta:\n\n> Hi Barnabás,\n> \n> Thank you for the patch.\n> \n> On Tue, Dec 17, 2024 at 03:15:16PM +0000, Barnabás Pőcze wrote:\n> > Consider `pipelines=auto,virtual`. Previously that would select\n> > everything that `auto` would, but not actually enable the `virtual`\n> > pipeline handler because the `pipelines` list was reset.\n> \n> Use the imperative mood in the commit message, and the present tense to\n> describe the current behaviour.:\n> \n> Consider the `pipelines=auto,virtual` meson option. One could expect it\n> to auto-select pipeline handlers and to enable the virtual pipeline\n> handler in addition. libcamera however ignores the `virtual` pipeline\n> handler because the `pipelines` list is reset by `auto`. As enabling\n> additional pipeline handlers beside auto-selection, fix this by\n> considering all pipeline handlers in the list.\n> \n> > Bug: https://bugs.libcamera.org/show_bug.cgi?id=247\n> > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > ---\n> >  meson.build | 10 ++++++----\n> >  1 file changed, 6 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/meson.build b/meson.build\n> > index 33afbb741..5e5e4756d 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -204,7 +204,7 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n> >\n> >  # Pipeline handlers\n> >  #\n> > -pipelines = get_option('pipelines')\n> > +wanted_pipelines = get_option('pipelines')\n> >\n> >  arch_arm = ['arm', 'aarch64']\n> >  arch_x86 = ['x86', 'x86_64']\n> > @@ -220,16 +220,18 @@ pipelines_support = {\n> >      'virtual':      ['test'],\n> >  }\n> >\n> > -if pipelines.contains('all')\n> > +if wanted_pipelines.contains('all')\n> >      pipelines = pipelines_support.keys()\n> > -elif pipelines.contains('auto')\n> > +elif wanted_pipelines.contains('auto')\n> >      host_cpu = host_machine.cpu_family()\n> >      pipelines = []\n> >      foreach pipeline, archs : pipelines_support\n> > -        if host_cpu in archs or 'any' in archs\n> > +        if pipeline in wanted_pipelines or host_cpu in archs or 'any' in archs\n> >              pipelines += pipeline\n> >          endif\n> >      endforeach\n> > +else\n> > +    pipelines = wanted_pipelines\n> >  endif\n> \n> Would the following be clearer ?\n\nWell, after some thinking, unfortunately I have to report that\nit does not seem clearer to me personally. But if there is a\nconsensus, I will change it.\n\n\nRegards,\nBarnabás Pőcze\n\n> \n> pipelines = {}\n> \n> foreach pipeline : get_option('pipelines')\n>     if pipeline == 'all'\n>         pipelines += pipelines_support\n>     elif pipeline == 'auto'\n>         host_cpu = host_machine.cpu_family()\n>         foreach pipeline, archs : pipelines_support\n>             if host_cpu in archs or 'any' in archs\n>                 pipelines += {pipeline: true}\n>             endif\n>         endforeach\n>     else\n>         pipelines += {pipeline: true}\n>     endif\n> endforeach\n> \n> pipelines = pipelines.keys()\n> \n> I don't have a strong preference. Either way,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> >  # Tests require the vimc pipeline handler, include it automatically when tests\n> \n> --\n> Regards,\n> \n> Laurent Pinchart\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 D8E5DC3301\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Dec 2024 18:18:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F2D267FD3;\n\tTue, 17 Dec 2024 19:18:34 +0100 (CET)","from mail-4322.protonmail.ch (mail-4322.protonmail.ch\n\t[185.70.43.22])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 659D267FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Dec 2024 19:18:32 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"fU0+3hme\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1734459511; x=1734718711;\n\tbh=FEspoH9xL/b1YKRjmbnkFohN+5wfhkeB0c4hHnymjuw=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post;\n\tb=fU0+3hmezpklxnJkMzOWsPufMeVVkGVXNV9ufG6tEEch0ncEf6RXEupF+Z4w1RLzB\n\tXKr3fbnB3C0bN5j1pWAVoHEgsZXmuu0YWkwQOSGEIqi26PT9PD0BvxtBoS0rxVDY+S\n\tl14QWAuILZsoFdGi5CqCkZi9YiEyyADZQUOIOTQ7DDrKFMcKOgAF/BgLuFzu6Y6bNj\n\tDfm7B1DJLIJhROGm2PM7hcZiW1tytOsNT5c/DJk4ZF2AuWk+sZPmhWxeuxp1A8RQOK\n\trDKRrjBDOq/pELqHY+Py+SuHJ4LmNqwOoQYPbly98Cee8vLn7hfSMUwcUtdi+SlHmz\n\tKzKQB/qHprw9Q==","Date":"Tue, 17 Dec 2024 18:18:28 +0000","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","Message-ID":"<SWELh-iG9Ygy2NiMX727bT8DoZYGl6a-bMG_kXglt6vLW34IIeyf8wdUkOYnwPJ5in9Z31h0u-g488UqPDyVdu1Mjd13kNMaFU18FrKfrcY=@protonmail.com>","In-Reply-To":"<20241217162212.GA11809@pendragon.ideasonboard.com>","References":"<20241217151513.133599-1-pobrn@protonmail.com>\n\t<20241217162212.GA11809@pendragon.ideasonboard.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"ec9d9dd1d59c411948bd94ff02450e7b0d0fa292","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32851,"web_url":"https://patchwork.libcamera.org/comment/32851/","msgid":"<20241217193818.GC23470@pendragon.ideasonboard.com>","date":"2024-12-17T19:38:18","subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Dec 17, 2024 at 06:18:28PM +0000, Barnabás Pőcze wrote:\n> 2024. december 17., kedd 17:22 keltezéssel, Laurent Pinchart <laurent.pinchart@ideasonboard.com> írta:\n> \n> > Hi Barnabás,\n> > \n> > Thank you for the patch.\n> > \n> > On Tue, Dec 17, 2024 at 03:15:16PM +0000, Barnabás Pőcze wrote:\n> > > Consider `pipelines=auto,virtual`. Previously that would select\n> > > everything that `auto` would, but not actually enable the `virtual`\n> > > pipeline handler because the `pipelines` list was reset.\n> > \n> > Use the imperative mood in the commit message, and the present tense to\n> > describe the current behaviour.:\n> > \n> > Consider the `pipelines=auto,virtual` meson option. One could expect it\n> > to auto-select pipeline handlers and to enable the virtual pipeline\n> > handler in addition. libcamera however ignores the `virtual` pipeline\n> > handler because the `pipelines` list is reset by `auto`. As enabling\n> > additional pipeline handlers beside auto-selection, fix this by\n> > considering all pipeline handlers in the list.\n> > \n> > > Bug: https://bugs.libcamera.org/show_bug.cgi?id=247\n> > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>\n> > > ---\n> > >  meson.build | 10 ++++++----\n> > >  1 file changed, 6 insertions(+), 4 deletions(-)\n> > >\n> > > diff --git a/meson.build b/meson.build\n> > > index 33afbb741..5e5e4756d 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -204,7 +204,7 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n> > >\n> > >  # Pipeline handlers\n> > >  #\n> > > -pipelines = get_option('pipelines')\n> > > +wanted_pipelines = get_option('pipelines')\n> > >\n> > >  arch_arm = ['arm', 'aarch64']\n> > >  arch_x86 = ['x86', 'x86_64']\n> > > @@ -220,16 +220,18 @@ pipelines_support = {\n> > >      'virtual':      ['test'],\n> > >  }\n> > >\n> > > -if pipelines.contains('all')\n> > > +if wanted_pipelines.contains('all')\n> > >      pipelines = pipelines_support.keys()\n> > > -elif pipelines.contains('auto')\n> > > +elif wanted_pipelines.contains('auto')\n> > >      host_cpu = host_machine.cpu_family()\n> > >      pipelines = []\n> > >      foreach pipeline, archs : pipelines_support\n> > > -        if host_cpu in archs or 'any' in archs\n> > > +        if pipeline in wanted_pipelines or host_cpu in archs or 'any' in archs\n> > >              pipelines += pipeline\n> > >          endif\n> > >      endforeach\n> > > +else\n> > > +    pipelines = wanted_pipelines\n> > >  endif\n> > \n> > Would the following be clearer ?\n> \n> Well, after some thinking, unfortunately I have to report that\n> it does not seem clearer to me personally. But if there is a\n> consensus, I will change it.\n\nI have a slight preference for the version below but both are OK with\nme.\n\n> > pipelines = {}\n> > \n> > foreach pipeline : get_option('pipelines')\n> >     if pipeline == 'all'\n> >         pipelines += pipelines_support\n> >     elif pipeline == 'auto'\n> >         host_cpu = host_machine.cpu_family()\n> >         foreach pipeline, archs : pipelines_support\n> >             if host_cpu in archs or 'any' in archs\n> >                 pipelines += {pipeline: true}\n> >             endif\n> >         endforeach\n> >     else\n> >         pipelines += {pipeline: true}\n> >     endif\n> > endforeach\n> > \n> > pipelines = pipelines.keys()\n> > \n> > I don't have a strong preference. Either way,\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > >  # Tests require the vimc pipeline handler, include it automatically when tests","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 9AB08BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Dec 2024 19:38:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 02CEF67FFF;\n\tTue, 17 Dec 2024 20:38:21 +0100 (CET)","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 65B4167FD3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Dec 2024 20:38:20 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B9EE13E;\n\tTue, 17 Dec 2024 20:37:42 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"oI8vLBBI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734464262;\n\tbh=QzoXq7UzVhGTX5etSlgVKf344xqdE8Pua5Xf3Wqkpzc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oI8vLBBIVZOTfN1IuXsnKLo1XrG9c8zbRrylGXtj2Go4+7t8aMEs2qrzgOYhDdHtX\n\tqRacwiL2SovOPIFg79KTuN4l253lQw0jKGPp7IW44LkBlRA/KjJC/4aZzOCSKkuPF8\n\t53v3pJVRVWzX6CEfSFr2K3p7OGg+lop1tIkf0hh8=","Date":"Tue, 17 Dec 2024 21:38:18 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] meson: Don't override pipeline list when `auto` is\n\tselected","Message-ID":"<20241217193818.GC23470@pendragon.ideasonboard.com>","References":"<20241217151513.133599-1-pobrn@protonmail.com>\n\t<20241217162212.GA11809@pendragon.ideasonboard.com>\n\t<SWELh-iG9Ygy2NiMX727bT8DoZYGl6a-bMG_kXglt6vLW34IIeyf8wdUkOYnwPJ5in9Z31h0u-g488UqPDyVdu1Mjd13kNMaFU18FrKfrcY=@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<SWELh-iG9Ygy2NiMX727bT8DoZYGl6a-bMG_kXglt6vLW34IIeyf8wdUkOYnwPJ5in9Z31h0u-g488UqPDyVdu1Mjd13kNMaFU18FrKfrcY=@protonmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]