From df79eeba63a8e9c2d33b9be2418aee6a940135e7 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 1 Oct 2024 18:34:02 -0700 Subject: [PATCH] drm-syncobj: Fix check for acquire/release point order This check was backwards, but that wasn't apparent since not all implementations use the same timeline for both. --- src/wayland/drm_syncobj/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/drm_syncobj/mod.rs b/src/wayland/drm_syncobj/mod.rs index 2ce54d0e0c7c..ff5e97359656 100644 --- a/src/wayland/drm_syncobj/mod.rs +++ b/src/wayland/drm_syncobj/mod.rs @@ -203,11 +203,11 @@ fn commit_hook(_data: &mut D, _dh: &DisplayHandle, surface } else if let (Some(acquire), Some(release)) = (pending.acquire_point.as_ref(), pending.release_point.as_ref()) { - if acquire.timeline == release.timeline && acquire.point <= release.point { + if acquire.timeline == release.timeline && release.point <= acquire.point { syncobj_surface.post_error( wp_linux_drm_syncobj_surface_v1::Error::ConflictingPoints as u32, format!( - "release point '{}' is not greater than acquire point '{}'", + "release point {} is not greater than acquire point {}", release.point, acquire.point ), );