kms: Fix frame scheduling

This commit is contained in:
Victoria Brekenfeld 2024-06-27 18:15:18 +02:00
parent 5617f3228b
commit 8da3ac6d75
4 changed files with 25 additions and 17 deletions

View file

@ -594,9 +594,10 @@ impl SurfaceThreadState {
.unwrap()
.dmabuf_formats();
self.timings.set_refresh_interval(Some(Duration::from_nanos(
drm_helpers::calculate_refresh_rate(surface.pending_mode()) as u64,
)));
self.timings
.set_refresh_interval(Some(Duration::from_secs_f64(
1_000.0 / drm_helpers::calculate_refresh_rate(surface.pending_mode()) as f64,
)));
self.timings.set_vrr(vrr);
match DrmCompositor::new(