android: A56 release the framebuffers a flip replaced at the next flip; CI builds the Xwayland implicit-sync fix

UT
9d ago
+111-2

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

  • A56 (0052-A56-release-framebuffers-one-flip-later.patch): under gamenative-drm page_flip_handler keeps the FBs a flip took off screen in m_RetiredFbIds and drops them at the next flip; a plane turned off drops both sets; finish_drm drops everything. Only the release moves; event, timestamp and visible bookkeeping are unchanged. GAMESCOPE_GN_RELEASE_AT_FLIP=1 restores 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).
  • CI: libxcvt is built unversioned (soname libxcvt.so, as the shipped payload expects), the Xwayland checkout points at GameNative/xserver xwayland-no-implicit-sync-gamenative (Xwayland finishes GPU work before each present on gamenative-drm, GameNative/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)

  • Blazing Chrome (DXVK), cap 60: 59.5 fps, 79 % of intervals on the 2-vsync grid, no stalls.
  • SteamWorld Dig 2 (GL), with the Xwayland fix: 0 tears in 25 s against 23 on the shipped build, same scripted motion.