From patchwork Thu Nov 7 10:58:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 21834 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 36864BE173 for ; Thu, 7 Nov 2024 10:59:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4A4CF6547A; Thu, 7 Nov 2024 11:58:56 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZhnqoFvF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1227665466 for ; Thu, 7 Nov 2024 11:58:54 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1EC8E792; Thu, 7 Nov 2024 11:58:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730977125; bh=Tgo1+go4F2Ac1dNvJhPZYUg4DRFXhEp89K5a7BvzrwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZhnqoFvF8Tq7gtZdCpAvq37GeCkoc9nlIqY5Cl2rvPENe0EXxn0rwYyuZEIEk8LXT AFFA0v8G0q2aB1BVPOzyLuKSsSg9VSspFYdNr0/AIYQQ5sbISqMLb6hxIeR9zEmHBM oBpcLqv7t1HYv151QCLrCFze+ScV4odqQslzfKM0= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Daniel Scally , Umang Jain , Kieran Bingham Subject: [PATCH v5 01/13] libcamera: mali-c55: Limit max size to sensor resolution Date: Thu, 7 Nov 2024 10:58:34 +0000 Message-Id: <20241107105846.52287-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241107105846.52287-1-dan.scally@ideasonboard.com> References: <20241107105846.52287-1-dan.scally@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" From: Jacopo Mondi 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). Reviewed-by: Daniel Scally Reviewed-by: Umang Jain Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi Signed-off-by: Daniel Scally --- Changes in v5: - None 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 45c71c1d..1c1fef23 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