[PATCH libdrm] xf86drm: Make drmNodeIsDRM() public.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have wanted this code in Mir, so it's plausibly useful elsewhere,
particularly if the DRM device major number is going to become
dynamic.

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@xxxxxxxxxxxxx>
---
 xf86drm.c | 2 +-
 xf86drm.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/xf86drm.c b/xf86drm.c
index 10df682b..f32cb1bb 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2767,7 +2767,7 @@ drm_public char *drmGetDeviceNameFromFd(int fd)
     return strdup(name);
 }
 
-static bool drmNodeIsDRM(int maj, int min)
+drm_public bool drmNodeIsDRM(int maj, int min)
 {
 #ifdef __linux__
     char path[64];
diff --git a/xf86drm.h b/xf86drm.h
index 7773d71a..6dc92180 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -37,6 +37,7 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <stdint.h>
+#include <stdbool.h>
 #include <drm.h>
 
 #if defined(__cplusplus)
@@ -783,6 +784,8 @@ extern int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle);
 extern char *drmGetPrimaryDeviceNameFromFd(int fd);
 extern char *drmGetRenderDeviceNameFromFd(int fd);
 
+extern bool drmNodeIsDRM(int major, int minor);
+
 #define DRM_BUS_PCI       0
 #define DRM_BUS_USB       1
 #define DRM_BUS_PLATFORM  2
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux