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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-01-27 11:19:26 +00:00
parent 6f75990af0
commit a64f31b31e

View File

@ -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;
}