aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/atomic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index cacb8e87..1d4f9df4 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -264,7 +264,12 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
}
if (modeset) {
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
- } else if (!test_only) {
+ } else if (!test_only && (state->base->committed & WLR_OUTPUT_STATE_BUFFER)) {
+ // The wlr_output API requires non-modeset commits with a new buffer to
+ // wait for the frame event. However compositors often perform
+ // non-modesets commits without a new buffer without waiting for the
+ // frame event. In that case we need to make the KMS commit blocking,
+ // otherwise the kernel will error out with EBUSY.
flags |= DRM_MODE_ATOMIC_NONBLOCK;
}