Skip to content

hwcomposer: Synchronization fixes#48

Draft
aleasto wants to merge 2 commits into
waydroid:lineage-18.1from
aleasto:sync
Draft

hwcomposer: Synchronization fixes#48
aleasto wants to merge 2 commits into
waydroid:lineage-18.1from
aleasto:sync

Conversation

@aleasto

@aleasto aleasto commented Jan 29, 2023

Copy link
Copy Markdown
Member

No description provided.

@aleasto

aleasto commented Jan 29, 2023

Copy link
Copy Markdown
Member Author

@dos1

This almost works. But sometimes it breaks when switching from full-ui mode to single-app mode

@aleasto

aleasto commented Jan 29, 2023

Copy link
Copy Markdown
Member Author

Well, that is caused by contents->retireFenceFd, not the layers one.

Comment thread hwcomposer/hwcomposer.cpp Outdated
* A buffer may be reused
* The buffer cache may be invalidated before one of its buffers is released
@aleasto

aleasto commented Feb 1, 2023

Copy link
Copy Markdown
Member Author

So, I believe this logic is correct.

However it relies on the assumption that the compositor will always reliably send a wl_buffer::release event, even when replacing a surface's buffer with itself again. Mutter curiously seems to respect this, but i think it is not the ideal behaviour; indeed kwin and weston do it differently.

So I believe I'm just going to keep this here to be revisited, and for now disable the per-layer synchronization.

@aleasto aleasto marked this pull request as draft February 1, 2023 00:15
@aleasto

aleasto commented Feb 1, 2023

Copy link
Copy Markdown
Member Author

Alternatively, since the buffer cache is very rarely used as most frames post-boot have the GEOMETRY_CHANGED flag, we could just remove it and then wl_buffer::release should behave how this logic requires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant