mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +00:00
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:
parent
6f75990af0
commit
a64f31b31e
@ -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));
|
do_or_die(drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr));
|
||||||
bo = gem_handle_to_libdrm_bo(bufmgr, fd, "userptr", userptr.handle);
|
bo = gem_handle_to_libdrm_bo(bufmgr, fd, "userptr", userptr.handle);
|
||||||
bo->virtual = (void *)(uintptr_t)userptr.user_ptr;
|
bo->virtual = (void *)(uintptr_t)userptr.user_ptr;
|
||||||
|
gem_close(fd, userptr.handle);
|
||||||
|
|
||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user