eglfs: Drop annoying warnings without drm atomic
No point in warning on every application startup that framebuffer size setting is not available. Just ignore it then. Change-Id: Id36ff0ab9560b99cc3f2d56a4ee51455cfa43cb7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
This commit is contained in:
parent
5e0c98558c
commit
02ae522f54
@ -387,23 +387,26 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
|
||||
if (!cloneSource.isEmpty())
|
||||
qCDebug(qLcKmsDebug) << "Output" << connectorName << " clones output " << cloneSource;
|
||||
|
||||
const QByteArray fbsize = userConnectorConfig.value(QStringLiteral("size")).toByteArray().toLower();
|
||||
QSize framebufferSize;
|
||||
bool framebufferSizeSet = false;
|
||||
const QByteArray fbsize = userConnectorConfig.value(QStringLiteral("size")).toByteArray().toLower();
|
||||
if (!fbsize.isEmpty()) {
|
||||
if (sscanf(fbsize.constData(), "%dx%d", &framebufferSize.rwidth(), &framebufferSize.rheight()) == 2) {
|
||||
#if QT_CONFIG(drm_atomic)
|
||||
if (hasAtomicSupport())
|
||||
framebufferSizeSet = true;
|
||||
#endif
|
||||
if (!framebufferSizeSet)
|
||||
qWarning("Setting framebuffer size is only available with DRM atomic API");
|
||||
} else {
|
||||
qWarning("Invalid framebuffer size '%s'", fbsize.constData());
|
||||
}
|
||||
}
|
||||
if (!framebufferSizeSet) {
|
||||
framebufferSize.setWidth(modes[selected_mode].hdisplay);
|
||||
framebufferSize.setHeight(modes[selected_mode].vdisplay);
|
||||
}
|
||||
|
||||
#if QT_CONFIG(drm_atomic)
|
||||
if (hasAtomicSupport()) {
|
||||
if (sscanf(fbsize.constData(), "%dx%d", &framebufferSize.rwidth(), &framebufferSize.rheight()) != 2) {
|
||||
qWarning("Framebuffer size format is invalid.");
|
||||
}
|
||||
} else {
|
||||
qWarning("Setting framebuffer size is only available with DRM atomic API");
|
||||
}
|
||||
#else
|
||||
if (fbsize.size())
|
||||
qWarning("Setting framebuffer size is only available with DRM atomic API");
|
||||
#endif
|
||||
qCDebug(qLcKmsDebug) << "Output" << connectorName << "framebuffer size is " << framebufferSize;
|
||||
|
||||
QKmsOutput output;
|
||||
|
Loading…
Reference in New Issue
Block a user