summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorLionel CHAZALLON <longchair@hotmail.com>2018-03-18 10:04:55 +0100
committerLionel CHAZALLON <longchair@hotmail.com>2018-03-18 14:20:57 +0000
commit2c7727a225c3140cfe70369610a919b6f1c9bba8 (patch)
treebd40d8cf994ee564019189a4da1e5606f6a1df26 /src/platformsupport
parent2cd4123661d6f97a8c0889d7a4c5907fa8fbb456 (diff)
eglfs/kms: make sure eglfs plane is always consistent
We need to make sure we update the eglfs plane properly even when we are forcing the rendering plane index. Change-Id: I0cd19fbc53c34f28d55708ba2c8e84278e1d7e7d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/kmsconvenience/qkmsdevice.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
index 22033f58d9..99297c8a3c 100644
--- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp
+++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp
@@ -409,9 +409,6 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
qCDebug(qLcKmsDebug, "Output %s can use %d planes: %s",
connectorName.constData(), output.available_planes.count(), qPrintable(planeListStr));
- if (output.eglfs_plane)
- qCDebug(qLcKmsDebug, "Output eglfs plane is: %d", output.eglfs_plane->id);
-
// This is for the EGLDevice/EGLStream backend. On some of those devices one
// may want to target a pre-configured plane. It is probably useless for
// eglfs_kms and others. Do not confuse with generic plane support (available_planes).
@@ -427,6 +424,12 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
output.forced_plane_id = plane->plane_id;
qCDebug(qLcKmsDebug, "Forcing plane index %d, plane id %u (belongs to crtc id %u)",
idx, plane->plane_id, plane->crtc_id);
+
+ for (const QKmsPlane &kmsplane : qAsConst(m_planes)) {
+ if (kmsplane.id == output.forced_plane_id)
+ output.eglfs_plane = (QKmsPlane*)&kmsplane;
+ }
+
drmModeFreePlane(plane);
}
} else {
@@ -435,6 +438,9 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources,
}
}
+ if (output.eglfs_plane)
+ qCDebug(qLcKmsDebug, "Output eglfs plane is: %d", output.eglfs_plane->id);
+
m_crtc_allocator |= (1 << output.crtc_index);
vinfo->output = output;