{"id":19527,"url":"https://patchwork.libcamera.org/api/patches/19527/?format=json","web_url":"https://patchwork.libcamera.org/patch/19527/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240221174015.52958-6-jacopo.mondi@ideasonboard.com>","date":"2024-02-21T17:40:13","name":"[5/5] libcamera: ipu3: Return Raw buffers on error","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"3f25f1a30f3b0c326b37028099c0836f1dc7e608","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19527/mbox/","series":[{"id":4176,"url":"https://patchwork.libcamera.org/api/series/4176/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4176","date":"2024-02-21T17:40:08","name":"libcamera: Replace IPU3/RkISP1FrameInfo","version":1,"mbox":"https://patchwork.libcamera.org/series/4176/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19527/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19527/checks/","tags":{},"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 DF3B8C3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Feb 2024 17:40:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4F4A6281F;\n\tWed, 21 Feb 2024 18:40:34 +0100 (CET)","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 0F2CC62805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Feb 2024 18:40:29 +0100 (CET)","from localhost.localdomain (unknown\n\t[IPv6:2001:b07:5d2e:52c9:cc1e:e404:491f:e6ea])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 03F119EC;\n\tWed, 21 Feb 2024 18:40:20 +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=\"G5DzlPop\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708537221;\n\tbh=+XaQ5Ov4BVfEVahJ7Eafb+W0a15MLRT1NfZGI7e/+UU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=G5DzlPopJGktXOMY0iAVbyEtOaU/qfPNX3gem/TSIw4OHVziWwPDVGdezrrJwzmVw\n\t59V6VdpeHpgRETcaj6Bw8SyCMMwfts8UjXL/qvpQ4Up9eelW6HeOLVZbxFv4G1TyOe\n\tv+7relkLsn/xAgUPNa2WKE7hSUAeyHxorQCkoMVQ=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH 5/5] libcamera: ipu3: Return Raw buffers on error","Date":"Wed, 21 Feb 2024 18:40:13 +0100","Message-ID":"<20240221174015.52958-6-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240221174015.52958-1-jacopo.mondi@ideasonboard.com>","References":"<20240221174015.52958-1-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"When a Request is cancelled, all its application-provided buffers\nare completed and the paramters and stats buffer are made available\nagain to the pipeline handler.\n\nIf the RAW buffer doesn't come from the application (no RAW stream\nrequested) it comes from the CIO2Device internal pool. Return it to\nthe CIO2 pool in case of error.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex f61e4a10892e..bcbcfd3dc290 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1393,6 +1393,9 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \t\tavailableParamBuffers_.push(request->paramBuffer);\n \t\tavailableStatBuffers_.push(request->statBuffer);\n \n+\t\t/* Return RAW buffer to the CIO2. */\n+\t\tcio2_.tryReturnBuffer(buffer);\n+\n \t\tpipe()->completeRequest(request->_o<Request>());\n \t\treturn;\n \t}\n","prefixes":["5/5"]}