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

backend/drm: don't clear pending cursor FB on failed commit #3021

Merged
merged 2 commits into from
Jul 5, 2021

Conversation

emersion
Copy link
Member

@emersion emersion commented Jul 5, 2021

Populating wlr_drm_plane.current_fb messes up the buffer's locking.
The previous buffer is released while it's still being displayed
on-screen.

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")

This reverts commit 6c3d080.

Populating wlr_drm_plane.current_fb messes up the buffer's locking.
The previous buffer is released while it's still being displayed
on-screen.
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")
@J0nnyMak0
Copy link
Contributor

I can confirm this fixes #2987. Thanks!

@bl4ckb0ne bl4ckb0ne merged commit 4dee7a2 into swaywm:master Jul 5, 2021
@emersion emersion deleted the drm-cursor-pending branch July 5, 2021 15:04
@emersion
Copy link
Member Author

emersion commented Jul 5, 2021

Thanks for testing, and thanks for the review!

@SjonHortensius
Copy link

I can confirm this fixes swaywm/sway#6358 as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants