[{"id":28929,"web_url":"https://patchwork.libcamera.org/comment/28929/","msgid":"<171024286668.252503.12626997845758067691@ping.linuxembedded.co.uk>","date":"2024-03-12T11:27:46","subject":"Re: [PATCH v2 4/4] libcamera: ipu3: Return Raw buffers on error","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi (2024-03-11 12:32:32)\n> When a Request is cancelled, all its application-provided buffers\n> are completed and the paramters and stats buffer are made available\n> again to the pipeline handler.\n> \n> If the RAW buffer doesn't come from the application (no RAW stream\n> requested) it comes from the CIO2Device internal pool. Return it to\n> the CIO2 pool in case of error.\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 0c9d3167d2e6..57d0d6ed4758 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -1384,6 +1384,9 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n>                 availableParamBuffers_.push(request->paramBuffer);\n>                 availableStatBuffers_.push(request->statBuffer);\n>  \n> +               /* Return RAW buffer to the CIO2. */\n> +               cio2_.tryReturnBuffer(buffer);\n> +\n>                 pipe()->completeRequest(request->_o<Request>());\n>                 return;\n>         }\n> -- \n> 2.43.2\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 3E496BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Mar 2024 11:27:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAE9C62C8B;\n\tTue, 12 Mar 2024 12:27:50 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A31E062973\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Mar 2024 12:27:49 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E06B1E4;\n\tTue, 12 Mar 2024 12:27:27 +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=\"TSXOJ6vH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1710242848;\n\tbh=/WLG4qk/V+qsW23djl3a71c2DkxPqCmPNADt7mqE/pk=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=TSXOJ6vH0pjcwaxzMe/cD/n8y+rU89uKBFDDzR2s/5KEeKxGTXzZDCw0OhKreXyI+\n\t0RDSGhbxTpGhU7FG1n2zb1erRFlhyaIYj3R8rW2l7Y8sQuVJiQR6erpYwPUcTHp0l+\n\tsXlonf/Xqd8kYUBD4DHuMG8fPSZV4Gqo+e0h3pvM=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240311123234.32925-5-jacopo.mondi@ideasonboard.com>","References":"<20240311123234.32925-1-jacopo.mondi@ideasonboard.com>\n\t<20240311123234.32925-5-jacopo.mondi@ideasonboard.com>","Subject":"Re: [PATCH v2 4/4] libcamera: ipu3: Return Raw buffers on error","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 12 Mar 2024 11:27:46 +0000","Message-ID":"<171024286668.252503.12626997845758067691@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>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]