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
This commit is contained in:
Xaver Hugl 2021-09-19 18:14:17 +02:00
parent 2200febcd6
commit 6d79d855be

View file

@ -202,6 +202,7 @@ void DrmGpu::initDrmResources()
bool DrmGpu::updateOutputs()
{
waitIdle();
DrmScopedPointer<drmModeRes> resources(drmModeGetResources(m_fd));
if (!resources) {
qCWarning(KWIN_DRM) << "drmModeGetResources failed";