[{"id":35355,"web_url":"https://patchwork.libcamera.org/comment/35355/","msgid":"<7e07b79b-c380-4d28-8887-f8653b884bae@ideasonboard.com>","date":"2025-08-12T11:50:58","subject":"Re: [PATCH v2 10/16] pipeline: rkisp1: Add error log when parameter\n\tqueuing fails","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"content":"On 08/08/2025 15:12, Stefan Klug wrote:\n> When the extensible parameters queued to the kernel contain an unknown\n> block type it fails with -EINVAL. This should not happen as user land is\n> supposed to check for the supported parameter types. But it took a while\n> to figure out where things went wrong. Add a error statement when\n> queuing of the parameter buffer fails for whatever reason.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> \nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n> ---\n> \n> Changes in v4:\n> - Improved commit message\n> \n> Changes in v3:\n> - Collected tags\n> - Removed hint regarding unsupported parameter types as this will be\n>    handled using the now upstreamed RKISP1_CID_SUPPORTED_PARAMS_BLOCKS.\n> \n> Changes in v2:\n> - Also print the error code in case of failure\n> ---\n>   src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 ++++++++-\n>   1 file changed, 8 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 8b434a56ea04..06785cb2fd57 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -429,7 +429,14 @@ void RkISP1CameraData::paramsComputed(unsigned int frame, unsigned int bytesused\n>   \t\treturn;\n>   \n>   \tinfo->paramBuffer->_d()->metadata().planes()[0].bytesused = bytesused;\n> -\tpipe->param_->queueBuffer(info->paramBuffer);\n> +\n> +\tint ret = pipe->param_->queueBuffer(info->paramBuffer);\n> +\tif (ret < 0) {\n> +\t\tLOG(RkISP1, Error) << \"Failed to queue parameter buffer: \"\n> +\t\t\t\t   << strerror(-ret);\n> +\t\treturn;\n> +\t}\n> +\n>   \tpipe->stat_->queueBuffer(info->statBuffer);\n>   \n>   \tif (info->mainPathBuffer)","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 735A4BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Aug 2025 11:51:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2A2816921A;\n\tTue, 12 Aug 2025 13:51:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 33DC461444\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Aug 2025 13:51:01 +0200 (CEST)","from [192.168.0.43]\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4AF1E3A4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Aug 2025 13:50:08 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rQupGrWc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1754999408;\n\tbh=k/n/Wgi6/otXhiaB6iymgWTKm5V3EJbrfknYxfr4B1A=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=rQupGrWcLOsUSnqCPeDLDf3Rl+dtWw7gFWieuyhOrws2oRawiv/TWo/n3nqlq1a9X\n\thrpWVv61xM3yTFxe1LKiYSzRCQwIdKmoPOKz6TIokleW+j3WYMWwNHpf5ky9YxLQ4V\n\tIPTcQBycqEWyC95lxpAWAeK9ix8bzXw6RvEGcDaM=","Message-ID":"<7e07b79b-c380-4d28-8887-f8653b884bae@ideasonboard.com>","Date":"Tue, 12 Aug 2025 12:50:58 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 10/16] pipeline: rkisp1: Add error log when parameter\n\tqueuing fails","To":"libcamera-devel@lists.libcamera.org","References":"<20250808141315.413839-1-stefan.klug@ideasonboard.com>\n\t<20250808141315.413839-11-stefan.klug@ideasonboard.com>","Content-Language":"en-US","From":"Dan Scally <dan.scally@ideasonboard.com>","In-Reply-To":"<20250808141315.413839-11-stefan.klug@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]