egldevice: allow DRM device path to be overridden
The backend-provided DRM device might not be the right one, so allow kms config to override it. Pick-to: 6.8 Task-number: QTBUG-131887 Change-Id: Ied744ae7015eae64f4556f1528e0dbe8ae69d206 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> (cherry picked from commit c3bbbb22b8bc920e4937cf640fd1d2df3b0f9205) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b06125aa51
commit
884c338355
@ -225,11 +225,18 @@ QKmsDevice *QEglFSKmsEglDeviceIntegration::createDevice()
|
|||||||
if (Q_UNLIKELY(!query_egl_device()))
|
if (Q_UNLIKELY(!query_egl_device()))
|
||||||
qFatal("Could not set up EGL device!");
|
qFatal("Could not set up EGL device!");
|
||||||
|
|
||||||
const char *deviceName = m_funcs->query_device_string(m_egl_device, EGL_DRM_DEVICE_FILE_EXT);
|
QString path = screenConfig()->devicePath();
|
||||||
if (Q_UNLIKELY(!deviceName))
|
if (!path.isEmpty()) {
|
||||||
|
qCDebug(qLcEglfsKmsDebug) << "EGLDevice: Using DRM device" << path
|
||||||
|
<< "specified in config file";
|
||||||
|
} else {
|
||||||
|
path = QLatin1StringView(
|
||||||
|
m_funcs->query_device_string(m_egl_device, EGL_DRM_DEVICE_FILE_EXT));
|
||||||
|
if (Q_UNLIKELY(path.isEmpty()))
|
||||||
qFatal("Failed to query device name from EGLDevice");
|
qFatal("Failed to query device name from EGLDevice");
|
||||||
|
}
|
||||||
|
|
||||||
return new QEglFSKmsEglDevice(this, screenConfig(), QLatin1StringView(deviceName));
|
return new QEglFSKmsEglDevice(this, screenConfig(), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QEglFSKmsEglDeviceIntegration::query_egl_device()
|
bool QEglFSKmsEglDeviceIntegration::query_egl_device()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user