|
|
@ -185,14 +185,11 @@ DrmGpu *DrmBackend::addGpu(const QString &fileName)
|
|
|
|
return nullptr;
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// try to make a simple drm get resource call, if it fails it is not useful for us
|
|
|
|
if (!drmIsKMS(fd)) {
|
|
|
|
drmModeRes *resources = drmModeGetResources(fd);
|
|
|
|
|
|
|
|
if (!resources) {
|
|
|
|
|
|
|
|
qCDebug(KWIN_DRM) << "Skipping KMS incapable drm device node at" << fileName;
|
|
|
|
qCDebug(KWIN_DRM) << "Skipping KMS incapable drm device node at" << fileName;
|
|
|
|
m_session->closeRestricted(fd);
|
|
|
|
m_session->closeRestricted(fd);
|
|
|
|
return nullptr;
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
drmModeFreeResources(resources);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct stat buf;
|
|
|
|
struct stat buf;
|
|
|
|
if (fstat(fd, &buf) == -1) {
|
|
|
|
if (fstat(fd, &buf) == -1) {
|
|
|
|