summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2024-03-01 15:53:48 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-06 08:38:56 +0000
commit7d1186d507e237d4c19b0ac60a5fa55231e07ff4 (patch)
tree50cc1b9fed7ef06354bfc4f62b33c1f05ff97e91
parent4efc8dd8d026d7b31d0e5411d687d28a22fb6671 (diff)
drm: atomic: Avoid device busy when flipping after creating a new window
Task-number: QTBUG-122663 Change-Id: I168930428e8d09a9a042401460d678e20f3b82d5 Pick-to: 6.5 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 0a3b5042a566afa4dc5162f469eb0d8be3120933) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e3b2386dd7d3078b398c76a2715e3ff318223982)
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index 6bda149fff..336ee9c312 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -176,10 +176,14 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface(EGLConfig eglConfig)
void QEglFSKmsGbmScreen::resetSurface()
{
- m_flipPending = false;
+ m_flipPending = false; // not necessarily true but enough to keep bo_next
m_gbm_bo_current = nullptr;
- m_gbm_bo_next = nullptr;
m_gbm_surface = nullptr;
+
+ // Leave m_gbm_bo_next untouched. waitForFlip() should
+ // still do its work, when called. Otherwise we end up
+ // in device-is-busy errors if there is a new QWindow
+ // created afterwards. (QTBUG-122663)
}
void QEglFSKmsGbmScreen::initCloning(QPlatformScreen *screenThisScreenClones,