From patchwork Mon Mar 4 18:18:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Vuillaumier X-Patchwork-Id: 19627 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 D7E3FC326B for ; Mon, 4 Mar 2024 18:18:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 42C1762867; Mon, 4 Mar 2024 19:18:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="CA+4A72X"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::600]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54CF9627FC for ; Mon, 4 Mar 2024 19:18:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZCDUHw7haLl45j75caupjGBGPKsIruVJmai8yDIMCC5j1DLx+95Qmz4rWbfLg9R80SUbPFsbyOZGBbhV2VfyWcvFrLbQh/Sfg1UAA6kc5Hezxxl4bHlPSeMVFI+a7rhote4NQ0qAhI2vuFA8Iz/2tTWNNp4GZdy14w9z4GxHW0zmuQEpzPk0e68M5+UDZvWyC13C5vKZe59x53ItRu2T84zGxLBsmYApruvXNZnRYt5uismrk/5jlwfU0L1kOs3+A4CPHg0TUuGOYsoH/3R4AQHS/sZOLTJkX8DW8fidoj/9PkLyxwQJxzdGDD/pRzKdl1xE/vj44EbSw3s+yXTdmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XJDvEzPfsacT8UsRdEk4gsomqcdFAWKZGjYFJikdEuk=; b=Rh4TeIogBXM+hweazRDz2zVmdndICmS3SsWcw7EICbdoPPQq0uijSuHZiZhvqX2b4A8FGBCNlHiJqb1svrPqder9dJb7vx26F8aFDvN1XjQkGa4ETYp+qtuBqor+yOoI1iNaAGPddnjx/AGzd3kg1LhYR4RiCndvryBmkcLsDr7+AF4EpnHKl7uXUcqjnhBWyH4lL/4XGKnb8x0mW6aUef8adACOlWvu5XYrHXjHUATNpkp5IrHT/ji/BhTDIiYC0JnlLiOEHLaLC66VN8JZbLoUnUlCsEOW1e6n7OUN18K6iSM1Xe3aCjErLAfg1YhMQUcJRmBL6Yjzcg+iAT+N/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJDvEzPfsacT8UsRdEk4gsomqcdFAWKZGjYFJikdEuk=; b=CA+4A72XnYUKq24gbcimr4EM/FeoLvhnJxab/9Y5MuZEO5cx86i8VhPJjAZffxmKLht35i7lgFwQswvF6Mt49PjOxPUBZ99nBB3/ywgh+WMeykN1DCgAomJqci+sniEZXWw0rRLHI8ue3X37TjtWlRcZqwRZ4EjC2FP+qDxBrQo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8147.eurprd04.prod.outlook.com (2603:10a6:20b:3e0::22) by AM8PR04MB7394.eurprd04.prod.outlook.com (2603:10a6:20b:1d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 18:18:36 +0000 Received: from AM9PR04MB8147.eurprd04.prod.outlook.com ([fe80::3fdf:4cf8:d542:1b49]) by AM9PR04MB8147.eurprd04.prod.outlook.com ([fe80::3fdf:4cf8:d542:1b49%4]) with mapi id 15.20.7339.035; Mon, 4 Mar 2024 18:18:36 +0000 From: Julien Vuillaumier To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1 0/1] Add environment variable to order pipelines match Date: Mon, 4 Mar 2024 19:18:15 +0100 Message-Id: <20240304181816.2361334-1-julien.vuillaumier@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: AS4P191CA0015.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d5::12) To AM9PR04MB8147.eurprd04.prod.outlook.com (2603:10a6:20b:3e0::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8147:EE_|AM8PR04MB7394:EE_ X-MS-Office365-Filtering-Correlation-Id: cd63c5e8-3468-4f04-67d2-08dc3c778277 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +BezWD9MaYng7rYYVAz+nPCX/HqkFUo7BK+/rYAw4Fr4zSfz0X/bxHDPSL+BvkboPxWafp1HNlYdcFN8P2ZCwWN47SAcmdrqZmStYGRLAisJFf7NA+gGPP3lzpVTeHLwDB8w9/ih08aETCCsdMVXyPKmP7DrTtCjEL588BgY+20nETGGy2dEU2/3xSywIafjne3yBv2I+NBNbtZfbodGwAPRLpq3eeJV4cyWO1/+o+RtvZSAUEAh/ttQmyZgdwrsCPlghjY615ap9FUYqwx2M34rrEs1Nzrsy7jX1TC7jI/GWba/XLZdpp+wfP2/Puf6ARVNdDtUKTZNfrmW+kQUPyWngSP0k1OoDvpl1yErdbyDy1MRKTBCPG9FyQK5tZxvLxPxRTZQDW7lnBQXTHNdiAVGjpBXX/2eR0Lf2ER5e//d4JiNHe9/eaVMW0LcPlexbAWZYA7OyjjAu3CPfXrdpKpDVEPHuZEsxlySrn2H73lggpmNRNne2Zq2F0J83siAv1JTL7U8/wnNkDUPNGdxO5s5/9ABZKJ+w0iZCnz6Moxdi8Ac27DFovKDIO9pOJO6ew28r7nhrOR+iO/WhlpeufTZYrIpbmg7qASjruNRVN6lZ9keoBG/o7UMsQMXNk+jVD/BXj8EsGwC88Ni1/9a/rbh/megnWaUpQexSCy33LUJtvv2CneN3DevijsAxTxMEXTqn4H9JsP0qasn+CeZHDfgoVzwgnUdCzFu4w88sQo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8147.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AR/NWMf/0Gsrdw95ky3mIXHaaeXz+6krAUkiU1+dJmsFRgx5Knc7UokNRXcaBRzMZlqScklQO2h9MCU+ayd0s7hmCmauEeSjvHdrAfBkQotKvogAhoLDF0GVjKXUFHTzW2ym8FuqNTg5MwMklmBsEReV6Jd3NUJPN8hReBYgDsKVHMukw1DiQCakn2kmdl8vHiKJ4P7dUt31W+fMKGQLkwXet2ZG1KQI/VSsJjeZKQwN+8SFpbIri4NJZURUlSS9UzEmuBZ/DDwf8tia32H3LpW1em8VZfyM429Rtr4ShyvZ4gvrGIN6RVljOuO2csfELSw4/P/6yDGJG0svu1xTKWIXS4k0NmwYtKn4Lo9xw/3HayTXLooHRJE7UK+x8QBECKMwP+y3RuL+cElN74dpZP1V73mY29lDDQUMpfYQC8aNGVGxz96+AQbY+sovHCWLwgPQtJg0KwryipdTQS5Tevdp0vrC8ml3cpcUjCJGSsT+HMcimX0ch3iVbZYwzbMjPNu8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Yx7CLBeID51EeTLOPJh7+AklEWwngTlH9KHwCGujpFYE9MrA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd63c5e8-3468-4f04-67d2-08dc3c778277 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8147.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 18:18:36.8470 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Xlb6hKaJ7+RtY4Y/BqZCX2k5tWTBLvQZfJaqY6zZLdZpr3qegy9FMsWfGnEjaJozvdRn8jaJbOIyExdNpP8VDW4is7YynDVETIZikVJQWzs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7394 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" Hello, There is currently no way to configure the order used by the CameraManager to select the pipeline handlers to match devices from the DeviceEnumerator. That is a limitation when multiple pipeline are compiled in, capable of handling the devices of the platform. In that case, user can not specify the pipeline that will bind to the devices and handle the cameras. This change adds an environment variable, optionnaly initialized with an ordered list of candidate pipelines that CameraManager shall use to match the devices. When the variable is not set, CameraManager behavior is unchanged: every registered pipeline is selected in turn to attempt device matching. Using that variable, user has the option to explicitly select the pipeline or the subset of available pipelines that CameraManager shall consider for matching. Thanks Julien Vuillaumier (1): libcamera: camera_manager: Add environment variable to order pipelines match Documentation/environment_variables.rst | 5 +++ src/libcamera/camera_manager.cpp | 51 +++++++++++++++++++++---- 2 files changed, 48 insertions(+), 8 deletions(-)