summaryrefslogtreecommitdiff
path: root/src/cam/drm.h
diff options
context:
space:
mode:
authorEric Curtin <ecurtin@redhat.com>2022-06-17 11:00:44 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-19 00:02:47 +0300
commit7f500a6c366a16fedfaba8bf67b147ccc8239eb7 (patch)
treef687c4e11f2fcd5ce5fbea95081f7297c3a64d17 /src/cam/drm.h
parent4bb284e0fa5669bbf6adda93e2f770014834c8cb (diff)
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 <imullins@redhat.com> Tested-by: Ian Mullins <imullins@redhat.com> Signed-off-by: Eric Curtin <ecurtin@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/drm.h')
-rw-r--r--src/cam/drm.h1
1 files changed, 1 insertions, 0 deletions
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();