From 7f500a6c366a16fedfaba8bf67b147ccc8239eb7 Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Fri, 17 Jun 2022 11:00:44 +0100 Subject: cam: drm: Support /dev/dri cards other than 0 Existing code is hardcoded to card0. Since recent fedora upgrades, we have noticed on more than one machine that card1 is present as the lowest numbered device, could theoretically be higher. This technique tries every file starting with card and continue only when we have successfully opened one. These devices with card1 as the lowest device were simply failing when they do not see a /dev/dri/card0 file present. Reported-by: Ian Mullins Tested-by: Ian Mullins Signed-off-by: Eric Curtin Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/cam/drm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cam/drm.h') diff --git a/src/cam/drm.h b/src/cam/drm.h index de57e445..655a7509 100644 --- a/src/cam/drm.h +++ b/src/cam/drm.h @@ -311,6 +311,7 @@ private: Device &operator=(const Device &) = delete; Device &operator=(const Device &&) = delete; + int openCard(); int getResources(); void drmEvent(); -- cgit v1.2.1