Lines Matching +full:lock +full:- +full:offset
34 * that the faked up offset will fit
84 * drm_vma_offset_exact_lookup_locked() - Look up node by exact address
86 * @start: Start address (page-based, not byte-based)
87 * @pages: Size of object (page-based)
89 * Same as drm_vma_offset_lookup_locked() but does not allow any offset into the node.
103 return (node && node->vm_node.start == start) ? node : NULL; in drm_vma_offset_exact_lookup_locked()
107 * drm_vma_offset_lock_lookup() - Lock lookup for extended private use
110 * Lock VMA manager for extended lookups. Only locked VMA function calls
111 * are allowed while holding this lock. All other contexts are blocked from VMA
112 * until the lock is released via drm_vma_offset_unlock_lookup().
115 * drm_vma_offset_lookup_locked() before releasing this lock again.
117 * This lock must not be used for anything else than extended lookups. You must
118 * not call any other VMA helpers while holding this lock.
120 * Note: You're in atomic-context while holding this lock!
124 read_lock(&mgr->vm_lock); in drm_vma_offset_lock_lookup()
128 * drm_vma_offset_unlock_lookup() - Unlock lookup for extended private use
131 * Release lookup-lock. See drm_vma_offset_lock_lookup() for more information.
135 read_unlock(&mgr->vm_lock); in drm_vma_offset_unlock_lookup()
139 * drm_vma_node_reset() - Initialize or reset node object
143 * any VMA offset manager.
151 node->vm_files = RB_ROOT; in drm_vma_node_reset()
152 rwlock_init(&node->vm_lock); in drm_vma_node_reset()
156 * drm_vma_node_start() - Return start address for page-based addressing
159 * Return the start address of the given node. This can be used as offset into
160 * the linear VM space that is provided by the VMA offset manager. Note that
161 * this can only be used for page-based addressing. If you need a proper offset
162 * for user-space mappings, you must apply "<< PAGE_SHIFT" or use the
166 * Start address of @node for page-based addressing. 0 if the node does not
167 * have an offset allocated.
171 return node->vm_node.start; in drm_vma_node_start()
175 * drm_vma_node_size() - Return size (page-based)
179 * that was passed to drm_vma_offset_add(). If no offset is allocated for the
183 * Size of @node as number of pages. 0 if the node does not have an offset
188 return node->vm_node.size; in drm_vma_node_size()
192 * drm_vma_node_offset_addr() - Return sanitized offset for user-space mmaps
193 * @node: Linked offset node
195 * Same as drm_vma_node_start() but returns the address as a valid offset that
196 * can be used for user-space mappings during mmap().
200 * Offset of @node for byte-based addressing. 0 if the node does not have an
205 return ((__u64)node->vm_node.start) << PAGE_SHIFT; in drm_vma_node_offset_addr()
209 * drm_vma_node_unmap() - Unmap offset node
210 * @node: Offset node
213 * Unmap all userspace mappings for a given offset node. The mappings must be
214 * associated with the @file_mapping address-space. If no offset exists
223 if (drm_mm_node_allocated(&node->vm_node)) in drm_vma_node_unmap()
230 * drm_vma_node_verify_access() - Access verification helper for TTM
231 * @node: Offset node
235 * drm_vma_node_is_allowed() but suitable as drop-in helper for TTM
239 * 0 if access is granted, -EACCES otherwise.
244 return drm_vma_node_is_allowed(node, tag) ? 0 : -EACCES; in drm_vma_node_verify_access()