diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-27 16:35:17 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-06-01 11:45:11 -0600 |
commit | 42126c2022316db11cca9105f5276d33765ef26c (patch) | |
tree | cb0ae0b23700f90092ada54292d94b26cca0c5bb /backend | |
parent | 034384f5aae42a5e5bd90f94a68572e179cba07f (diff) |
backend/drm: rollback pending CRTC state on test commit
A test commit doesn't apply the pending state.
The CRTC state will be populated again if the compositor decides to
perform a regular commit afterwards.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index d1abe773..0680aeee 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -336,7 +336,7 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn, uint32_t flags) { get_drm_backend_from_backend(conn->output.backend); struct wlr_drm_crtc *crtc = conn->crtc; bool ok = drm->iface->crtc_commit(drm, conn, flags); - if (ok) { + if (ok && !(flags & DRM_MODE_ATOMIC_TEST_ONLY)) { memcpy(&crtc->current, &crtc->pending, sizeof(struct wlr_drm_crtc_state)); } else { memcpy(&crtc->pending, &crtc->current, sizeof(struct wlr_drm_crtc_state)); |