diff options
author | Simon Ser <contact@emersion.fr> | 2021-10-03 19:50:58 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-10-06 09:03:21 +0200 |
commit | 53ef4b37a1a070d88b9073995a7110daeab3bc48 (patch) | |
tree | 3a3b320f4385b42800513c3d41f3da675dc80713 | |
parent | 7b67fec649b07cd5ded66814ba799b09b4d407c8 (diff) | |
download | drm-53ef4b37a1a070d88b9073995a7110daeab3bc48.tar.gz |
nouveau: 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>
-rw-r--r-- | nouveau/nouveau.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index 9fa940a9..7b4efded 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -607,7 +607,6 @@ nouveau_bo_del(struct nouveau_bo *bo) struct nouveau_drm *drm = nouveau_drm(&bo->device->object); struct nouveau_device_priv *nvdev = nouveau_device(bo->device); struct nouveau_bo_priv *nvbo = nouveau_bo(bo); - struct drm_gem_close req = { .handle = bo->handle }; if (nvbo->head.next) { pthread_mutex_lock(&nvdev->lock); @@ -621,11 +620,11 @@ nouveau_bo_del(struct nouveau_bo *bo) * might cause the bo to be closed accidentally while * re-importing. */ - drmIoctl(drm->fd, DRM_IOCTL_GEM_CLOSE, &req); + drmCloseBufferHandle(drm->fd, bo->handle); } pthread_mutex_unlock(&nvdev->lock); } else { - drmIoctl(drm->fd, DRM_IOCTL_GEM_CLOSE, &req); + drmCloseBufferHandle(drm->fd, bo->handle); } if (bo->map) drm_munmap(bo->map, bo->size); |