Lines Matching refs:hole
382 * DECLARE_NEXT_HOLE_ADDR - macro to declare next hole functions
387 * This macro declares a function to return the next hole of the addr rb tree.
451 * 0 on success, -ENOSPC if there's no hole where @node is.
455 struct drm_mm_node *hole;
464 /* Find the relevant hole to add our node to */
465 hole = find_hole_addr(mm, node->start, 0);
466 if (!hole)
469 adj_start = hole_start = __drm_mm_hole_node_start(hole);
470 adj_end = hole_end = hole_start + hole->hole_size;
473 mm->color_adjust(hole, node->color, &adj_start, &adj_end);
481 list_add(&node->node_list, &hole->node_list);
482 drm_mm_interval_tree_add_node(hole, node);
485 rm_hole(hole);
487 add_hole(hole);
515 * 0 on success, -ENOSPC if there's no suitable hole.
524 struct drm_mm_node *hole;
543 for (hole = first_hole(mm, range_start, range_end, size, mode);
544 hole;
545 hole = once ? NULL : next_hole(mm, hole, size, mode)) {
546 u64 hole_start = __drm_mm_hole_node_start(hole);
547 u64 hole_end = hole_start + hole->hole_size;
560 mm->color_adjust(hole, color, &col_start, &col_end);
600 list_add(&node->node_list, &hole->node_list);
601 drm_mm_interval_tree_add_node(hole, node);
603 rm_hole(hole);
605 add_hole(hole);
695 * until there's a suitable hole: Especially for big objects or nodes that
704 * drm_mm_scan_add_block() until a suitable hole is found or there are no
733 * hole.
778 * hole.
781 * True if a hole has been found, false otherwise.
787 struct drm_mm_node *hole;
798 /* Remove this block from the node_list so that we enlarge the hole
803 hole = list_prev_entry(node, node_list);
804 DRM_MM_BUG_ON(list_next_entry(hole, node_list) != node);
807 hole_start = __drm_mm_hole_node_start(hole);
808 hole_end = __drm_mm_hole_node_end(hole);
813 mm->color_adjust(hole, scan->color, &col_start, &col_end);
872 * return false when no hole has been found.
892 * hole.
905 * drm_mm_scan_color_evict - evict overlapping nodes on either side of hole
906 * @scan: drm_mm scan with target hole
909 * need to remove a few more nodes from either side of the target hole if
918 struct drm_mm_node *hole;
927 * The hole found during scanning should ideally be the first element
931 list_for_each_entry(hole, &mm->hole_stack, hole_stack) {
932 hole_start = __drm_mm_hole_node_start(hole);
933 hole_end = hole_start + hole->hole_size;
940 /* We should only be called after we found the hole previously */
941 DRM_MM_BUG_ON(&hole->hole_stack == &mm->hole_stack);
942 if (unlikely(&hole->hole_stack == &mm->hole_stack))
948 mm->color_adjust(hole, scan->color, &hole_start, &hole_end);
950 return hole;
952 return list_next_entry(hole, node_list);
977 /* Clever trick to avoid a special case in the free hole tracking. */