Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
backend/drm: don't clear pending cursor FB on failed commit
Browse files Browse the repository at this point in the history
The previous fix tried to side-step cursor->pending_fb completely.
However that messes up our buffer locking mechanism.

Instead, stop clearing the pending cursor FB on a failed commit. The
pending cursor FB will remain for the next commit.

Fixes: 6c3d080 ("backend/drm: populate cursor plane's current_fb")
  • Loading branch information
emersion authored and bl4ckb0ne committed Jul 5, 2021
1 parent 5f26360 commit 4dee7a2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions backend/drm/drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,12 @@ static bool drm_crtc_commit(struct wlr_drm_connector *conn,
}
} else {
drm_fb_clear(&crtc->primary->pending_fb);
if (crtc->cursor != NULL) {
drm_fb_clear(&crtc->cursor->pending_fb);
}
// The set_cursor() hook is a bit special: it's not really synchronized
// to commit() or test(). Once set_cursor() returns true, the new
// cursor is effectively committed. So don't roll it back here, or we
// risk ending up in a state where we don't have a cursor FB but
// wlr_drm_connector.cursor_enabled is true.
// TODO: fix our output interface to avoid this issue.
}
return ok;
}
Expand Down

0 comments on commit 4dee7a2

Please sign in to comment.