From patchwork Fri Oct 11 09:22:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 21588 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 2F99BC3260 for ; Fri, 11 Oct 2024 09:22:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CCAD565378; Fri, 11 Oct 2024 11:22:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iTWX0qCH"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A0FF16536C for ; Fri, 11 Oct 2024 11:22:39 +0200 (CEST) Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E29D3220; Fri, 11 Oct 2024 11:20:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728638460; bh=beO8Ri0fxMAK2tCgCswVJDzfzzcfFrF4dIzLD6cbgAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTWX0qCHIxLX8YXjSoNSR6BhycUEFmA2AUQAM5q4Oqw1E8q1riejNBlkEhXQM4NZE QPHII+dghqZ4wyRqQR4mrxMcrV1IANQOYeN6+VtOv/Or1ZqC4lqxLtBovB3G77RpP4 +ZQ0p9Mk8wfdy1PYwcH5XLlp+c7ML7DD1/lOtXgs= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Stefan Klug , Umang Jain Subject: [PATCH 2/3] libcamera: rkisp1: Rectify SensorConfiguration check Date: Fri, 11 Oct 2024 14:52:21 +0530 Message-ID: <20241011092222.537322-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241011092222.537322-1-umang.jain@ideasonboard.com> References: <20241011092222.537322-1-umang.jain@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 'found' flag was mistakenly understood that a compatible sensor format has been found when a sensor configuration is passed in. However, 'found' related to the stream configuration's pixelformat, whether it is supported by the RkISP1Path video node or not. It does not relate to the sensor format, hence the check: if (sensorConfig && !found) doesn't make sense. Rectify the above check with: if (sensorConfig && !rawFormat.isValid()) to ensure a sensor format compatible with sensor configuration has been set to rawFormat. Fixes: 047d647452c4 ("libcamera: rkisp1: Integrate SensorConfiguration support") Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Reviewed-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index 4a3b779c..236d05af 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -304,7 +304,7 @@ RkISP1Path::validate(const CameraSensor *sensor, } } - if (sensorConfig && !found) + if (sensorConfig && !rawFormat.isValid()) return CameraConfiguration::Invalid; bool isRaw = PixelFormatInfo::info(cfg->pixelFormat).colourEncoding ==