From patchwork Thu Oct 23 14:48: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: 24760 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 429B5C32CE for ; Thu, 23 Oct 2025 14:50:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9833960870; Thu, 23 Oct 2025 16:50:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UNQ5BgwP"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E3C51607ED for ; Thu, 23 Oct 2025 16:50:25 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7328:357b:4ce1:72b6]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D320B1D2B; Thu, 23 Oct 2025 16:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761230920; bh=ZTwgWxl6cSIDcJw51iwQGL/F9McIFEHTaxZMDRQ8utE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNQ5BgwPhP8xfBLyFRKjxoim/XuGI2UpAfsLxNAkKuB0uhLGEpindRoXVvzEswa/E 8o6/fLQRWdbDTqLqE2EcMyfT+8iZrNW3fC4JL9H5pVLAgCre2hMzD1jmDvrqfagcGy HRL0k3GO/g5PRiJkLXREsjvO2aG2r1sZDhyG3QYw= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 33/35] pipeline: rkisp1: Add warning to unclear format handling Date: Thu, 23 Oct 2025 16:48:34 +0200 Message-ID: <20251023144841.403689-34-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251023144841.403689-1-stefan.klug@ideasonboard.com> References: <20251023144841.403689-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 da3cfc0ffdeb..9a156d4a01f2 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -782,8 +782,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; }