diff --git a/xf86drm.c b/xf86drm.c
index 896b9ba0219bb244f14b977733d2981a07a19e9d..a183eee9dd065299bd4efadf78a56616ef478ce7 100644 (file)
--- a/xf86drm.c
+++ b/xf86drm.c
if (fd >= 0)
return fd;
+#if !defined(UDEV)
/* Check if the device node is not what we expect it to be, and recreate it
* and try again if so.
*/
drmMsg("drmOpenDevice: Open failed\n");
remove(buf);
+#endif
return -errno;
}
return (drmVersionPtr)version;
}
+int drmGetCap(int fd, uint64_t capability, uint64_t *value)
+{
+ struct drm_get_cap cap = { capability, 0 };
+ int ret;
+
+ ret = drmIoctl(fd, DRM_IOCTL_GET_CAP, &cap);
+ if (ret)
+ return ret;
+
+ *value = cap.value;
+ return 0;
+}
/**
* Free the bus ID information.