From patchwork Thu Sep 12 20:03:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1959 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A71B600E9 for ; Thu, 12 Sep 2019 22:03:44 +0200 (CEST) Received: from pendragon.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 326DD33A; Thu, 12 Sep 2019 22:03:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1568318624; bh=EwBRD/4/SNC/RQNwjRcU85xxmGiEf1NXGbYpjw9cIVE=; h=From:To:Cc:Subject:Date:From; b=X5SjGmnhRH7R/vjBh4dNNMGq4dsvc5OuUOR8jpqcSGFkBLOhP8zUbb+ghBBtsgNhE CLHxS+4cLvCNaJAgxFCgz+jmLG5m5XcQMLAJqHOQHlERuPV2f2EY/eYjV3pFT5UUfS XQQmI9xYRI9VpmbiyVo2WHtnwx8V9+Jn26A5mOCY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 12 Sep 2019 23:03:26 +0300 Message-Id: <20190912200330.19004-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] Fix udev device enumerator with V4L2 M2M devices X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Sep 2019 20:03:44 -0000 Hello, The latest rework of the udev device enumerator to support delayed device initialisation broke V4L2 M2M support, as it assumes that a device node belongs to a single entity. As I'm guilty of having missed that during review, here's a patch series to fix it. The first three patches are drive-by cleanups, while the real fix is in patch 4/4. Laurent Pinchart (4): libcamera: device_enumerator: Move lookupDeviceNode() to child classes libcamera: device_enumerator_udev: Delay device node lookup libcamera: device_enumerator_udev: Avoid double list lookup libcamera: device_enumerator_udev: Support entities sharing device nodes src/libcamera/device_enumerator.cpp | 13 -- src/libcamera/device_enumerator_sysfs.cpp | 11 ++ src/libcamera/device_enumerator_udev.cpp | 116 ++++++++++++------ src/libcamera/include/device_enumerator.h | 2 - .../include/device_enumerator_sysfs.h | 2 +- .../include/device_enumerator_udev.h | 27 +++- 6 files changed, 113 insertions(+), 58 deletions(-) Reviewed-by: Paul Elder