From patchwork Tue Jun 25 19:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 20392 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 0845BC3295 for ; Tue, 25 Jun 2024 19:04:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E30A0654AD; Tue, 25 Jun 2024 21:04:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="e9AVpwrC"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 667C2654AD for ; Tue, 25 Jun 2024 21:04:38 +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 8990E512; Tue, 25 Jun 2024 21:04:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719342255; bh=z0fQ94BgD27QSFx0jeQYKI/ofGLS64lYl/40iJ3biwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e9AVpwrCdZiKw/zk9QwDYcE+mA6bpZpGYeh8mhwooqzA/g3GY45nk8JSxUx6no4kW 6M7dMxk2dPakI6GHx8MMtenlzRKsihMaDb911BR2xjNwkzqnRLdarnNivs38Ol73Tb mpxHxwhpctbLO4Tu+CDdZwJWMa1rSDa+UkyUlBVk= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Daniel Scally Subject: [PATCH v2 6/6] libcamera: mali-c55: Add stride and size to rawConfig Date: Tue, 25 Jun 2024 21:04:19 +0200 Message-ID: <20240625190423.291429-7-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240625190423.291429-1-jacopo.mondi@ideasonboard.com> References: <20240625190423.291429-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" From: Daniel Scally Complete the RAW StreamConfiguration by populating the frame stride and the frame size. Set the minimum required alignment to 4 bytes as the Mali C55 ISP output RAW formats expanded to 16 bits and a RAW Bayer macro-pixel requires two sample to be complete. Signed-off-by: Daniel Scally Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index f1c057c1aeb4..f52fc1e95a20 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -367,6 +367,10 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate() maxSize = rawSize; + const PixelFormatInfo &info = PixelFormatInfo::info(rawConfig->pixelFormat); + rawConfig->stride = info.stride(rawConfig->size.width, 0, 4); + rawConfig->frameSize = info.frameSize(rawConfig->size, 4); + rawConfig->setStream(const_cast(&data_->frStream_)); frPipeAvailable = false; }