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 void drm_vma_node_revoke(struct drm_vma_offset_node *node,
79 bool drm_vma_node_is_allowed(struct drm_vma_offset_node *node,
83 * drm_vma_offset_exact_lookup_locked() - Look up node by exact address
88 * Same as drm_vma_offset_lookup_locked() but does not allow any offset into the node.
92 * Node at exact start address @start.
99 struct drm_vma_offset_node *node; in drm_vma_offset_exact_lookup_locked() local
101 node = drm_vma_offset_lookup_locked(mgr, start, pages); in drm_vma_offset_exact_lookup_locked()
102 return (node && node->vm_node.start == start) ? node : NULL; in drm_vma_offset_exact_lookup_locked()
138 * drm_vma_node_reset() - Initialize or reset node object
139 * @node: Node to initialize or reset
141 * Reset a node to its initial state. This must be called before using it with
144 * This must not be called on an already allocated node, or you will leak
147 static inline void drm_vma_node_reset(struct drm_vma_offset_node *node) in drm_vma_node_reset() argument
149 memset(node, 0, sizeof(*node)); in drm_vma_node_reset()
150 node->vm_files = RB_ROOT; in drm_vma_node_reset()
151 rwlock_init(&node->vm_lock); in drm_vma_node_reset()
156 * @node: Node to inspect
158 * Return the start address of the given node. This can be used as offset into
165 * Start address of @node for page-based addressing. 0 if the node does not
168 static inline unsigned long drm_vma_node_start(const struct drm_vma_offset_node *node) in drm_vma_node_start() argument
170 return node->vm_node.start; in drm_vma_node_start()
175 * @node: Node to inspect
177 * Return the size as number of pages for the given node. This is the same size
179 * node, this is 0.
182 * Size of @node as number of pages. 0 if the node does not have an offset
185 static inline unsigned long drm_vma_node_size(struct drm_vma_offset_node *node) in drm_vma_node_size() argument
187 return node->vm_node.size; in drm_vma_node_size()
192 * @node: Linked offset node
199 * Offset of @node for byte-based addressing. 0 if the node does not have an
202 static inline __u64 drm_vma_node_offset_addr(struct drm_vma_offset_node *node) in drm_vma_node_offset_addr() argument
204 return ((__u64)node->vm_node.start) << PAGE_SHIFT; in drm_vma_node_offset_addr()
208 * drm_vma_node_unmap() - Unmap offset node
209 * @node: Offset node
210 * @file_mapping: Address space to unmap @node from
212 * Unmap all userspace mappings for a given offset node. The mappings must be
217 * is not called on this node concurrently.
219 static inline void drm_vma_node_unmap(struct drm_vma_offset_node *node, in drm_vma_node_unmap() argument
222 if (drm_mm_node_allocated(&node->vm_node)) in drm_vma_node_unmap()
224 drm_vma_node_offset_addr(node), in drm_vma_node_unmap()
225 drm_vma_node_size(node) << PAGE_SHIFT, 1); in drm_vma_node_unmap()
230 * @node: Offset node
233 * This checks whether @tag is granted access to @node. It is the same as
240 static inline int drm_vma_node_verify_access(struct drm_vma_offset_node *node, in drm_vma_node_verify_access() argument
243 return drm_vma_node_is_allowed(node, tag) ? 0 : -EACCES; in drm_vma_node_verify_access()