[{"id":1282,"web_url":"https://patchwork.libcamera.org/comment/1282/","msgid":"<20190405115348.GD23466@bigcity.dyn.berto.se>","date":"2019-04-05T11:53:48","subject":"Re: [libcamera-devel] [PATCH v3 8/8] libcamera: ipu3: Connect\n\tviewfinder's BufferReady signal","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 efforts!\n\nOn 2019-04-03 17:07:35 +0200, Jacopo Mondi wrote:\n> Connect the viewfinder buffer ready signal to the IPU3CameraData slot\n> that complets the buffer first, and if not waiting for other buffers\n> completes the request as well.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nDepending on the outcome of the question in 7/8 I think this patch looks \ngood. I would add my tag if I felt comfortable with 7/8.\n\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +++++++-----\n>  1 file changed, 7 insertions(+), 5 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 17e3e8677e28..706e4f647ed7 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -167,7 +167,7 @@ private:\n>  \t\t{\n>  \t\t}\n>  \n> -\t\tvoid imguOutputBufferReady(Buffer *buffer);\n> +\t\tvoid imguCaptureBufferReady(Buffer *buffer);\n>  \t\tvoid imguInputBufferReady(Buffer *buffer);\n>  \t\tvoid cio2BufferReady(Buffer *buffer);\n>  \n> @@ -755,7 +755,9 @@ int PipelineHandlerIPU3::registerCameras()\n>  \t\tdata->imgu_->input_->bufferReady.connect(data.get(),\n>  \t\t\t\t\t&IPU3CameraData::imguInputBufferReady);\n>  \t\tdata->imgu_->output_.dev->bufferReady.connect(data.get(),\n> -\t\t\t\t\t&IPU3CameraData::imguOutputBufferReady);\n> +\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n> +\t\tdata->imgu_->viewfinder_.dev->bufferReady.connect(data.get(),\n> +\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n>  \n>  \t\t/* Create and register the Camera instance. */\n>  \t\tstd::string cameraName = cio2->sensor_->entityName() + \" \"\n> @@ -799,13 +801,13 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n>   *\n>   * Buffers completed from the ImgU output are directed to the application.\n>   */\n> -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> +void PipelineHandlerIPU3::IPU3CameraData::imguCaptureBufferReady(Buffer *buffer)\n>  {\n>  \tRequest *request = requestFromBuffer(buffer);\n>  \tASSERT(request);\n>  \n> -\tpipe_->completeBuffer(camera_, request, buffer);\n> -\tpipe_->completeRequest(camera_, request);\n> +\tif (pipe_->completeBuffer(camera_, request, buffer))\n> +\t\tpipe_->completeRequest(camera_, request);\n>  }\n>  \n>  /**\n> -- \n> 2.21.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":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x143.google.com (mail-lf1-x143.google.com\n\t[IPv6:2a00:1450:4864:20::143])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A89EC60DB3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Apr 2019 13:53:49 +0200 (CEST)","by mail-lf1-x143.google.com with SMTP id t15so320282lfl.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Apr 2019 04:53:49 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tv4sm2394954ljv.4.2019.04.05.04.53.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 05 Apr 2019 04:53:48 -0700 (PDT)"],"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\t:user-agent; bh=3Z/OrvwSuQBgKtTcoIPKOGCQxWoR2p1cOJg8C4PEytg=;\n\tb=lRileQyiKJbdYpTJl2+wYh2vVKEnXK86ToN5DprkFWAa/781Q+yM3xTvJQbB5am9ES\n\towemM1T20u1NnaVNvCEPx7OC2iOfw6tiBxZB8M7Et1Yh8uO55jq3npNJEfbcn7W9P/G0\n\t4AgqrF/h0SOB4Rav6WQUOoVfdSbefH99GcrypfAvi/Yf7m0MI5SkkZR3E4tUAXP91367\n\tGZopDoQDpqg/y3708vki4A2htAKlCoyCRMSU0VY6RI9BtqnYM1ki8uBqJkmn/iB/0VWB\n\tuXJPrZ8yWXb88y3gZTpsiWuBs0bnNvOARK0qrJdTAG/v2RPeBpIJrH+G2XMGv69ZV8P8\n\tAKvw==","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:user-agent;\n\tbh=3Z/OrvwSuQBgKtTcoIPKOGCQxWoR2p1cOJg8C4PEytg=;\n\tb=QLfdjzrZxf0yelKE+UXiTxB26+ZlccL6iOV1iT2qrd2JPj3Cbadl+9XreoW7xMa42+\n\tTHsKtdC71GGa//k4RB0S74B22jA5qFalBVWCL8vK8CW/Ak13Td0A0I3LC1dgoGqxO6mc\n\t/mz07oK6gbyDbLB6fjfdky+fQulrYKQmOtQu8kvksJTO8wcZ4K10bpYfTTwh+YN5zasl\n\tDrbtrl/TNf5URmxq7Ak+Mn81unnFQbCTwDV2drb7JQ49Xn9jfTawRNy05C+IKY5FrKwa\n\t3yrAyH4XNywEjhWzeR0O2xEtLb/IViiG8xcWZ6mrcf8AFD9CDULHKzuCjBA52NBawcB6\n\teWGg==","X-Gm-Message-State":"APjAAAWtfyYPXes4CM2NoTMkKcnRp50TQ0JBinejdUjNo/alHwgQTwmc\n\tB01UbynA3Za2d6MRUcX7F+PgSQ==","X-Google-Smtp-Source":"APXvYqwFmXF2PMMFYzXazgOhYzrketanughAJ5kLRKRnLSy/jLOHMMxMXMZfteV+84WUvt46SpYEVg==","X-Received":"by 2002:ac2:5966:: with SMTP id h6mr6369636lfp.86.1554465229184; \n\tFri, 05 Apr 2019 04:53:49 -0700 (PDT)","Date":"Fri, 5 Apr 2019 13:53:48 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190405115348.GD23466@bigcity.dyn.berto.se>","References":"<20190403150735.27580-1-jacopo@jmondi.org>\n\t<20190403150735.27580-9-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190403150735.27580-9-jacopo@jmondi.org>","User-Agent":"Mutt/1.11.3 (2019-02-01)","Subject":"Re: [libcamera-devel] [PATCH v3 8/8] libcamera: ipu3: Connect\n\tviewfinder's BufferReady signal","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 05 Apr 2019 11:53:50 -0000"}},{"id":1289,"web_url":"https://patchwork.libcamera.org/comment/1289/","msgid":"<20190405154526.GB5184@pendragon.ideasonboard.com>","date":"2019-04-05T15:45:26","subject":"Re: [libcamera-devel] [PATCH v3 8/8] libcamera: ipu3: Connect\n\tviewfinder's BufferReady signal","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello Jacopo,\n\nThank you for the patch.\n\nOn Fri, Apr 05, 2019 at 01:53:48PM +0200, Niklas Söderlund wrote:\n> On 2019-04-03 17:07:35 +0200, Jacopo Mondi wrote:\n> > Connect the viewfinder buffer ready signal to the IPU3CameraData slot\n> > that complets the buffer first, and if not waiting for other buffers\n\ns/complets/completes/\n\n> > completes the request as well.\n\nI'm not sure to understand this sentence :-)\n\n> > \n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> \n> Depending on the outcome of the question in 7/8 I think this patch looks \n> good. I would add my tag if I felt comfortable with 7/8.\n\nSame here, even though I think changes will be needed in\nPipelineHandlerIPU3::IPU3CameraData::imguCaptureBufferReady().\n\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +++++++-----\n> >  1 file changed, 7 insertions(+), 5 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 17e3e8677e28..706e4f647ed7 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -167,7 +167,7 @@ private:\n> >  \t\t{\n> >  \t\t}\n> >  \n> > -\t\tvoid imguOutputBufferReady(Buffer *buffer);\n> > +\t\tvoid imguCaptureBufferReady(Buffer *buffer);\n> >  \t\tvoid imguInputBufferReady(Buffer *buffer);\n> >  \t\tvoid cio2BufferReady(Buffer *buffer);\n> >  \n> > @@ -755,7 +755,9 @@ int PipelineHandlerIPU3::registerCameras()\n> >  \t\tdata->imgu_->input_->bufferReady.connect(data.get(),\n> >  \t\t\t\t\t&IPU3CameraData::imguInputBufferReady);\n> >  \t\tdata->imgu_->output_.dev->bufferReady.connect(data.get(),\n> > -\t\t\t\t\t&IPU3CameraData::imguOutputBufferReady);\n> > +\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n> > +\t\tdata->imgu_->viewfinder_.dev->bufferReady.connect(data.get(),\n> > +\t\t\t\t\t&IPU3CameraData::imguCaptureBufferReady);\n> >  \n> >  \t\t/* Create and register the Camera instance. */\n> >  \t\tstd::string cameraName = cio2->sensor_->entityName() + \" \"\n> > @@ -799,13 +801,13 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n> >   *\n> >   * Buffers completed from the ImgU output are directed to the application.\n> >   */\n> > -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> > +void PipelineHandlerIPU3::IPU3CameraData::imguCaptureBufferReady(Buffer *buffer)\n> >  {\n> >  \tRequest *request = requestFromBuffer(buffer);\n> >  \tASSERT(request);\n> >  \n> > -\tpipe_->completeBuffer(camera_, request, buffer);\n> > -\tpipe_->completeRequest(camera_, request);\n> > +\tif (pipe_->completeBuffer(camera_, request, buffer))\n> > +\t\tpipe_->completeRequest(camera_, request);\n> >  }\n> >  \n> >  /**","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 497D460DB3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Apr 2019 17:45:37 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [109.140.214.47])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C8D57E2;\n\tFri,  5 Apr 2019 17:45:36 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1554479137;\n\tbh=gWH6J3bCuGnzNt1e5I9rGQ1WJvZM5UzjLkkZfL8S58c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ix4a39y1FR3il2PqIXj3g8AMVku0fAavQGwYlwhWIErZXS3f5UjxYg1LYaKmrmMpO\n\tEtstt0FIZ0WrmRApzBmhiAWlmwHNiMV/+YDwTihMYHsDrlDwQuFsRl8E7dovkWT5HZ\n\tUCybYMqF2VPRt9U73TQdtWZbKgY1tmchGPtsSgNQ=","Date":"Fri, 5 Apr 2019 18:45:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20190405154526.GB5184@pendragon.ideasonboard.com>","References":"<20190403150735.27580-1-jacopo@jmondi.org>\n\t<20190403150735.27580-9-jacopo@jmondi.org>\n\t<20190405115348.GD23466@bigcity.dyn.berto.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190405115348.GD23466@bigcity.dyn.berto.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 8/8] libcamera: ipu3: Connect\n\tviewfinder's BufferReady signal","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 05 Apr 2019 15:45:37 -0000"}}]