mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
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:
parent
a15c327718
commit
bedfec94bb
4 changed files with 9 additions and 21 deletions
|
|
@ -320,14 +320,3 @@ size_t match_obj(size_t num_objs, const uint32_t objs[static restrict num_objs],
|
|||
match_obj_(&st, 0, 0, 0, 0);
|
||||
return st.score;
|
||||
}
|
||||
|
||||
void close_bo_handle(int drm_fd, uint32_t handle) {
|
||||
if (handle == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct drm_gem_close args = { .handle = handle };
|
||||
if (drmIoctl(drm_fd, DRM_IOCTL_GEM_CLOSE, &args) != 0) {
|
||||
wlr_log_errno(WLR_ERROR, "drmIoctl(GEM_CLOSE) failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue