[{"id":10894,"web_url":"https://patchwork.libcamera.org/comment/10894/","msgid":"<20200627095651.apqrcb4ppzwbpbcx@uno.localdomain>","date":"2020-06-27T09:56:51","subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Sat, Jun 27, 2020 at 05:00:33AM +0200, Niklas Söderlund wrote:\n> When the IPU3 pipeline was first developed buffers of sinks from the\n> ImgU that where not active still needed to have allocated buffers\n\nI think somewhere there's a \"buffer\" too much, I get what you mean,\nbut is slightly confused.\n\n> associated with them or streaming was not allowed to start. This is no\n> longer true, it's enough that the sinks have imported buffers for\n> streaming to start. As we already need to import buffers for streams\n> that are active we can align the two cases and always import buffers.\n\nas this changed in the driver since we first developed this, or has\nthis always been the case?\n\nAlso, as asked in 2/13, do we know which output has to have buffers\nmandatorily allocated ?\n\n>\n> With this there is no longer a reason to store the allocated\n> FrameBuffers to keep them alive and the vector tracking them can be\n> removed.\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 25 ++++---------------------\n>  1 file changed, 4 insertions(+), 21 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 405550b1302fb370..5a473e18c082cee8 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -49,7 +49,6 @@ public:\n>  \t\tV4L2VideoDevice *dev;\n>  \t\tunsigned int pad;\n>  \t\tstd::string name;\n> -\t\tstd::vector<std::unique_ptr<FrameBuffer>> buffers;\n>  \t};\n>\n>  \tImgUDevice()\n> @@ -1124,9 +1123,6 @@ int ImgUDevice::configureOutput(ImgUOutput *output,\n>   */\n>  int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n>  {\n> -\tIPU3Stream *outStream = &data->outStream_;\n> -\tIPU3Stream *vfStream = &data->vfStream_;\n> -\n>  \t/* Share buffers between CIO2 output and ImgU input. */\n>  \tint ret = input_->importBuffers(bufferCount);\n>  \tif (ret) {\n> @@ -1147,28 +1143,15 @@ int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n>  \t\tgoto error;\n>  \t}\n>\n> -\t/*\n> -\t * Allocate buffers for both outputs. If an output is active, prepare\n> -\t * for buffer import, otherwise allocate internal buffers. Use the same\n> -\t * number of buffers in either case.\n> -\t */\n> -\tif (outStream->active_)\n> -\t\tret = output_.dev->importBuffers(bufferCount);\n> -\telse\n> -\t\tret = output_.dev->allocateBuffers(bufferCount,\n> -\t\t\t\t\t\t   &output_.buffers);\n> +\tret = output_.dev->importBuffers(bufferCount);\n>  \tif (ret < 0) {\n> -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU output buffers\";\n> +\t\tLOG(IPU3, Error) << \"Failed to import ImgU output buffers\";\n\nNit: I would leave the same error message, as the function that fails\nis called ImgUDevice::allocateBuffers(). The video device will\ncomplain anyway for the import error.\n\n>  \t\tgoto error;\n>  \t}\n>\n> -\tif (vfStream->active_)\n> -\t\tret = viewfinder_.dev->importBuffers(bufferCount);\n> -\telse\n> -\t\tret = viewfinder_.dev->allocateBuffers(bufferCount,\n> -\t\t\t\t\t\t       &viewfinder_.buffers);\n> +\tret = viewfinder_.dev->importBuffers(bufferCount);\n>  \tif (ret < 0) {\n> -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU viewfinder buffers\";\n> +\t\tLOG(IPU3, Error) << \"Failed to import ImgU viewfinder buffers\";\n>  \t\tgoto error;\n>  \t}\n>\n> --\n> 2.27.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 53D43C2E66\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 27 Jun 2020 09:53:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C679B609D6;\n\tSat, 27 Jun 2020 11:53:22 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2855D603B5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Jun 2020 11:53:21 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 6B57960002;\n\tSat, 27 Jun 2020 09:53:20 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Sat, 27 Jun 2020 11:56:51 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200627095651.apqrcb4ppzwbpbcx@uno.localdomain>","References":"<20200627030043.2088585-1-niklas.soderlund@ragnatech.se>\n\t<20200627030043.2088585-4-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200627030043.2088585-4-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":10902,"web_url":"https://patchwork.libcamera.org/comment/10902/","msgid":"<20200627103255.GC911447@oden.dyn.berto.se>","date":"2020-06-27T10:32:55","subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your feedback.\n\nOn 2020-06-27 11:56:51 +0200, Jacopo Mondi wrote:\n> Hi Niklas,\n> \n> On Sat, Jun 27, 2020 at 05:00:33AM +0200, Niklas Söderlund wrote:\n> > When the IPU3 pipeline was first developed buffers of sinks from the\n> > ImgU that where not active still needed to have allocated buffers\n> \n> I think somewhere there's a \"buffer\" too much, I get what you mean,\n> but is slightly confused.\n\nMe too, will fix.\n\n> \n> > associated with them or streaming was not allowed to start. This is no\n> > longer true, it's enough that the sinks have imported buffers for\n> > streaming to start. As we already need to import buffers for streams\n> > that are active we can align the two cases and always import buffers.\n> \n> as this changed in the driver since we first developed this, or has\n> this always been the case?\n\nNo idea, I recall trying something like this a year back on the old \nkernel. But I have not installed the kernel or diffed the source code \nbetween the kernel now and then nor the libcamera sources between now \nand the state it was around Automotive summit last year. It felt like a \nbit of busy work as we know the IPU3 kernel driver is not the best \nquality.\n\n> \n> Also, as asked in 2/13, do we know which output has to have buffers\n> mandatorily allocated ?\n\nOnly thru experimentation and reading the code. I have no official \ndocumentation.\n\n> \n> >\n> > With this there is no longer a reason to store the allocated\n> > FrameBuffers to keep them alive and the vector tracking them can be\n> > removed.\n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 25 ++++---------------------\n> >  1 file changed, 4 insertions(+), 21 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 405550b1302fb370..5a473e18c082cee8 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -49,7 +49,6 @@ public:\n> >  \t\tV4L2VideoDevice *dev;\n> >  \t\tunsigned int pad;\n> >  \t\tstd::string name;\n> > -\t\tstd::vector<std::unique_ptr<FrameBuffer>> buffers;\n> >  \t};\n> >\n> >  \tImgUDevice()\n> > @@ -1124,9 +1123,6 @@ int ImgUDevice::configureOutput(ImgUOutput *output,\n> >   */\n> >  int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n> >  {\n> > -\tIPU3Stream *outStream = &data->outStream_;\n> > -\tIPU3Stream *vfStream = &data->vfStream_;\n> > -\n> >  \t/* Share buffers between CIO2 output and ImgU input. */\n> >  \tint ret = input_->importBuffers(bufferCount);\n> >  \tif (ret) {\n> > @@ -1147,28 +1143,15 @@ int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n> >  \t\tgoto error;\n> >  \t}\n> >\n> > -\t/*\n> > -\t * Allocate buffers for both outputs. If an output is active, prepare\n> > -\t * for buffer import, otherwise allocate internal buffers. Use the same\n> > -\t * number of buffers in either case.\n> > -\t */\n> > -\tif (outStream->active_)\n> > -\t\tret = output_.dev->importBuffers(bufferCount);\n> > -\telse\n> > -\t\tret = output_.dev->allocateBuffers(bufferCount,\n> > -\t\t\t\t\t\t   &output_.buffers);\n> > +\tret = output_.dev->importBuffers(bufferCount);\n> >  \tif (ret < 0) {\n> > -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU output buffers\";\n> > +\t\tLOG(IPU3, Error) << \"Failed to import ImgU output buffers\";\n> \n> Nit: I would leave the same error message, as the function that fails\n> is called ImgUDevice::allocateBuffers(). The video device will\n> complain anyway for the import error.\n\nI would not, as this aligns to others messages in this function which \nhave done the switch allocate -> import with similar changes. Regarding \nthe function name be at ease I hope to refactor it away in a future \nseries :-)\n\n> \n> >  \t\tgoto error;\n> >  \t}\n> >\n> > -\tif (vfStream->active_)\n> > -\t\tret = viewfinder_.dev->importBuffers(bufferCount);\n> > -\telse\n> > -\t\tret = viewfinder_.dev->allocateBuffers(bufferCount,\n> > -\t\t\t\t\t\t       &viewfinder_.buffers);\n> > +\tret = viewfinder_.dev->importBuffers(bufferCount);\n> >  \tif (ret < 0) {\n> > -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU viewfinder buffers\";\n> > +\t\tLOG(IPU3, Error) << \"Failed to import ImgU viewfinder buffers\";\n> >  \t\tgoto error;\n> >  \t}\n> >\n> > --\n> > 2.27.0\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel","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 CCAB2C2E69\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 27 Jun 2020 10:32:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64BC9609D6;\n\tSat, 27 Jun 2020 12:32:58 +0200 (CEST)","from mail-lf1-x142.google.com (mail-lf1-x142.google.com\n\t[IPv6:2a00:1450:4864:20::142])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 93C66609C2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Jun 2020 12:32:57 +0200 (CEST)","by mail-lf1-x142.google.com with SMTP id y13so6441118lfe.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Jun 2020 03:32:57 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tm2sm1050267ljc.58.2020.06.27.03.32.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 27 Jun 2020 03:32:56 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"yOBM0ENU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=x+NEsdU67XMqFF+A9A9m6cWK5y93vpsN+nVX/K9KTig=;\n\tb=yOBM0ENUor818McemkZBcTK3EAs9lBT/RhIOcBcv9CNC1UsIm31FSfXbesFywsG1S5\n\tQ8KfR18iTBIonRW7axLiTyH2EFd/6G9U+150SuL6kydV0q0pEPb/H8b1Pw+w8uoroxG0\n\tJdv6oMBuXrraVutkWMYsacs/zQLFIK6+mhL3/LUnr2AZM2oUax+WF2FLP8o9flV2Njn1\n\t3IgIMA7mMTLfs+xKDESIrJWlEcBCDgxqNRghJKeugZXIHyVLkG+i8LtZfPs2UXrbysp8\n\tFybjMLKEBlocYfE7P2zp+LwukdIkIJdVRd9sftEcWzET6hcs1ZGrH8i210pXc+y63XFh\n\tqjGw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=x+NEsdU67XMqFF+A9A9m6cWK5y93vpsN+nVX/K9KTig=;\n\tb=PToa4r2yi8jCv1LdyPU/8PjvWlt3/TuGuuRJVCmgEQWYrqyrXXhsgdWSCHCRRy2+j0\n\to9zZ2GWO5yNixyXQEpPRgnsU98wap60irV0DJGXj4CFSOT6u4f/xpFHtF+FHaUdeVacP\n\tkkzYOGIXd2hlTF9/nBfbcV88TC6NnrJUK2v0MDgCLHZLHWbLN22fqlyPgGC9BoSVml6b\n\taGciWg8/s1m+UlGK/XG4hwSciuAYDIqRBhOd178eIRxn+/c9F6Fn3SEJlK0PJX3iOI2f\n\tpj2QAryn8Cpz3gRogUAFOKYfmdUljBUA4z4KRh0oUYPGlKj99GDwr0jRhX5MXnnPuKB+\n\tip5A==","X-Gm-Message-State":"AOAM5329BINx144Hz8d6omkli+lpEMa06KgTocj81zuP0rbkdqZnsNHa\n\txxxqXZCjOW33Ec4QCg5jFf5a9SHCX7s=","X-Google-Smtp-Source":"ABdhPJxAI2Q9CiQtKdQORBcC0TTy8ffk378JuYNbRBpQlTPEIFc1jqv1rz8knsLuyl+sYtuJDm2wSg==","X-Received":"by 2002:a05:6512:318f:: with SMTP id\n\ti15mr4323567lfe.203.1593253976779; \n\tSat, 27 Jun 2020 03:32:56 -0700 (PDT)","Date":"Sat, 27 Jun 2020 12:32:55 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200627103255.GC911447@oden.dyn.berto.se>","References":"<20200627030043.2088585-1-niklas.soderlund@ragnatech.se>\n\t<20200627030043.2088585-4-niklas.soderlund@ragnatech.se>\n\t<20200627095651.apqrcb4ppzwbpbcx@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200627095651.apqrcb4ppzwbpbcx@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":10905,"web_url":"https://patchwork.libcamera.org/comment/10905/","msgid":"<20200627155743.GB5966@pendragon.ideasonboard.com>","date":"2020-06-27T15:57:43","subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Sat, Jun 27, 2020 at 05:00:33AM +0200, Niklas Söderlund wrote:\n> When the IPU3 pipeline was first developed buffers of sinks from the\n> ImgU that where not active still needed to have allocated buffers\n> associated with them or streaming was not allowed to start. This is no\n> longer true, it's enough that the sinks have imported buffers for\n> streaming to start. As we already need to import buffers for streams\n> that are active we can align the two cases and always import buffers.\n> \n> With this there is no longer a reason to store the allocated\n> FrameBuffers to keep them alive and the vector tracking them can be\n> removed.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 25 ++++---------------------\n>  1 file changed, 4 insertions(+), 21 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 405550b1302fb370..5a473e18c082cee8 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -49,7 +49,6 @@ public:\n>  \t\tV4L2VideoDevice *dev;\n>  \t\tunsigned int pad;\n>  \t\tstd::string name;\n> -\t\tstd::vector<std::unique_ptr<FrameBuffer>> buffers;\n>  \t};\n>  \n>  \tImgUDevice()\n> @@ -1124,9 +1123,6 @@ int ImgUDevice::configureOutput(ImgUOutput *output,\n>   */\n>  int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n>  {\n> -\tIPU3Stream *outStream = &data->outStream_;\n> -\tIPU3Stream *vfStream = &data->vfStream_;\n> -\n>  \t/* Share buffers between CIO2 output and ImgU input. */\n>  \tint ret = input_->importBuffers(bufferCount);\n>  \tif (ret) {\n> @@ -1147,28 +1143,15 @@ int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n>  \t\tgoto error;\n>  \t}\n>  \n> -\t/*\n> -\t * Allocate buffers for both outputs. If an output is active, prepare\n> -\t * for buffer import, otherwise allocate internal buffers. Use the same\n> -\t * number of buffers in either case.\n> -\t */\n\nI'd keep a small comment here, maybe\n\n\t/* Import buffers for all outputs, regardless of whether the\n\t * corresponding stream is active or inactive, as the driver needs\n\t * buffers to be requested on the V4L2 devices in order to operate.\n\t */\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> -\tif (outStream->active_)\n> -\t\tret = output_.dev->importBuffers(bufferCount);\n> -\telse\n> -\t\tret = output_.dev->allocateBuffers(bufferCount,\n> -\t\t\t\t\t\t   &output_.buffers);\n> +\tret = output_.dev->importBuffers(bufferCount);\n>  \tif (ret < 0) {\n> -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU output buffers\";\n> +\t\tLOG(IPU3, Error) << \"Failed to import ImgU output buffers\";\n>  \t\tgoto error;\n>  \t}\n>  \n> -\tif (vfStream->active_)\n> -\t\tret = viewfinder_.dev->importBuffers(bufferCount);\n> -\telse\n> -\t\tret = viewfinder_.dev->allocateBuffers(bufferCount,\n> -\t\t\t\t\t\t       &viewfinder_.buffers);\n> +\tret = viewfinder_.dev->importBuffers(bufferCount);\n>  \tif (ret < 0) {\n> -\t\tLOG(IPU3, Error) << \"Failed to allocate ImgU viewfinder buffers\";\n> +\t\tLOG(IPU3, Error) << \"Failed to import ImgU viewfinder buffers\";\n>  \t\tgoto error;\n>  \t}\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 98945C2E69\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 27 Jun 2020 15:57:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 10C8F609C8;\n\tSat, 27 Jun 2020 17:57: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 26C5A603B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Jun 2020 17:57:47 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D665576;\n\tSat, 27 Jun 2020 17:57:46 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"eAn9Cubg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593273466;\n\tbh=odZF9rONJkHEJSYu5FGM1z/5/OrUxEgBLY2tmhHkHXA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eAn9CubgB+CN+NS+ZJy2VOGuVfKPVlmk/59V9STm/XCwdCR7LkssBcsVyD5zhMxJ3\n\tHv7ker7DZHyC3Y/OHKovvHuaFUKv0SutDp5QgSJed7n12JS6pCdNHJ2Fga9nvxibtL\n\tMnNTh/KNiSSjqfeU4jKikZvdLktQC/YywZw8Fxdc=","Date":"Sat, 27 Jun 2020 18:57:43 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200627155743.GB5966@pendragon.ideasonboard.com>","References":"<20200627030043.2088585-1-niklas.soderlund@ragnatech.se>\n\t<20200627030043.2088585-4-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200627030043.2088585-4-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 03/13] libcamera: ipu3: Always import\n\tbuffers for ImgU sinks","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]