From 6d79d855be0db6d4a102072e8cbc0dd593f2de92 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Sun, 19 Sep 2021 18:14:17 +0200 Subject: [PATCH] platforms/drm: waitIdle before updating outputs KMS can only ever have one frame pending at the moment. If we update the outputs while a pageflip is still pending on any output the atomic commit will fail with EBUSY, which both invalidates the testing for output configuration and makes applying the wanted configuration fail. This can be removed again once KMS gains the ability to do mailbox presentation; that will likely still take a while though. BUG: 442677 --- src/plugins/platforms/drm/drm_gpu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index 5c92d42b83..c2c356dd84 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -202,6 +202,7 @@ void DrmGpu::initDrmResources() bool DrmGpu::updateOutputs() { + waitIdle(); DrmScopedPointer resources(drmModeGetResources(m_fd)); if (!resources) { qCWarning(KWIN_DRM) << "drmModeGetResources failed";