Commit d8a26d8f authored by Christian König's avatar Christian König
Browse files

drm/mm: revert "Break long searches in fragmented address spaces"



This reverts commit 7be1b9b8.

The drm_mm is supposed to work in atomic context, so calling schedule()
or in this case cond_resched() is illegal.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/359278/
parent 4c1cb04e
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#include <linux/export.h>
#include <linux/interval_tree_generic.h>
#include <linux/seq_file.h>
#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/stacktrace.h>

@@ -367,11 +366,6 @@ next_hole(struct drm_mm *mm,
	  struct drm_mm_node *node,
	  enum drm_mm_insert_mode mode)
{
	/* Searching is slow; check if we ran out of time/patience */
	cond_resched();
	if (fatal_signal_pending(current))
		return NULL;

	switch (mode) {
	default:
	case DRM_MM_INSERT_BEST:
@@ -563,7 +557,7 @@ int drm_mm_insert_node_in_range(struct drm_mm * const mm,
		return 0;
	}

	return signal_pending(current) ? -ERESTARTSYS : -ENOSPC;
	return -ENOSPC;
}
EXPORT_SYMBOL(drm_mm_insert_node_in_range);