diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2024-03-01 15:53:48 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-03-06 06:35:19 +0000 |
commit | e3b2386dd7d3078b398c76a2715e3ff318223982 (patch) | |
tree | 92491e6511643649c5e853000287c1858d8089cd | |
parent | bfb6f4e86c8d96015d73095e9cc187676129b94c (diff) |
drm: atomic: Avoid device busy when flipping after creating a new window
Task-number: QTBUG-122663
Change-Id: I168930428e8d09a9a042401460d678e20f3b82d5
Pick-to: 6.6 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>
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp | 8 |
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, |