summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/selftests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-11-07 13:41:31 +0300
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2017-11-07 16:58:07 +0300
commit2dff0a0ce52bd4c07f3f8f843c25b6250a599361 (patch)
tree367ee28b9b422790c444b49ef71b012a38318ca3 /drivers/gpu/drm/selftests
parentc188d7ebbebd0b21a071777ac937c0743e2e7a64 (diff)
downloadlinux-2dff0a0ce52bd4c07f3f8f843c25b6250a599361.tar.xz
drm/selftests/mm: Insert cond_resched() between insert modes
kbuilder has begun running the selftests and reported a soft-lockup inside __igt_insert(), so break up the test loop over different modes with another call to cond_resched(). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107104131.5923-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/selftests')
-rw-r--r--drivers/gpu/drm/selftests/test-drm_mm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
index 86eb4c185a28..7cc935d7b7aa 100644
--- a/drivers/gpu/drm/selftests/test-drm_mm.c
+++ b/drivers/gpu/drm/selftests/test-drm_mm.c
@@ -682,6 +682,8 @@ static int __igt_insert(unsigned int count, u64 size, bool replace)
drm_mm_for_each_node_safe(node, next, &mm)
drm_mm_remove_node(node);
DRM_MM_BUG_ON(!drm_mm_clean(&mm));
+
+ cond_resched();
}
ret = 0;
@@ -944,6 +946,8 @@ static int __igt_insert_range(unsigned int count, u64 size, u64 start, u64 end)
drm_mm_for_each_node_safe(node, next, &mm)
drm_mm_remove_node(node);
DRM_MM_BUG_ON(!drm_mm_clean(&mm));
+
+ cond_resched();
}
ret = 0;
@@ -1068,6 +1072,7 @@ static int igt_align(void *ignored)
drm_mm_for_each_node_safe(node, next, &mm)
drm_mm_remove_node(node);
DRM_MM_BUG_ON(!drm_mm_clean(&mm));
+
cond_resched();
}