Commit 6ec4efff authored by Xaver Hugl's avatar Xaver Hugl
Browse files

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
parent 696c3d65
......@@ -735,6 +735,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() && pipeline->output()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment