Skip to content

timeline: convert vblank timestamp to MONOTONIC

Pekka Paalanen requested to merge pq/weston:mr/vblank-domain into master

All timeline event timestamps are in CLOCK_MONOTONIC already. DRM KMS timestamps are practically guaranteed to be CLOCK_MONOTONIC too, even though presentation clock could theoretically be something else. For other backends, the presentation clock is likely CLOCK_MONOTONIC_RAW due to weston_compositor_set_presentation_clock_software().

This patch ensures that the recorded vblank timestamp is in CLOCK_MONOTONIC. Otherwise interpreting the timeline traces might be difficult to do accurately, since it would be hard to recover the relationship between the presentation clock and timeline event timestamps.

The time conversion routine is the simplest possible, I don't think we need any more accurate conversion for timeline purposes. Besides, DRM-backend is the only backend where the timings actually matter, the other backends are software-timed anyway.

Since the clock domain of the "vblank" attribute potentially changes, the attribute is renamed. Wesgr never used this attribute.

Merge request reports