[Intel-gfx] [PATCH] drm/i915/selftests: Apply cond_resched() liberally to igt_ggtt_page()

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 5 17:39:04 UTC 2018


Still occasionally hitting timeouts on bxt with igt_ggtt_page(), so
include some cond_resched() to keep the nmi watchdog appeased.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index bb7cf998fc65..85c19fb24105 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -1067,6 +1067,8 @@ static int igt_ggtt_page(void *arg)
 		ggtt->base.insert_page(&ggtt->base,
 				       i915_gem_object_get_dma_address(obj, 0),
 				       offset, I915_CACHE_NONE, 0);
+
+		cond_resched();
 	}
 
 	order = i915_random_order(count, &prng);
@@ -1082,6 +1084,8 @@ static int igt_ggtt_page(void *arg)
 		vaddr = io_mapping_map_atomic_wc(&ggtt->iomap, offset);
 		iowrite32(n, vaddr + n);
 		io_mapping_unmap_atomic(vaddr);
+
+		cond_resched();
 	}
 	i915_gem_flush_ggtt_writes(i915);
 
@@ -1101,6 +1105,8 @@ static int igt_ggtt_page(void *arg)
 			err = -EINVAL;
 			break;
 		}
+
+		cond_resched();
 	}
 
 	kfree(order);
-- 
2.15.1



More information about the Intel-gfx mailing list