backend/drm: pass DRM_MODE_ATOMIC_NONBLOCK for test commits

The kernel performs some additional checks when
DRM_MODE_ATOMIC_NONBLOCK is supplied: it requires that none of the
planes are still busy with a previous page-flip.

Pass the flag during test-only commits so that we don't end up
performing a commit which will fail.
This commit is contained in:
Simon Ser 2025-01-17 13:58:33 +01:00 committed by Kenny Levinsen
parent db2c907f93
commit 99da6ccc87
2 changed files with 2 additions and 2 deletions

View file

@ -508,7 +508,7 @@ static bool atomic_device_commit(struct wlr_drm_backend *drm,
if (state->modeset) {
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
}
if (!test_only && state->nonblock) {
if (state->nonblock) {
flags |= DRM_MODE_ATOMIC_NONBLOCK;
}

View file

@ -426,7 +426,7 @@ static bool commit(struct wlr_drm_backend *drm,
if (state->modeset) {
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
}
if (!test_only && state->nonblock) {
if (state->nonblock) {
flags |= DRM_MODE_ATOMIC_NONBLOCK;
}