diff options
-rw-r--r-- | backend/drm/renderer.c | 8 | ||||
-rw-r--r-- | meson.build | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index dbaa55b7..29903f19 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -394,8 +394,12 @@ void drm_fb_destroy(struct wlr_drm_fb *fb) { wl_list_remove(&fb->link); wlr_addon_finish(&fb->addon); - if (drmModeRmFB(drm->fd, fb->id) != 0) { - wlr_log(WLR_ERROR, "drmModeRmFB failed"); + int ret = drmModeCloseFB(drm->fd, fb->id); + if (ret == -EINVAL) { + ret = drmModeRmFB(drm->fd, fb->id); + } + if (ret != 0) { + wlr_log(WLR_ERROR, "Failed to close FB: %s", strerror(-ret)); } free(fb); diff --git a/meson.build b/meson.build index c6bc434a..682d6962 100644 --- a/meson.build +++ b/meson.build @@ -109,7 +109,7 @@ wayland_server = dependency('wayland-server', ) drm = dependency('libdrm', - version: '>=2.4.114', + version: '>=2.4.118', fallback: 'libdrm', default_options: [ 'intel=disabled', |