backends/drm: wait for pending pageflips before doing a modeset

If we don't, KWin may get a pageflip event for an output that is already
considered as being turned off
This commit is contained in:
Xaver Hugl 2022-02-24 05:39:07 +01:00
parent 1247a7b698
commit 83d797785b

View file

@ -733,6 +733,8 @@ bool DrmGpu::maybeModeset()
// commit only once all pipelines are ready for presentation
return true;
}
// make sure there's no pending pageflips
waitIdle();
const bool ok = DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::CommitModeset, unusedObjects());
for (DrmPipeline *pipeline : qAsConst(pipelines)) {
if (pipeline->modesetPresentPending()) {