diff --git a/meson.build b/meson.build index c2c9c8bb7..de6b042c2 100644 --- a/meson.build +++ b/meson.build @@ -51,7 +51,7 @@ wayland_protocols_req = '>= 1.33' # native backend version requirements libinput_req = '>= 1.19.0' gbm_req = '>= 21.3' -libdrm_req = '>= 2.4.95' +libdrm_req = '>= 2.4.118' # screen cast version requirements libpipewire_req = '>= 0.3.33' diff --git a/src/backends/native/meta-drm-buffer.c b/src/backends/native/meta-drm-buffer.c index eba3161a2..a109b4ea2 100644 --- a/src/backends/native/meta-drm-buffer.c +++ b/src/backends/native/meta-drm-buffer.c @@ -167,7 +167,9 @@ meta_drm_buffer_release_fb_id (MetaDrmBuffer *buffer) int ret; fd = meta_device_file_get_fd (priv->device_file); - ret = drmModeRmFB (fd, priv->fb_id); + ret = drmModeCloseFB (fd, priv->fb_id); + if (ret == -EINVAL) + ret = drmModeRmFB (fd, priv->fb_id); if (ret != 0) g_warning ("drmModeRmFB: %s", g_strerror (-ret));