From 00b869c1a96f300a8f25da95d624524895e0ddf2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 23 Nov 2023 17:43:55 +0100 Subject: [PATCH] backend/drm: add support for atomic tearing page-flips The kernel patches [1] have been merged. [1]: https://patchwork.freedesktop.org/series/120103/ --- backend/drm/drm.c | 2 ++ meson.build | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 5ad84235..b2bebe2d 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -114,6 +114,8 @@ bool check_drm_features(struct wlr_drm_backend *drm) { if (drm->iface == &legacy_iface) { drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1; + } else { + drm->supports_tearing_page_flips = drmGetCap(drm->fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP, &cap) == 0 && cap == 1; } if (env_parse_bool("WLR_DRM_NO_MODIFIERS")) { diff --git a/meson.build b/meson.build index 5f7950c9..95803a22 100644 --- a/meson.build +++ b/meson.build @@ -109,7 +109,7 @@ wayland_server = dependency('wayland-server', ) drm = dependency('libdrm', - version: '>=2.4.118', + version: '>=2.4.120', fallback: 'libdrm', default_options: [ 'intel=disabled',