Commit 9cb443d0 authored by Shawn Rutledge's avatar Shawn Rutledge Committed by Andrew den Exter

eglfs kms: allow overriding physical display size via env variables

Implement the reading of the QT_QPA_EGLFS_PHYSICAL_WIDTH and
QT_QPA_EGLFS_PHYSICAL_HEIGHT as documented.

Change-Id: I862a03e9d05dcd15fb6a245c93ebd3e028de0c47
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@theqtcompany.com>
parent 90b79a1d
......@@ -280,12 +280,18 @@ QEglFSKmsScreen *QEglFSKmsDevice::screenForConnector(drmModeResPtr resources, dr
qCDebug(qLcEglfsKmsDebug) << "Selected mode" << selected_mode << ":" << width << "x" << height
<< '@' << refresh << "hz for output" << connectorName;
}
static const int width = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_WIDTH");
static const int height = qEnvironmentVariableIntValue("QT_QPA_EGLFS_PHYSICAL_HEIGHT");
QSizeF size(width, height);
if (size.isEmpty()) {
size.setWidth(connector->mmWidth);
size.setHeight(connector->mmHeight);
}
QEglFSKmsOutput output = {
QString::fromUtf8(connectorName),
connector->connector_id,
crtc_id,
QSizeF(connector->mmWidth, connector->mmHeight),
size,
selected_mode,
false,
drmModeGetCrtc(m_dri_fd, crtc_id),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment