From patchwork Fri Apr 11 12:36:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 23163 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id AF2BBC327D for ; Fri, 11 Apr 2025 12:37:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6AE3E68A90; Fri, 11 Apr 2025 14:37:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pBcJhOOg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A676968A90 for ; Fri, 11 Apr 2025 14:37:03 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:5b21:2ad5:1023:7179]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 57C8B1E6; Fri, 11 Apr 2025 14:35:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1744374904; bh=hEjttf+X0Z3Ha2p/Z8webfyhIN8pceaFTmQC/BEddRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pBcJhOOgnuprPRhqKUL9D6PqSL8dViMZ1gmEmFCIOTDkCb87jbEKRr8B8deHIQQMM pj4OoWV8EQu/p8b7YXcONjCFHXBUAAIuQdmhyXd04WfxOVrnqVG1p/oK4OMYmd8rdP sydhUNd0X9Xdc/RG43QgFRt3h+nNzgaMZ875qRzQ= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 6/9] pipeline: rkisp1: Add more info when parameter queue fails Date: Fri, 11 Apr 2025 14:36:34 +0200 Message-ID: <20250411123641.2144530-7-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250411123641.2144530-1-stefan.klug@ideasonboard.com> References: <20250411123641.2144530-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When the rkisp1 driver of the running kernel supports less parameter types than the libcamera build and such a parameter is used, queuing of the parameter buffer fails with -EINVAL. For the time being we have no way to query the kernel for supported parameter types at runtime. So at least print a error message that points the user in that direction. Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham --- Changes in v2: - Also print the error code in case of failure --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 52633fe3cb85..9d7a3bd57ada 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -409,7 +409,15 @@ void RkISP1CameraData::paramsComputed(unsigned int frame, unsigned int bytesused return; info->paramBuffer->_d()->metadata().planes()[0].bytesused = bytesused; - pipe->param_->queueBuffer(info->paramBuffer); + + int ret = pipe->param_->queueBuffer(info->paramBuffer); + if (ret < 0) { + LOG(RkISP1, Error) << "Failed to queue parameter buffer: " << ret + << " Maybe the kernel doesn't support the" + " required parameter types."; + return; + } + pipe->stat_->queueBuffer(info->statBuffer); if (info->mainPathBuffer)