summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-10-03 19:49:40 +0200
committerSimon Ser <contact@emersion.fr>2021-10-06 09:03:21 +0200
commit7b67fec649b07cd5ded66814ba799b09b4d407c8 (patch)
tree23fc22ab274f8e0500999a4333907551f247607f /freedreno
parent2fda5f9b0c2d623f69ecec1f4a8a45e785b6cadf (diff)
freedreno: use drmCloseBufferHandle
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/freedreno_bo.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index efc5b71f..3cdc9737 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -62,10 +62,7 @@ static struct fd_bo * bo_from_handle(struct fd_device *dev,
bo = dev->funcs->bo_from_handle(dev, size, handle);
if (!bo) {
- struct drm_gem_close req = {
- .handle = handle,
- };
- drmIoctl(dev->fd, DRM_IOCTL_GEM_CLOSE, &req);
+ drmCloseBufferHandle(dev->fd, handle);
return NULL;
}
bo->dev = fd_device_ref(dev);
@@ -263,13 +260,10 @@ drm_private void bo_del(struct fd_bo *bo)
*/
if (bo->handle) {
- struct drm_gem_close req = {
- .handle = bo->handle,
- };
drmHashDelete(bo->dev->handle_table, bo->handle);
if (bo->name)
drmHashDelete(bo->dev->name_table, bo->name);
- drmIoctl(bo->dev->fd, DRM_IOCTL_GEM_CLOSE, &req);
+ drmCloseBufferHandle(bo->dev->fd, bo->handle);
}
bo->funcs->destroy(bo);