From patchwork Wed Jun 26 14:02:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 20414 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 E46B5BDB1D for ; Wed, 26 Jun 2024 14:03:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 794D062B61; Wed, 26 Jun 2024 16:03:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="lIGp94E2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 740C962B49 for ; Wed, 26 Jun 2024 16:03:22 +0200 (CEST) Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 061B2FD6; Wed, 26 Jun 2024 16:02:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719410579; bh=B1Lv2Ur0rqNdwO7o95xpnCF7fCVJ2TWUMiC+sfgKslE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lIGp94E2nNLmz60hEsi/G77cDVrO44daFWa7R4mbbhzGCK7tqmbs9+5Km+M3YSotL mBVgmSqaMyKH214DErZOnUK022rzemkGP0yL569Os7WxRKG3MeI7AsqO4+Op5pYKI5 AacVd8cQGZyIov0Xiju7F6K2dmE1MZ90fxsqnQY0= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Kieran Bingham Subject: [PATCH v3 1/9] libcamera: mali-c55: Limit max size to sensor resolution Date: Wed, 26 Jun 2024 16:02:57 +0200 Message-ID: <20240626140309.50052-2-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240626140309.50052-1-jacopo.mondi@ideasonboard.com> References: <20240626140309.50052-1-jacopo.mondi@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" The Mali C55 ISP cannot upscale. The maximum allowed output size is the sensor's resolution. For RAW streams this is already handled in adjustRawSizes(), while for processed streams the maximum allowed resolution was wrongly set to the ISP maximum output size (8192x8192). Signed-off-by: Jacopo Mondi Signed-off-by: Daniel Scally Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index 45c71c1dd619..1c1fef2337f0 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -342,7 +342,11 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate() rawConfig = &config; } - Size maxSize = kMaliC55MaxSize; + /* + * The C55 can not upscale. Limit the configuration to the ISP + * capabilities and the sensor resolution. + */ + Size maxSize = kMaliC55MaxSize.boundedTo(data_->resolution()); if (rawConfig) { /* * \todo Take into account the Bayer components ordering once