eglfs: Make the logs from atomic support usable

Atomic being supported and atomic being requested are two different things.
(the latter is only true when QT_QPA_EGLFS_KMS_ATOMIC is set)

Log accordingly since this can be very important to know when investigating
problems.

Change-Id: I6947d18e7c0eaef3fe160095cb046770f9c93efe
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
Laszlo Agocs 2019-04-12 10:38:48 +02:00
parent 9bb5491c06
commit f6f0a9f3f6

View File

@ -581,10 +581,16 @@ void QKmsDevice::createScreens()
#if QT_CONFIG(drm_atomic) #if QT_CONFIG(drm_atomic)
// check atomic support // check atomic support
m_has_atomic_support = !drmSetClientCap(m_dri_fd, DRM_CLIENT_CAP_ATOMIC, 1) m_has_atomic_support = !drmSetClientCap(m_dri_fd, DRM_CLIENT_CAP_ATOMIC, 1);
&& qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ATOMIC"); if (m_has_atomic_support) {
if (m_has_atomic_support) qCDebug(qLcKmsDebug, "Atomic reported as supported");
qCDebug(qLcKmsDebug) << "Atomic Support found"; if (qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_ATOMIC")) {
qCDebug(qLcKmsDebug, "Atomic enabled");
} else {
qCDebug(qLcKmsDebug, "Atomic disabled");
m_has_atomic_support = false;
}
}
#endif #endif
drmModeResPtr resources = drmModeGetResources(m_dri_fd); drmModeResPtr resources = drmModeGetResources(m_dri_fd);