Lines Matching defs:handle

173  * Called after the last handle to the object has been closed
209 * Must bump handle count first as this may be the last
228 * handle references on objects.
251 * drm_gem_handle_delete - deletes the given file-private handle
252 * @filp: drm file-private structure to use for the handle look up
253 * @handle: userspace handle to delete
255 * Removes the GEM handle from the @filp lookup table which has been added with
256 * drm_gem_handle_create(). If this is the last handle also cleans up linked
260 drm_gem_handle_delete(struct drm_file *filp, u32 handle)
267 obj = idr_replace(&filp->object_idr, NULL, handle);
273 drm_gem_object_release_handle(handle, obj, filp);
275 /* And finally make the handle available for future allocations. */
277 idr_remove(&filp->object_idr, handle);
288 * @handle: gem object handle
298 u32 handle, u64 *offset)
303 obj = drm_gem_object_lookup(file, handle);
327 * @file: drm file-private structure to remove the dumb handle from
329 * @handle: the dumb handle to remove
336 uint32_t handle)
338 return drm_gem_handle_delete(file, handle);
343 * drm_gem_handle_create_tail - internal functions to create a handle
344 * @file_priv: drm file-private structure to register the handle for
346 * @handlep: pointer to return the created handle to the caller
362 u32 handle;
370 * Get the user-visible handle using idr. Preload and perform
385 handle = ret;
401 *handlep = handle;
408 idr_remove(&file_priv->object_idr, handle);
416 * drm_gem_handle_create - create a gem handle for an object
417 * @file_priv: drm file-private structure to register the handle for
419 * @handlep: pointer to return the created handle to the caller
421 * Create a handle for this object. This adds a handle reference to the object,
648 static int objects_lookup(struct drm_file *filp, u32 *handle, int count,
658 obj = idr_find(&filp->object_idr, handle[i]);
674 * @bo_handles: user pointer to array of userspace handle
675 * @count: size of handle array
681 * For a single handle lookup, use drm_gem_object_lookup().
728 * drm_gem_object_lookup - look up a GEM object from its handle
730 * @handle: userspace handle
734 * A reference to the object named by the handle if such exists on @filp, NULL
740 drm_gem_object_lookup(struct drm_file *filp, u32 handle)
744 objects_lookup(filp, &handle, 1, &obj);
753 * @handle: userspace handle
762 long drm_gem_dma_resv_wait(struct drm_file *filep, u32 handle,
768 obj = drm_gem_object_lookup(filep, handle);
770 DRM_DEBUG("Failed to look up GEM BO %d\n", handle);
793 * Releases the handle to an mm object.
805 ret = drm_gem_handle_delete(file_priv, args->handle);
832 obj = drm_gem_object_lookup(file_priv, args->handle);
866 * Open an object using the global name, returning a handle and the size.
868 * This handle (of course) holds a reference to the object, so the object
869 * will not go away until the handle is deleted.
878 u32 handle;
893 ret = drm_gem_handle_create_tail(file_priv, obj, &handle);
897 args->handle = handle;