aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-09-09 23:06:44 +1200
committerScott Anderson <ascent12@hotmail.com>2017-09-09 23:10:18 +1200
commit6717b78bd6dcb1e103556cf86813c715c4212106 (patch)
treebf4fddd772b8b591f2ee5ebed411730031b55117 /backend
parent0aa00da1f3795186b12e35f206e52d9670d61445 (diff)
Retry atomic commit on failure
So we don't lose any previously "good" properties that were set.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm-atomic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/drm/drm-atomic.c b/backend/drm/drm-atomic.c
index 64028812..adb5bb47 100644
--- a/backend/drm/drm-atomic.c
+++ b/backend/drm/drm-atomic.c
@@ -53,6 +53,13 @@ static bool atomic_commit(int drm_fd, struct atomic *atom,
int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output);
if (ret) {
wlr_log_errno(L_ERROR, "Atomic commit failed");
+
+ // Try to commit without new changes
+ drmModeAtomicSetCursor(atom->req, atom->cursor);
+ ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output);
+ if (ret) {
+ wlr_log_errno(L_ERROR, "Atomic commit failed");
+ }
}
drmModeAtomicSetCursor(atom->req, 0);