[{"id":23109,"web_url":"https://patchwork.libcamera.org/comment/23109/","msgid":"<YodqaLDUgwGzC+Y3@pendragon.ideasonboard.com>","date":"2022-05-20T10:16:08","subject":"Re: [libcamera-devel] [PATCH 2/5] cam: Queue requests\n\tunconditionally","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Wed, May 18, 2022 at 07:19:18PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> The CaptureSession::queueRequest() function increments the queueCount_\n> counter, which tracks the number of requests queued to the camera.\n> \n> The number of queued requests is currently compared with the capture\n> limit which should instead only be compared with the number of captured\n> frames, something which already happens in the\n> CameraSession::processRequest() function.\n> \n> Remove the check and only compare the capture limit with the actual\n> number of captured frames. If more requests than the frame capture\n> limits end up being queued to the Camera, they will be released on\n> Camera::stop().\n\nThey will, but the point of this check is to capture exactly\ncaptureLimit_ frames. See commit a3c75bba84ba (\"cam: Only queue the\nexact number of requests asked for\"). I'd rather keep it if possible.\n\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/cam/camera_session.cpp | 3 ---\n>  1 file changed, 3 deletions(-)\n> \n> diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp\n> index 71e6bd605139..186072817367 100644\n> --- a/src/cam/camera_session.cpp\n> +++ b/src/cam/camera_session.cpp\n> @@ -327,9 +327,6 @@ int CameraSession::startCapture()\n>  \n>  int CameraSession::queueRequest(Request *request)\n>  {\n> -\tif (captureLimit_ && queueCount_ >= captureLimit_)\n> -\t\treturn 0;\n> -\n>  \tqueueCount_++;\n>  \n>  \treturn camera_->queueRequest(request);","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 56AFCC0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 May 2022 10:16:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A9C4B61FB9;\n\tFri, 20 May 2022 12:16:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C46F60440\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 May 2022 12:16:15 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [45.131.31.124])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B29C73E4;\n\tFri, 20 May 2022 12:16:14 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653041776;\n\tbh=Wpi+SW9c8+I6IOdOo4wwmBuZR0QjTomDtuaYdVHJG8k=;\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=VrF1w524R+TdxCI6YrzpdiT+eX3aJb96MLOF1HQbWtLYU3cMEKJXQ/zoC4jmWHCir\n\t4VgEJ5LDtbsdmy7EswXGO7e/OinLiuWlOVk6X9XiZIJJqwPYd+uH0J38OqsmqAEF84\n\tFmjKs2B9YWIUja8o04zLQwj2lIh4lDbCaW9vwB3vUGM/jYFAW/BsgFpompL1WN3d8v\n\tfw+sVYnbVX2mFTEKoe3hmExrlMWJbTq5sE0pOs8Nhs8dFHVXKweXwFOjHUZDEJXmId\n\tYwwwb0eMzoMwJqWjq7CxUFIVeQwxrAQn9xscnO+82KrEUJQqYMIe6lEGaOig7zlXBj\n\tXr4LQvft+gr1w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1653041774;\n\tbh=Wpi+SW9c8+I6IOdOo4wwmBuZR0QjTomDtuaYdVHJG8k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iRcqxVVTb/Cdz7rt1RgzdSfW5JoRW39oFkv1m7U6g1zNz9z1TVLljpnqECqYoNmGf\n\t0x7Ej7MZNCHEtrfwVaVc0nYSqYZkrNMuI626qxQ/Y9oJ9AnOS663noiTAoG+D24/Zp\n\t+lqYU2ekee66leri8ggYARQbyePniaA4RtiDCuVE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iRcqxVVT\"; dkim-atps=neutral","Date":"Fri, 20 May 2022 13:16:08 +0300","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YodqaLDUgwGzC+Y3@pendragon.ideasonboard.com>","References":"<20220518171921.244168-1-jacopo@jmondi.org>\n\t<20220518171921.244168-3-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220518171921.244168-3-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 2/5] cam: Queue requests\n\tunconditionally","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":23115,"web_url":"https://patchwork.libcamera.org/comment/23115/","msgid":"<20220520160233.cb3w76535iudfufy@uno.localdomain>","date":"2022-05-20T16:02:33","subject":"Re: [libcamera-devel] [PATCH 2/5] cam: Queue requests\n\tunconditionally","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Fri, May 20, 2022 at 01:16:08PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Wed, May 18, 2022 at 07:19:18PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > The CaptureSession::queueRequest() function increments the queueCount_\n> > counter, which tracks the number of requests queued to the camera.\n> >\n> > The number of queued requests is currently compared with the capture\n> > limit which should instead only be compared with the number of captured\n> > frames, something which already happens in the\n> > CameraSession::processRequest() function.\n> >\n> > Remove the check and only compare the capture limit with the actual\n> > number of captured frames. If more requests than the frame capture\n> > limits end up being queued to the Camera, they will be released on\n> > Camera::stop().\n>\n> They will, but the point of this check is to capture exactly\n> captureLimit_ frames. See commit a3c75bba84ba (\"cam: Only queue the\n> exact number of requests asked for\"). I'd rather keep it if possible.\n>\n\nFine, I think this was mostly a drive-by cleanup\n\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/cam/camera_session.cpp | 3 ---\n> >  1 file changed, 3 deletions(-)\n> >\n> > diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp\n> > index 71e6bd605139..186072817367 100644\n> > --- a/src/cam/camera_session.cpp\n> > +++ b/src/cam/camera_session.cpp\n> > @@ -327,9 +327,6 @@ int CameraSession::startCapture()\n> >\n> >  int CameraSession::queueRequest(Request *request)\n> >  {\n> > -\tif (captureLimit_ && queueCount_ >= captureLimit_)\n> > -\t\treturn 0;\n> > -\n> >  \tqueueCount_++;\n> >\n> >  \treturn camera_->queueRequest(request);\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 6C642C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 May 2022 16:02:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A5D1E65660;\n\tFri, 20 May 2022 18:02:39 +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 8E5EE60440\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 May 2022 18:02:38 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id C7B5060002;\n\tFri, 20 May 2022 16:02:37 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653062559;\n\tbh=+IdfecoK4jNXSmkDUKYZY1iH+ajHKV6MhuRCR3IYzXg=;\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=fGzGYimojQSIzeyXAeLYZXbwUPiiZrTFewMdHPUiEi8Y+nHZyTDU9OkQqq1M7yRxz\n\tk+9h3wr4wCPjhnbEGf/NIZv9MrqGkz9phIM/OcGf8AF9k/kJ9SQJ49FrM6GmFFmlBe\n\tO/V+f4Kqq+KFUKhN2/h2KeMcYSwuSHXPVLMPoPw5s8wai+zqyZVKQYkJObYyoMEcHk\n\tT3wMF6oIiSQdM7FKlWX4xKAWMf0xXCKRTZ1eP5Tn1LWlDJv6zUaCbJ2krmXeefaSUc\n\tNG69VcEgdSbAzjhJQR6X69hQEGJv2NBuAs/5D2MUFuXUUQoR8bfaziaBkVmcyo8F/i\n\tpSoDafxku7iIg==","Date":"Fri, 20 May 2022 18:02:33 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220520160233.cb3w76535iudfufy@uno.localdomain>","References":"<20220518171921.244168-1-jacopo@jmondi.org>\n\t<20220518171921.244168-3-jacopo@jmondi.org>\n\t<YodqaLDUgwGzC+Y3@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YodqaLDUgwGzC+Y3@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/5] cam: Queue requests\n\tunconditionally","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@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]