[{"id":22254,"web_url":"https://patchwork.libcamera.org/comment/22254/","msgid":"<CAHW6GYL2ufLG6sddnYwAfkwLKoZGnAMVUBY6nuMCX0nRUmSA3w@mail.gmail.com>","date":"2022-03-10T10:46:04","subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Naush\n\nThanks for this patch!\n\nOn Mon, 7 Mar 2022 at 12:46, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Add a flag to indicate a call to PipelineHandlerRPi::configure() has taken\n> place. This flag signals that buffer allocations need to be done on the next\n> call to PipelineHandlerRPi::start().\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 21 ++++++++++++-------\n>  1 file changed, 14 insertions(+), 7 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 8bb9fc429912..b17ffa235ac7 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -185,7 +185,7 @@ public:\n>         RPiCameraData(PipelineHandler *pipe)\n>                 : Camera::Private(pipe), state_(State::Stopped),\n>                   supportsFlips_(false), flipsAlterBayerOrder_(false),\n> -                 dropFrameCount_(0), ispOutputCount_(0)\n> +                 dropFrameCount_(0), reconfigured_(true), ispOutputCount_(0)\n>         {\n>         }\n>\n> @@ -284,6 +284,9 @@ public:\n>          */\n>         std::optional<int32_t> notifyGainsUnity_;\n>\n> +       /* Has this camera been reconfigured? */\n> +       bool reconfigured_;\n> +\n>  private:\n>         void checkRequestCompleted();\n>         void fillRequestMetadata(const ControlList &bufferControls,\n> @@ -961,6 +964,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>                                 << \" on pad \" << sinkPad->index();\n>         }\n>\n> +       data->reconfigured_ = true;\n>         return ret;\n>  }\n>\n> @@ -981,12 +985,15 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>         RPiCameraData *data = cameraData(camera);\n>         int ret;\n>\n> -       /* Allocate buffers for internal pipeline usage. */\n> -       ret = prepareBuffers(camera);\n> -       if (ret) {\n> -               LOG(RPI, Error) << \"Failed to allocate buffers\";\n> -               stop(camera);\n> -               return ret;\n> +       if (data->reconfigured_) {\n> +               /* Allocate buffers for internal pipeline usage. */\n> +               ret = prepareBuffers(camera);\n> +               if (ret) {\n> +                       LOG(RPI, Error) << \"Failed to allocate buffers\";\n> +                       stop(camera);\n> +                       return ret;\n> +               }\n> +               data->reconfigured_ = false;\n>         }\n>\n>         /* Check if a ScalerCrop control was specified. */\n> --\n> 2.25.1\n>\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid","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 CD340BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 10 Mar 2022 10:46:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2BBEA632E5;\n\tThu, 10 Mar 2022 11:46:17 +0100 (CET)","from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n\t[IPv6:2a00:1450:4864:20::32a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E6CD632E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 10 Mar 2022 11:46:15 +0100 (CET)","by mail-wm1-x32a.google.com with SMTP id c192so2969326wma.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 10 Mar 2022 02:46:15 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1646909177;\n\tbh=pmk3aJLAxsuUtcRrEjoATeaEyM4Rebjk8FTMeKcScm8=;\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=J7Ne2SZyZ2BH+feTIAoUPnuJv5ZUK5xpIZ7p0ditG+BBOyakmNAJI1oBegE+jPDOa\n\tK0QG38uOndN4Z/Q1ss6n/jQFkJEcz65XNnSoJyxvjTc4EDID6j9nUH2VsyQW8XPRhS\n\tnGGh7dw3mfbcN72P5jfUaU6WOypPFrtWNK40schSJwCVXSgPTSamvDKUFkiZ0fvWyu\n\tCViYxMp5esvDdpCYQ/nwCaK55h/E0MPvWHIZQOA2uZAhWoR0a6JmUMkcscPWmihzRE\n\tnInCZnuFL7s9opexP5W+b3ZQPfG3hLIAB5NshViuK7W1Uez0x3Osty0+0X9jEvxkSr\n\tqrpDd1maJOBYA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=ww8LM3LGdMXeF1iTNMHNi78qozpO2gEUYHj27+b9Iuo=;\n\tb=iZEdjCP2tJLS5vMShgJgj0ZFP387HS2EZD8VmXyqJGuPYXNkCUh/KOJj5TzGPUFWSi\n\tboibTI4pCq5SLqcbC8eZQLn7lRQAnyZ3wDIFLuBdJvxe9G8DTH0PQpZhGhrn5xh4Gpxg\n\thcSpZtleHpKOHMZjEuoHV55B1zomiFjdr2+zXC9immBYdY/YT8zP/LDmrIWks47K+qVf\n\tQa8aLMwGWOBOK81yQ02L+Eybz9EvRvEnjU4ljNGfQemiEh+NH/g3i6wWWMqQlQEWk8ez\n\tJt7Zl2YIwgaXbpNdfO+Bhnrq+s1G+6mchnQ6o8q6Xhpm52yzNYan/PwDMSoFAzmi9XgZ\n\tWZnw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"iZEdjCP2\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=ww8LM3LGdMXeF1iTNMHNi78qozpO2gEUYHj27+b9Iuo=;\n\tb=PVfiyZEcSDO2Tc62zgg6Dj6dIneKduYhPSMHhZJ+YujYlX0WybIPu+aVmwsta7ZH+x\n\t7qEIUuMJ74oIEI8/PKdVp1yAjgsvc7m3eLoAfF5LF9ZM+Tlt9OTzfVx1khn5yU0n9wd9\n\txEo9S1C0V+GM4qo8l6zpYAExaSRP7FgYQ2Jj8HZUypX/n26EAHTdcfcILsmrNTW00I/I\n\t0NSOaYnB6Ux+E20JBmtp5QDNntW62LSyjw+NEvD8zDzEIqEhh0bjZZCw/IV6lPDRMx91\n\twUoh1pZNH2/DIBTNxoX2Ht4JfHLYrnGE0O7TriiU4svRk22lZ0AvBq7fYEIJtf6NMOMi\n\tjvxw==","X-Gm-Message-State":"AOAM532kAe5PQolObpFZ+XhpSuZF80mbeGMfZJw5r6wM6PRM4lxR2bfu\n\tUKWekhJAhT3jK8KgH1sj+FteZzcxmS4mM/+fCj4Gx3IxK10=","X-Google-Smtp-Source":"ABdhPJw64nfR/Oydzx2N4lmc8EOxGmaMJxHqrnumnVHp93qk3n+cQDCzzz95WGFJppRWh1oLeF5WmuwYDQX/fhOwKy8=","X-Received":"by 2002:a05:600c:5115:b0:389:bd64:85ab with SMTP id\n\to21-20020a05600c511500b00389bd6485abmr11181498wms.32.1646909175206;\n\tThu, 10 Mar 2022 02:46:15 -0800 (PST)","MIME-Version":"1.0","References":"<20220307124633.115452-1-naush@raspberrypi.com>\n\t<20220307124633.115452-5-naush@raspberrypi.com>","In-Reply-To":"<20220307124633.115452-5-naush@raspberrypi.com>","Date":"Thu, 10 Mar 2022 10:46:04 +0000","Message-ID":"<CAHW6GYL2ufLG6sddnYwAfkwLKoZGnAMVUBY6nuMCX0nRUmSA3w@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22266,"web_url":"https://patchwork.libcamera.org/comment/22266/","msgid":"<Yi4V+oBS8oVzky4e@pendragon.ideasonboard.com>","date":"2022-03-13T16:04:10","subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Mon, Mar 07, 2022 at 12:46:31PM +0000, Naushir Patuck via libcamera-devel wrote:\n> Add a flag to indicate a call to PipelineHandlerRPi::configure() has taken\n> place. This flag signals that buffer allocations need to be done on the next\n> call to PipelineHandlerRPi::start().\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 21 ++++++++++++-------\n>  1 file changed, 14 insertions(+), 7 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 8bb9fc429912..b17ffa235ac7 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -185,7 +185,7 @@ public:\n>  \tRPiCameraData(PipelineHandler *pipe)\n>  \t\t: Camera::Private(pipe), state_(State::Stopped),\n>  \t\t  supportsFlips_(false), flipsAlterBayerOrder_(false),\n> -\t\t  dropFrameCount_(0), ispOutputCount_(0)\n> +\t\t  dropFrameCount_(0), reconfigured_(true), ispOutputCount_(0)\n\nGiven that you can't start a camera without configuring it first, this\ncould be initialized to false.\n\n>  \t{\n>  \t}\n>  \n> @@ -284,6 +284,9 @@ public:\n>  \t */\n>  \tstd::optional<int32_t> notifyGainsUnity_;\n>  \n> +\t/* Has this camera been reconfigured? */\n> +\tbool reconfigured_;\n> +\n>  private:\n>  \tvoid checkRequestCompleted();\n>  \tvoid fillRequestMetadata(const ControlList &bufferControls,\n> @@ -961,6 +964,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>  \t\t\t\t<< \" on pad \" << sinkPad->index();\n>  \t}\n>  \n> +\tdata->reconfigured_ = true;\n>  \treturn ret;\n>  }\n>  \n> @@ -981,12 +985,15 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)\n>  \tRPiCameraData *data = cameraData(camera);\n>  \tint ret;\n>  \n> -\t/* Allocate buffers for internal pipeline usage. */\n> -\tret = prepareBuffers(camera);\n> -\tif (ret) {\n> -\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\n> -\t\tstop(camera);\n> -\t\treturn ret;\n> +\tif (data->reconfigured_) {\n> +\t\t/* Allocate buffers for internal pipeline usage. */\n> +\t\tret = prepareBuffers(camera);\n> +\t\tif (ret) {\n> +\t\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\n> +\t\t\tstop(camera);\n> +\t\t\treturn ret;\n> +\t\t}\n> +\t\tdata->reconfigured_ = false;\n>  \t}\n>  \n>  \t/* Check if a ScalerCrop control was specified. */","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 D4FCEBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 13 Mar 2022 16:04:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09E0E6118A;\n\tSun, 13 Mar 2022 17:04:29 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2780B604E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Mar 2022 17:04:28 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B22C475;\n\tSun, 13 Mar 2022 17:04:27 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647187469;\n\tbh=NcszUrLKFemzG63HOUVCeRWzdWz2pI0CMLU2ok+EBao=;\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=L1tJdLcS85YCIVb7LLTqxRWuAfyuG8SfGrH8MHdxkZ6++JXASD8g+ma21bceWECNx\n\tMyuww2InDLeMQKxALpLzV6kkz0xh43YWyt0TF28gyQ8Uvy6NBfw3p+pG5fUte6YvYE\n\tNIkf9/lsjtH+VVOZoPINFQ0ODgVzDHv4p/0DeKV2KzjOV2B3rOt2VhgLyqeAZUYgfv\n\ttc3sinvCKQfc9LnDiy3MKCvR6cUmRPKVOigi2L1ZwZD//Y22gDrlEqbCO5ByFPXdia\n\twfiBQEz1YZ/E3HgzHl7Q+4byI430FeRV97JoFxtBU5oLjw2/O7br7QzyCLK0EGk2Cu\n\tK9xQPBsyX0L+w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647187467;\n\tbh=NcszUrLKFemzG63HOUVCeRWzdWz2pI0CMLU2ok+EBao=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IRXrlJf4dH6g4Tkf3X/vr58x3SxtTqmnnHqe4pxMfIyDqOF+Ky3RbGuAYSSKp83eX\n\ts9dy1SD3Ffw1SRpFdSAKBjrr4ky80zxRjFnPMGNA100aoQ80tYRAhHlv68JZ2/IEcQ\n\t2qjHCUHLTC2yyFBX+0xt6cxdJWn41LNHjH0P03Os="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IRXrlJf4\"; dkim-atps=neutral","Date":"Sun, 13 Mar 2022 18:04:10 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yi4V+oBS8oVzky4e@pendragon.ideasonboard.com>","References":"<20220307124633.115452-1-naush@raspberrypi.com>\n\t<20220307124633.115452-5-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220307124633.115452-5-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","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":22267,"web_url":"https://patchwork.libcamera.org/comment/22267/","msgid":"<CAEmqJPq7nMSwNT7yGMaeHSVDiECn=YaMoxqZejwAZVC2xhxGzQ@mail.gmail.com>","date":"2022-03-14T10:49:50","subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nThank you for your feedback!\n\nOn Sun, 13 Mar 2022 at 16:04, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Mon, Mar 07, 2022 at 12:46:31PM +0000, Naushir Patuck via\n> libcamera-devel wrote:\n> > Add a flag to indicate a call to PipelineHandlerRPi::configure() has\n> taken\n> > place. This flag signals that buffer allocations need to be done on the\n> next\n> > call to PipelineHandlerRPi::start().\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 21 ++++++++++++-------\n> >  1 file changed, 14 insertions(+), 7 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 8bb9fc429912..b17ffa235ac7 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -185,7 +185,7 @@ public:\n> >       RPiCameraData(PipelineHandler *pipe)\n> >               : Camera::Private(pipe), state_(State::Stopped),\n> >                 supportsFlips_(false), flipsAlterBayerOrder_(false),\n> > -               dropFrameCount_(0), ispOutputCount_(0)\n> > +               dropFrameCount_(0), reconfigured_(true),\n> ispOutputCount_(0)\n>\n> Given that you can't start a camera without configuring it first, this\n> could be initialized to false.\n>\n\nI think the value of the flag here is correct, but perhaps my naming of the\nvariable\nneeds to change.  This flags tells the pipeline handler that we need to\nallocate\nbuffers before starting.  So perhaps a rename to something like\nallocateBuffers_\nmight be more appropriate.\n\nI'll change it in the next version.\n\nRegards,\nNaush\n\n\n\n>\n> >       {\n> >       }\n> >\n> > @@ -284,6 +284,9 @@ public:\n> >        */\n> >       std::optional<int32_t> notifyGainsUnity_;\n> >\n> > +     /* Has this camera been reconfigured? */\n> > +     bool reconfigured_;\n> > +\n> >  private:\n> >       void checkRequestCompleted();\n> >       void fillRequestMetadata(const ControlList &bufferControls,\n> > @@ -961,6 +964,7 @@ int PipelineHandlerRPi::configure(Camera *camera,\n> CameraConfiguration *config)\n> >                               << \" on pad \" << sinkPad->index();\n> >       }\n> >\n> > +     data->reconfigured_ = true;\n> >       return ret;\n> >  }\n> >\n> > @@ -981,12 +985,15 @@ int PipelineHandlerRPi::start(Camera *camera,\n> const ControlList *controls)\n> >       RPiCameraData *data = cameraData(camera);\n> >       int ret;\n> >\n> > -     /* Allocate buffers for internal pipeline usage. */\n> > -     ret = prepareBuffers(camera);\n> > -     if (ret) {\n> > -             LOG(RPI, Error) << \"Failed to allocate buffers\";\n> > -             stop(camera);\n> > -             return ret;\n> > +     if (data->reconfigured_) {\n> > +             /* Allocate buffers for internal pipeline usage. */\n> > +             ret = prepareBuffers(camera);\n> > +             if (ret) {\n> > +                     LOG(RPI, Error) << \"Failed to allocate buffers\";\n> > +                     stop(camera);\n> > +                     return ret;\n> > +             }\n> > +             data->reconfigured_ = false;\n> >       }\n> >\n> >       /* Check if a ScalerCrop control was specified. */\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 081E6BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Mar 2022 10:50:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B47461FBD;\n\tMon, 14 Mar 2022 11:50:10 +0100 (CET)","from mail-lf1-x129.google.com (mail-lf1-x129.google.com\n\t[IPv6:2a00:1450:4864:20::129])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BB1260475\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Mar 2022 11:50:07 +0100 (CET)","by mail-lf1-x129.google.com with SMTP id w7so26316987lfd.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Mar 2022 03:50:07 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647255010;\n\tbh=BPyN1kRQ7D/RmqdilV8OLRwIYbWI4etypJiJTeUtHJg=;\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=rO2L8ITYWKeU5Hq1h+HEUiYqKywdaB7258AR/VaMNWX/W/1yQONRzl8cpCcucSdiU\n\t1ywmBChYJhQbkHxzCSmeJeUI1rWidb3ZMgr7UiAGCXxlOGU6NcGvwcM0H4kGb6fezv\n\tzMe5IdocgTVcp66rtTJCGzcbttLjfcfP1bZLQWc3xyWkRQtV8FfrIGKGmE+gRZ+88S\n\tqYG5kW6RjHD1gyJkEvj3B5lHtHEjUrWFVZyV0VC+X+POYbA/Utj8uEuTnPenbR0EjC\n\tRHbQdFeEnwpi77sWERAwAs50WLFS7v+iXW4iq2MKbnv7KykC11Qy1LdWzk4qFTBc7Q\n\tU3da9YaXlZYog==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=CfLxXRsID0vC/z6ct0EKAA38EX3ir1prfsc8no4Kzs8=;\n\tb=RCdrsW79rdVJcu/QHf8AypGFKwK+ikk3tGzrom2tlcmT6/yzWt5yjQEEG8Ckhsrox+\n\tbVmgWrX6cb4QUFEliu9xpgQjUpKiCAsvIIXS+bo+rQzWLhpHNQDLkIYxj7w39gGH4yV1\n\tDjBtNsZHC3Ra1KDmNSBO6ZSR2SzKCYB4M48IRVHKk2qi/N1WtQ7FDgfKIevn6eylb/TK\n\tjzWNtgdPx5iYoAt5YESa4U6hNWPT4Bq7ovwX5qdg7mADXSuV5/7RAmgn6635q9j9SCXV\n\tCzphgxXFnuB6jf4fiN67ge6oG/CcC7G6UycvVGjwJZVIMolQhsBukHgrI2MOlaImC99n\n\tZizw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"RCdrsW79\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=CfLxXRsID0vC/z6ct0EKAA38EX3ir1prfsc8no4Kzs8=;\n\tb=vr4yY3ir9tD4cbxQ3X5P+zUJNbHeTR47/10dT8sy93SFXvo8H//m1AxRtFYRh05/vo\n\tkCCtSQ3Bn01lcymLlXTvwpLHQ1qheCpI2zwrE+daQEOy/arvHg8oEilt4vmE/U4mCE3M\n\t9Uk1LPuN5cgQ+GpwM0A+XH9yH9IjEn1LmTq+JLkqaQPu7uLZpuSVmBOwxIEmLE9qw92O\n\tqhtKzB7ws14CVe/NtnWozwmeUsCSOIS2Bhx0YDrXqL5dqNVcNzC7wejh0jZfhyWmYwGm\n\tYE67F+Ozlq6v2VcpAyCXFpf/vhVegto5/UQSF319Iu+qjAyYRrge9ZCeQ1WATWjTqocF\n\tPpcQ==","X-Gm-Message-State":"AOAM531y3hcSw5jD5oBiDWVyM6eeO4RxtFPMKPwoP/tzfhICTLnzKn3I\n\t9zyocrmvGTRDl/oEl2RcW/8ALH9JPCT0Nb+k3TF5WA==","X-Google-Smtp-Source":"ABdhPJx4SoxHGoYQ94hPfPx2/7En2JIzoa8O/A3E7yEB4ilsfKtJzSYU3NIQf8r47AP/xDKwGQE/zPE0WcPa5HFK2Ys=","X-Received":"by 2002:a19:6a03:0:b0:448:373b:dca6 with SMTP id\n\tu3-20020a196a03000000b00448373bdca6mr13183223lfu.611.1647255006380;\n\tMon, 14 Mar 2022 03:50:06 -0700 (PDT)","MIME-Version":"1.0","References":"<20220307124633.115452-1-naush@raspberrypi.com>\n\t<20220307124633.115452-5-naush@raspberrypi.com>\n\t<Yi4V+oBS8oVzky4e@pendragon.ideasonboard.com>","In-Reply-To":"<Yi4V+oBS8oVzky4e@pendragon.ideasonboard.com>","Date":"Mon, 14 Mar 2022 10:49:50 +0000","Message-ID":"<CAEmqJPq7nMSwNT7yGMaeHSVDiECn=YaMoxqZejwAZVC2xhxGzQ@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"00000000000082978505da2b71be\"","Subject":"Re: [libcamera-devel] [PATCH v1 4/6] pipeline: raspberrypi: Add a\n\treconfigured flag","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]