Skip to content

Commit

Permalink
drm/mm: revert "Break long searches in fragmented address spaces"
Browse files Browse the repository at this point in the history
This reverts commit 7be1b9b.

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

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/359278/
  • Loading branch information
Christian König committed Mar 31, 2020
1 parent 4c1cb04 commit d8a26d8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/gpu/drm/drm_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit d8a26d8

Please sign in to comment.