[{"id":10922,"web_url":"https://patchwork.libcamera.org/comment/10922/","msgid":"<20200628065509.GB5961@pendragon.ideasonboard.com>","date":"2020-06-28T06:55:09","subject":"Re: [libcamera-devel] [PATCH v2 02/13] libcamera: ipu3: Import\n\tinstead of allocate statistic buffers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Sun, Jun 28, 2020 at 02:15:21AM +0200, Niklas Söderlund wrote:\n> Statistics buffers are not yet used by the IPU3 pipeline, they are never\n> queued to the video device or in any other way consumed. The kernel\n> driver will however not allow video streaming to start if buffers are\n> not either allocated or imported on the video device. Instead of\n\ns/video device/statistics video device/\n\n> allocating the buffers wasting memory that is never used import buffers.\n\ns/used/used,/\n\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 8 +++++---\n>  1 file changed, 5 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index fba45935741e0e4e..405550b1302fb370 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -1135,11 +1135,13 @@ int ImgUDevice::allocateBuffers(IPU3CameraData *data, unsigned int bufferCount)\n>  \t}\n>  \n>  \t/*\n> -\t * Use for the stat's internal pool the same number of buffers as for\n> -\t * the input pool.\n> +\t * The kernel fails to start if buffers are not either imported or\n> +\t * allocated for the statisitcs video device. As statistics buffers are\n\ns/statisitcs/statistics/\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t * not yet used by the pipeline import buffers to save memory.\n> +\t *\n>  \t * \\todo To be revised when we'll actually use the stat node.\n>  \t */\n> -\tret = stat_.dev->allocateBuffers(bufferCount, &stat_.buffers);\n> +\tret = stat_.dev->importBuffers(bufferCount);\n>  \tif (ret < 0) {\n>  \t\tLOG(IPU3, Error) << \"Failed to allocate ImgU stat buffers\";\n>  \t\tgoto error;","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 75F19C2E69\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Jun 2020 06:55:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E3C80609D6;\n\tSun, 28 Jun 2020 08:55:14 +0200 (CEST)","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 D8CC1609C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 28 Jun 2020 08:55:12 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 544A54FB;\n\tSun, 28 Jun 2020 08:55:12 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dSEjOm6C\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593327312;\n\tbh=1vHFF4TMaDtff2WtxL2c5VFBkQ8rNBpnyy4dNTxEkVY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dSEjOm6C47ItIaq3dmCezJZOU0opIxoUypdUWdPy8Tro1D3aD+0Kcn5I24QVsLgdC\n\tBn5W8znWe/6oxcQhwA9ZP9BozCtii4R5cdzlHav6DtGnQQqUZIz+vZYe1wMo9EjcGQ\n\tpt3KtGZfIDcXKtT8pVi1L1h7ROGgyiE6hK7yQ+1s=","Date":"Sun, 28 Jun 2020 09:55:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200628065509.GB5961@pendragon.ideasonboard.com>","References":"<20200628001532.2685967-1-niklas.soderlund@ragnatech.se>\n\t<20200628001532.2685967-3-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200628001532.2685967-3-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v2 02/13] libcamera: ipu3: Import\n\tinstead of allocate statistic buffers","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","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]