[{"id":12513,"web_url":"https://patchwork.libcamera.org/comment/12513/","msgid":"<20200915011620.GX15543@pendragon.ideasonboard.com>","date":"2020-09-15T01:16:20","subject":"Re: [libcamera-devel] [PATCH v2 11/13] libcamera: pipeline: rkisp1:\n\tTrack buffers for self path","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 Mon, Sep 14, 2020 at 04:21:47PM +0200, Niklas Söderlund wrote:\n> In preparation of supporting both the main and self path extend\n> RkISP1FrameInfo to track buffers from the self path stream.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 15 ++++++++++++---\n>  1 file changed, 12 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 01cd461427e3a6dc..bc961f8e78f2c979 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -69,6 +69,7 @@ struct RkISP1FrameInfo {\n>  \tFrameBuffer *paramBuffer;\n>  \tFrameBuffer *statBuffer;\n>  \tFrameBuffer *mainPathBuffer;\n> +\tFrameBuffer *selfPathBuffer;\n>  \n>  \tbool paramFilled;\n>  \tbool paramDequeued;\n> @@ -272,7 +273,8 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n>  \n>  \tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n> -\tif (!mainPathBuffer) {\n> +\tFrameBuffer *selfPathBuffer = request->findBuffer(&data->selfPathStream_);\n> +\tif (!mainPathBuffer && !selfPathBuffer) {\n>  \t\tLOG(RkISP1, Error)\n>  \t\t\t<< \"Attempt to queue request with invalid stream\";\n>  \t\treturn nullptr;\n\nCan't we drop this check, doesn't Camera::queueRequest() handle this\nalready ?\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> @@ -287,6 +289,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \tinfo->request = request;\n>  \tinfo->paramBuffer = paramBuffer;\n>  \tinfo->mainPathBuffer = mainPathBuffer;\n> +\tinfo->selfPathBuffer = selfPathBuffer;\n>  \tinfo->statBuffer = statBuffer;\n>  \tinfo->paramFilled = false;\n>  \tinfo->paramDequeued = false;\n> @@ -345,7 +348,8 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n>  \n>  \t\tif (info->paramBuffer == buffer ||\n>  \t\t    info->statBuffer == buffer ||\n> -\t\t    info->mainPathBuffer == buffer)\n> +\t\t    info->mainPathBuffer == buffer ||\n> +\t\t    info->selfPathBuffer == buffer)\n>  \t\t\treturn info;\n>  \t}\n>  \n> @@ -417,7 +421,12 @@ protected:\n>  \n>  \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n>  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n> -\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n> +\n> +\t\tif (info->mainPathBuffer)\n> +\t\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n> +\n> +\t\tif (info->selfPathBuffer)\n> +\t\t\tpipe_->selfPathVideo_->queueBuffer(info->selfPathBuffer);\n>  \t}\n>  \n>  private:","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 D3FD1C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Sep 2020 01:16:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F5D462DAB;\n\tTue, 15 Sep 2020 03:16:54 +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 DBB8E62901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Sep 2020 03:16:52 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DE4E275;\n\tTue, 15 Sep 2020 03:16:48 +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=\"Y7f6/o7n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600132608;\n\tbh=jfssG1xQMkehjp4BpQz6lV2Af15QN89bZeKwxjRW2x4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Y7f6/o7nWR+tYgebax3KpaySWw5pcA8B2shQhksYIBPYJxN2cqjxn89ygmCGt9GQd\n\tcmrmJu4hoVgo20euD7LOZx4J1h8wAFtVKp/bUXjr/Ai4IhXwjRvOY5zIyMPXn8RVaB\n\tKgrJY/TPKjnRJ5K2VG1pRaJSy7gc2/CFTzf8O8p0=","Date":"Tue, 15 Sep 2020 04:16:20 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200915011620.GX15543@pendragon.ideasonboard.com>","References":"<20200914142149.63857-1-niklas.soderlund@ragnatech.se>\n\t<20200914142149.63857-12-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200914142149.63857-12-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v2 11/13] libcamera: pipeline: rkisp1:\n\tTrack buffers for self path","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>"}}]