From a64f31b31e7dcaa5c75792ecb0956c7abcaef3dd Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 27 Jan 2016 11:19:26 +0000 Subject: [PATCH] igt/gem_concurrent_blit: Close userptr handle after importing into bufmgr The bufmgr import creates a new handle from a name for the userptr - we can discard our original handle immediately. Signed-off-by: Chris Wilson --- tests/gem_concurrent_all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c index 834b8f3b..e0060b7f 100644 --- a/tests/gem_concurrent_all.c +++ b/tests/gem_concurrent_all.c @@ -270,6 +270,7 @@ userptr_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) do_or_die(drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr)); bo = gem_handle_to_libdrm_bo(bufmgr, fd, "userptr", userptr.handle); bo->virtual = (void *)(uintptr_t)userptr.user_ptr; + gem_close(fd, userptr.handle); return bo; }