[{"id":4317,"web_url":"https://patchwork.libcamera.org/comment/4317/","msgid":"<20200326164913.GX20581@pendragon.ideasonboard.com>","date":"2020-03-26T16:49:13","subject":"Re: [libcamera-devel] [RFCv2 2/7] libcamera: pipeline: rkisp1:\n\tQueue parameters even if they are not ready","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 Thu, Mar 26, 2020 at 05:08:14PM +0100, Niklas Söderlund wrote:\n> If the IPA have not filled in the parameters buffer still queue it to\n\ns/have/has/\n\n> hardware. Not queuing the buffer results in the pipeline and hardware\n> going out of sync.\n> \n> This is not a permanent fix of the problem and a todo is added to fix it\n> properly. This change do not make the situation worse as the state of\n\ns/do/does/\n\n> the pipeline is just as unknown as if no param buffer is queued as if one\n> with old content in it.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 18 ++++++++++++++----\n>  1 file changed, 14 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 2f909cef7c75ba0f..4ec74c5aa8286ffb 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -351,13 +351,23 @@ protected:\n>  \t\tif (!info)\n>  \t\t\tLOG(RkISP1, Fatal) << \"Frame not known\";\n>  \n> -\t\tif (info->paramFilled)\n> -\t\t\tpipe_->param_->queueBuffer(info->paramBuffer);\n> -\t\telse\n> +\t\t/*\n> +\t\t * \\todo: If parameters are not filled a better method to handle\n> +\t\t * the situation then queing a buffer with unkown content should\n\ns/then/than/\ns/unkown/unknown/\n\n> +\t\t * be used.\n> +\t\t *\n> +\t\t * It seems obsessive to keep an internal zeroed scratch\n\nobsessive ? Did you mean excessive ?\n\n> +\t\t * parameters buffer around as this should not happen uless the\n\ns/uless/unless/\n\n> +\t\t * devices is under too much load. Perhaps failing the request\n> +\t\t * and returning it to the applicaiton with an error code is better\n\ns/applicaiton/application/\n\n> +\t\t * then to queue it to hardware?\n\ns/then to queue/than queuing/\n\nAcked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\t\t */\n> +\t\tif (!info->paramFilled)\n>  \t\t\tLOG(RkISP1, Error)\n>  \t\t\t\t<< \"Parameters not ready on time for frame \"\n> -\t\t\t\t<< frame() << \", ignore parameters.\";\n> +\t\t\t\t<< frame();\n>  \n> +\t\tpipe_->param_->queueBuffer(info->paramBuffer);\n>  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n>  \t\tpipe_->video_->queueBuffer(info->videoBuffer);\n>  \t}","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B39F460412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 17:49:17 +0100 (CET)","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 1CD2D2DC;\n\tThu, 26 Mar 2020 17:49:17 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lOajcIrQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585241357;\n\tbh=YdG1y2KeTtm3StVzd/DRKVkbzs8boZfRDEF0PlsgWKo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lOajcIrQhBtl3Wh0llsjgj+gViwM1pXAXO7zFW9I4WZJM3+Pj0Tcm2vkVTr2LL4mF\n\t9/hiKhGxeGER+dvpGwP37vltoWhL5PsZ1AuO7817SLxdGL+Bn+3dvyvoFnfdTYcU/L\n\tB8i4f7dRbIfmbt9uX2Bzxli5AL9ZPAh0GY6lhe3k=","Date":"Thu, 26 Mar 2020 18:49:13 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200326164913.GX20581@pendragon.ideasonboard.com>","References":"<20200326160819.4088361-1-niklas.soderlund@ragnatech.se>\n\t<20200326160819.4088361-3-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200326160819.4088361-3-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [RFCv2 2/7] libcamera: pipeline: rkisp1:\n\tQueue parameters even if they are not ready","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>","X-List-Received-Date":"Thu, 26 Mar 2020 16:49:18 -0000"}}]