Repository navigation
android: A56 release the framebuffers a flip replaced at the next flip; CI builds the Xwayland implicit-sync fix - #25
utkarshdalal wants to merge 4 commits into
Conversation
…lip on gamenative-drm
… it in the artifact
|
Closing: the tearing this patch addresses is fixed in gamenative-drm rather than in gamescope — GameNative/gamenative-drm#67. A56 moves gamescope's release one flip later so a client never gets a framebuffer that is still being scanned out. The same guarantee now comes from the other side: the shim parks a slot until the daemon reports the display's own release, and only then hands the image back to the guest. Measured on device, tearing is gone on Portal 2 (declares Two reasons this landed in drm instead, both measured earlier in the branch:
The CI work here (unversioned libxcvt, the Xwayland implicit-sync checkout) is unrelated to the tear and should be re-filed separately if it is still wanted. |
Problem
On KMS a page-flip event means the replaced framebuffer is free. On gamenative-drm the event arrives when SurfaceFlinger latches the new frame, but the replaced buffer stays on the panel until its release fence signals, about one vsync later. Dropping the FB at the event hands the client a buffer that is still being scanned out, which it then renders into. With the cursor plane (A55) this path is taken by every cursor-showing game, which is how the Two Point Campus reports started.
Change
0052-A56-release-framebuffers-one-flip-later.patch): under gamenative-drmpage_flip_handlerkeeps the FBs a flip took off screen inm_RetiredFbIdsand drops them at the next flip; a plane turned off drops both sets;finish_drmdrops everything. Only the release moves; event, timestamp and visible bookkeeping are unchanged.GAMESCOPE_GN_RELEASE_AT_FLIP=1restores the KMS behaviour. Swapchain depth is discussed in the patch header (pool 5 slots, DXVK 3 images, Xwayland allocates on demand, composite ring of 3 reused by index).libxcvt.so, as the shipped payload expects), the Xwayland checkout points at GameNative/xserverxwayland-no-implicit-sync-gamenative(Xwayland finishes GPU work before each present on gamenative-drm, xwayland: treat implicit sync as unsupported on gamenative-drm xserver#1), and the artifact includes the Xwayland binary.Pairs with gamenative-drm
scanout-flip-at-latch(the daemon sends the flip event at SurfaceFlinger latch, after the previous release fence).Measured (Retroid Pocket 6)