Lines Matching defs:hole
426 * 0 on success, -ENOSPC if there's no hole where @node is.
430 struct drm_mm_node *hole;
439 /* Find the relevant hole to add our node to */
440 hole = find_hole(mm, node->start);
441 if (!hole)
444 adj_start = hole_start = __drm_mm_hole_node_start(hole);
445 adj_end = hole_end = hole_start + hole->hole_size;
448 mm->color_adjust(hole, node->color, &adj_start, &adj_end);
456 list_add(&node->node_list, &hole->node_list);
457 drm_mm_interval_tree_add_node(hole, node);
460 rm_hole(hole);
462 add_hole(hole);
490 * 0 on success, -ENOSPC if there's no suitable hole.
499 struct drm_mm_node *hole;
518 for (hole = first_hole(mm, range_start, range_end, size, mode);
519 hole;
520 hole = once ? NULL : next_hole(mm, hole, mode)) {
521 u64 hole_start = __drm_mm_hole_node_start(hole);
522 u64 hole_end = hole_start + hole->hole_size;
535 mm->color_adjust(hole, color, &col_start, &col_end);
575 list_add(&node->node_list, &hole->node_list);
576 drm_mm_interval_tree_add_node(hole, node);
578 rm_hole(hole);
580 add_hole(hole);
670 * until there's a suitable hole: Especially for big objects or nodes that
679 * drm_mm_scan_add_block() until a suitable hole is found or there are no
708 * hole.
753 * hole.
756 * True if a hole has been found, false otherwise.
762 struct drm_mm_node *hole;
773 /* Remove this block from the node_list so that we enlarge the hole
778 hole = list_prev_entry(node, node_list);
779 DRM_MM_BUG_ON(list_next_entry(hole, node_list) != node);
782 hole_start = __drm_mm_hole_node_start(hole);
783 hole_end = __drm_mm_hole_node_end(hole);
788 mm->color_adjust(hole, scan->color, &col_start, &col_end);
847 * return false when no hole has been found.
867 * hole.
880 * drm_mm_scan_color_evict - evict overlapping nodes on either side of hole
881 * @scan: drm_mm scan with target hole
884 * need to remove a few more nodes from either side of the target hole if
893 struct drm_mm_node *hole;
902 * The hole found during scanning should ideally be the first element
906 list_for_each_entry(hole, &mm->hole_stack, hole_stack) {
907 hole_start = __drm_mm_hole_node_start(hole);
908 hole_end = hole_start + hole->hole_size;
915 /* We should only be called after we found the hole previously */
916 DRM_MM_BUG_ON(&hole->hole_stack == &mm->hole_stack);
917 if (unlikely(&hole->hole_stack == &mm->hole_stack))
923 mm->color_adjust(hole, scan->color, &hole_start, &hole_end);
925 return hole;
927 return list_next_entry(hole, node_list);
952 /* Clever trick to avoid a special case in the free hole tracking. */