Skip to content

Change output render timing to use timerfd and absolute timestamps

This MR changes the scheduling of repainting each output to be driven via timerfd with absolute timestamps of CLOCK_MONOTONIC. Each output is scheduled to repaint a few milliseconds before its next presentation time. Also, the animation simulation has changed from being based on frame count to being based on presentation time. These two changes together demonstrate how one can optimize for latency with a (more or less) clearly defined timing framework.

Along with the above changes, this MR also fixes a small bug when running kms-quads on multiple monitors on AMD hardware, and a tiny documentation fix. See commit messages for more detailed description.

I have tested this on AMD/Intel hardware, with multiple monitors attached and different refresh rates for each monitor.

Edited by Heinrich Fink

Merge request reports