backend/drm: use drmCloseBufferHandle

This has been added in [1] and allows us to close buffer handles
without manually calling drmIoctl.

[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/192
This commit is contained in:
Simon Ser 2021-10-02 17:24:08 +02:00
parent a15c327718
commit bedfec94bb
4 changed files with 9 additions and 21 deletions

View file

@ -271,7 +271,9 @@ static void close_all_bo_handles(struct wlr_drm_backend *drm,
continue;
}
close_bo_handle(drm->fd, handles[i]);
if (drmCloseBufferHandle(drm->fd, handles[i]) != 0) {
wlr_log_errno(WLR_ERROR, "drmCloseBufferHandle failed");
}
}
}