From patchwork Thu Jun 13 15:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 20302 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 0A57BC3237 for ; Thu, 13 Jun 2024 16:00:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6EFE565499; Thu, 13 Jun 2024 18:00:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="obGoIy7p"; 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 860AE6548B for ; Thu, 13 Jun 2024 17:59:58 +0200 (CEST) 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 403894CF; Thu, 13 Jun 2024 17:59:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718294384; bh=nx7OKJStOAyDOpeJKGvfrAHTiQjDqEJlfsZlkrwf2pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obGoIy7phXpHKa+x2emSGdZ4sBij75GJlu+QIzkzxrtr3HgoVBaqH5tgtRrixNs0F V9bqLAPullcYt5ZX9m386CtkHiINaDOiwnryNBS4jYqWe+/P/G7UUR55X2IUhdHB+J dhraO9PVVrV4t6NhDoXG6EfUlYylFBjVOQJMHVOw= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [PATCH 1/7] libcamera: mali-c55: Limit max size to sensor resolution Date: Thu, 13 Jun 2024 16:59:43 +0100 Message-Id: <20240613155949.1041061-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613155949.1041061-1-dan.scally@ideasonboard.com> References: <20240613155949.1041061-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). Signed-off-by: Jacopo Mondi Signed-off-by: tag. Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index 45c71c1d..9442d17c 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -342,7 +342,7 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate() rawConfig = &config; } - Size maxSize = kMaliC55MaxSize; + Size maxSize = std::min(kMaliC55MaxSize, data_->resolution()); if (rawConfig) { /* * \todo Take into account the Bayer components ordering once