From patchwork Wed Feb 4 15:40:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac Scott X-Patchwork-Id: 26085 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 6EF22BD78E for ; Wed, 4 Feb 2026 15:40:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B0A6F6203E; Wed, 4 Feb 2026 16:40:44 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nEFHHbGP"; 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 1C2E361FBF for ; Wed, 4 Feb 2026 16:40:43 +0100 (CET) Received: from t16.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B210F5B2; Wed, 4 Feb 2026 16:40:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1770219600; bh=LN+/1he67XKRYP5kF6Nyt/T7vQvKEoIkur/WUp2hfuk=; h=From:To:Cc:Subject:Date:From; b=nEFHHbGPs7de/nWZOvZKara5dsjy6Bugpq+SObU3qSo+MpRNAL8DkTaDr2OOB4pfY JcdjIMSqSpr09HM/FieCrEzqz8/aDTmLQ7yoe9H5U+OF8Fz18B9M3jDVKgk41fnk3F Kja6UW41YveFP1a9MbNlTmd9YSVxprLRyhZgPdP0= From: Isaac Scott To: libcamera-devel@lists.libcamera.org Cc: Isaac Scott Subject: [RFC PATCH 0/1] camera_sensor: Ensure we check all camera sensor factories Date: Wed, 4 Feb 2026 15:40:14 +0000 Message-ID: <20260204154015.3755120-1-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.0 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" Hi All, When working on making a CameraSensor class to represent non-RAW cameras, I found what I believe is a bug with registering new camera sensors. When CameraSensorFactory::create() iterates over the camera sensor factories available to it, it will fail and return nullptr if the first one it tries fails. I've marked this as RFC because I wanted to ask whether this is intentional? If it isn't this patch removes the early return and tries to match other camera sensor factories if the first one fails. Isaac Scott (1): camera_sensor: Ensure we try multiple camera sensor factories src/libcamera/sensor/camera_sensor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)