aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/atomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r--backend/drm/atomic.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index c7b630d6..23f9d60f 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -168,7 +168,7 @@ error:
static bool atomic_crtc_commit(struct wlr_drm_backend *drm,
struct wlr_drm_connector *conn, const struct wlr_output_state *state,
- uint32_t flags) {
+ uint32_t flags, bool test_only) {
struct wlr_output *output = &conn->output;
struct wlr_drm_crtc *crtc = conn->crtc;
@@ -209,9 +209,12 @@ static bool atomic_crtc_commit(struct wlr_drm_backend *drm,
vrr_enabled = state->adaptive_sync_enabled;
}
+ if (test_only) {
+ flags |= DRM_MODE_ATOMIC_TEST_ONLY;
+ }
if (modeset) {
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
- } else if (!(flags & DRM_MODE_ATOMIC_TEST_ONLY)) {
+ } else if (!test_only) {
flags |= DRM_MODE_ATOMIC_NONBLOCK;
}
@@ -250,7 +253,7 @@ static bool atomic_crtc_commit(struct wlr_drm_backend *drm,
bool ok = atomic_commit(&atom, conn, flags);
atomic_finish(&atom);
- if (ok && !(flags & DRM_MODE_ATOMIC_TEST_ONLY)) {
+ if (ok && !test_only) {
commit_blob(drm, &crtc->mode_id, mode_id);
commit_blob(drm, &crtc->gamma_lut, gamma_lut);