[{"id":28535,"web_url":"https://patchwork.libcamera.org/comment/28535/","msgid":"<20240122143100.GA12845@pendragon.ideasonboard.com>","date":"2024-01-22T14:31:00","subject":"Re: [PATCH v2] pipeline: rpi: always initialize the embedded buffer\n\tin tryRunPipeline","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jan 22, 2024 at 08:33:10AM -0500, Elias Naur wrote:\n> Vc4CameraData::findMatchBuffers may return successfully with a null\n> embedded buffer, in which case the embedded buffer id would be left\n> uninitialized.\n> \n> Without this change, libcamera v0.2.0 usually crashes for me with an\n> assertion error:\n> \n>  ipa_base.cpp:397 assertion \"it != buffers_.end()\" failed in prepareIsp()\n> \n> Signed-off-by: Elias Naur <mail@eliasnaur.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nAnd I'll add the\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\nthat Naush sent for v1.\n\n> ---\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index 26102ea7..a52f0e7a 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -945,6 +945,7 @@ void Vc4CameraData::tryRunPipeline()\n>  \tparams.requestControls = request->controls();\n>  \tparams.ipaContext = request->sequence();\n>  \tparams.delayContext = bayerFrame.delayContext;\n> +\tparams.buffers.embedded = 0;\n>  \n>  \tif (embeddedBuffer) {\n>  \t\tunsigned int embeddedId = unicam_[Unicam::Embedded].getBufferId(embeddedBuffer);","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 AA211BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 Jan 2024 14:30:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B0A966291F;\n\tMon, 22 Jan 2024 15:30:58 +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 CF99061D30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Jan 2024 15:30:56 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 96602C67;\n\tMon, 22 Jan 2024 15:29:43 +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=\"dfAAp70b\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705933783;\n\tbh=qEQpCpRgXm7o4Uz5PFMvpi7Fy94TlZgT5zRR4TT5OcE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dfAAp70bAKIfXoCFs1K4Oo6XabtuhcgvGQOgqhOi169l9blr74lJ5GZiouzgBqH5q\n\tqyFlYosQWoNd0+bDEyR8RjludYKk+iKkW17vTd5GL7z4/Q+Wtjx0aCeuQwO6YsiMGp\n\t9gG2PsDcCAHNE70IZHc5agD86EAJB4TeMREA9tSs=","Date":"Mon, 22 Jan 2024 16:31:00 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Elias Naur <mail@eliasnaur.com>","Subject":"Re: [PATCH v2] pipeline: rpi: always initialize the embedded buffer\n\tin tryRunPipeline","Message-ID":"<20240122143100.GA12845@pendragon.ideasonboard.com>","References":"<20240122133332.64190-1-mail@eliasnaur.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240122133332.64190-1-mail@eliasnaur.com>","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]