Lines Matching full:node
72 struct drm_vma_offset_node *node, unsigned long pages);
74 struct drm_vma_offset_node *node);
76 int drm_vma_node_allow(struct drm_vma_offset_node *node, struct drm_file *tag);
77 int drm_vma_node_allow_once(struct drm_vma_offset_node *node, struct drm_file *tag);
78 void drm_vma_node_revoke(struct drm_vma_offset_node *node,
80 bool drm_vma_node_is_allowed(struct drm_vma_offset_node *node,
84 * drm_vma_offset_exact_lookup_locked() - Look up node by exact address
89 * Same as drm_vma_offset_lookup_locked() but does not allow any offset into the node.
93 * Node at exact start address @start.
100 struct drm_vma_offset_node *node; in drm_vma_offset_exact_lookup_locked() local
102 node = drm_vma_offset_lookup_locked(mgr, start, pages); in drm_vma_offset_exact_lookup_locked()
103 return (node && node->vm_node.start == start) ? node : NULL; in drm_vma_offset_exact_lookup_locked()
139 * drm_vma_node_reset() - Initialize or reset node object
140 * @node: Node to initialize or reset
142 * Reset a node to its initial state. This must be called before using it with
145 * This must not be called on an already allocated node, or you will leak
148 static inline void drm_vma_node_reset(struct drm_vma_offset_node *node) in drm_vma_node_reset() argument
150 memset(node, 0, sizeof(*node)); in drm_vma_node_reset()
151 node->vm_files = RB_ROOT; in drm_vma_node_reset()
152 rwlock_init(&node->vm_lock); in drm_vma_node_reset()
157 * @node: Node to inspect
159 * Return the start address of the given node. This can be used as offset into
166 * Start address of @node for page-based addressing. 0 if the node does not
169 static inline unsigned long drm_vma_node_start(const struct drm_vma_offset_node *node) in drm_vma_node_start() argument
171 return node->vm_node.start; in drm_vma_node_start()
176 * @node: Node to inspect
178 * Return the size as number of pages for the given node. This is the same size
180 * node, this is 0.
183 * Size of @node as number of pages. 0 if the node does not have an offset
186 static inline unsigned long drm_vma_node_size(struct drm_vma_offset_node *node) in drm_vma_node_size() argument
188 return node->vm_node.size; in drm_vma_node_size()
193 * @node: Linked offset node
200 * Offset of @node for byte-based addressing. 0 if the node does not have an
203 static inline __u64 drm_vma_node_offset_addr(struct drm_vma_offset_node *node) in drm_vma_node_offset_addr() argument
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
211 * @file_mapping: Address space to unmap @node from
213 * Unmap all userspace mappings for a given offset node. The mappings must be
218 * is not called on this node concurrently.
220 static inline void drm_vma_node_unmap(struct drm_vma_offset_node *node, in drm_vma_node_unmap() argument
223 if (drm_mm_node_allocated(&node->vm_node)) in drm_vma_node_unmap()
225 drm_vma_node_offset_addr(node), in drm_vma_node_unmap()
226 drm_vma_node_size(node) << PAGE_SHIFT, 1); in drm_vma_node_unmap()
231 * @node: Offset node
234 * This checks whether @tag is granted access to @node. It is the same as
241 static inline int drm_vma_node_verify_access(struct drm_vma_offset_node *node, in drm_vma_node_verify_access() argument
244 return drm_vma_node_is_allowed(node, tag) ? 0 : -EACCES; in drm_vma_node_verify_access()