Skip to content

Don't allow TearFree scanout flips to complete in the same vblank period

We were using a relative target of 0, meaning "complete the flip ASAP". This could result in the flip sometimes, but not always completing in the same vertical blank period where the corresponding drawing occurred, potentially causing judder artifacts with applications updating their window contents synchronized to the display refresh. A good way to test this is the vsynctester.com site in a windowed browser, where the judder results in the large "VSYNC" text intermittently appearing red or cyan instead of the expected gray.

To avoid this, use a relative target MSC of 1, meaning that if a vertical blank period is in progress, the flip will only complete in the next one.

Reported by Julian Tempel and Brandon Wright in https://bugs.freedesktop.org/106175 .

Merge request reports