From patchwork Tue Nov 25 16:28:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 25206 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 429DEC3338 for ; Tue, 25 Nov 2025 16:30:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EC44860AD0; Tue, 25 Nov 2025 17:30:15 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gHnYVq42"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5119560A9E for ; Tue, 25 Nov 2025 17:30:15 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bae1:340c:573c:570b]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 58C6F20E6; Tue, 25 Nov 2025 17:28:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1764088086; bh=bhI7RQpAaebY6zxQIfze+sNd3cGZao08ONXsHIuzw0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gHnYVq42Rzz3qDbn87KppTXOq+G7jgtKZng6jl/atIGUXAe4Ca315+uRsBB63+eUv OWcnvGCDXGKXIg4ic4i9IGGM8E/GMlbRys7eKM5oij2+QltPcr3Ad6EkTOCLjLF+qN BCG2BUPo+sF5wa8dTx/cSjzQJKdXJTKhNV+mZJ0Q= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v3 27/29] pipeline: rkisp1: Add warning to unclear format handling Date: Tue, 25 Nov 2025 17:28:39 +0100 Message-ID: <20251125162851.2301793-28-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251125162851.2301793-1-stefan.klug@ideasonboard.com> References: <20251125162851.2301793-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" It is not mentioned when the sensorFormat is allowed to have zero size. Add a warning and todo to that case but leave it in place for now. Signed-off-by: Stefan Klug --- 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 adce1de35263..dc7df22976ff 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -766,8 +766,16 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() sensorFormat_ = sensor->getFormat(mbusCodes, accumulatedSensorSize, mainPath->maxResolution()); - if (sensorFormat_.size.isNull()) + if (sensorFormat_.size.isNull()) { + /* + * \todo When can this happen? Should we return a failure in + * this case? + */ sensorFormat_.size = sensor->resolution(); + LOG(RkISP1, Warning) + << "Failed to select sensor format. Default to " + << sensorFormat_; + } return status; }