From patchwork Fri Mar 19 16:03:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marian Cichy X-Patchwork-Id: 11629 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 2696ABD80C for ; Fri, 19 Mar 2021 16:03:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 871FE68D62; Fri, 19 Mar 2021 17:03:29 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 51EAA6051E for ; Fri, 19 Mar 2021 17:03:28 +0100 (CET) Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNHax-0000Gx-Ey; Fri, 19 Mar 2021 17:03:27 +0100 Received: from mci by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lNHaw-0003PE-Va; Fri, 19 Mar 2021 17:03:26 +0100 From: Marian Cichy To: libcamera-devel@lists.libcamera.org Date: Fri, 19 Mar 2021 17:03:22 +0100 Message-Id: <20210319160322.13029-1-m.cichy@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mci@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH] pipeline: simple: Update documentation on pipeline setup 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: , Cc: graphics@pengutronix.de, Marian Cichy Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" After 4671911df040, the explanation in the SimplePipeline documentation how the handler tries to find a valid path to capture device doest not reflect the reality anymore. Update the text to the new situation. Fixes: 4671911df040 ("pipeline: simple: Use breadth-first search to setup media pipeline") Signed-off-by: Marian Cichy Reviewed-by: Sebastian Fricke Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/simple/simple.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 068fb454..39f3d019 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -69,11 +69,12 @@ LOG_DEFINE_CATEGORY(SimplePipeline) * * When matching a device, the pipeline handler enumerates all camera sensors * and attempts, for each of them, to find a path to a video capture video node. - * It does so by traversing the media graph, following the first non permanently - * disabled downstream link. If such a path is found, the pipeline handler - * creates a corresponding SimpleCameraData instance, and stores the media graph - * path in its entities_ list. - * + * It does so by using a breadth-first search to find the shortest path from the + * sensor device to a valid capture device. This is guaranteed to produce a + * valid path on devices with one only option and is a good heuristic on more + * complex devices to skip paths that aren't suitable for the simple pipeline + * handler. For instance, on the IPU-based i.MX6, the shortest path will skip + * encoders and image converts, and it will end in a CSI capture device. * A more complex graph search algorithm could be implemented if a device that * would otherwise be compatible with the pipeline handler isn't correctly * handled by this heuristic.