[Intel-gfx] [PATCH igt] tests/gem_eio: use lib to force a gpu reset

Mika Kuoppala mika.kuoppala at linux.intel.com
Fri Mar 16 10:19:19 UTC 2018


From: Mika Kuoppala <mika.kuoppala at intel.com>

Instead of poking the debugfs directly, use a library
function to force a gpu reset.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
 tests/gem_eio.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/tests/gem_eio.c b/tests/gem_eio.c
index 249f5bff..1aa5d60a 100644
--- a/tests/gem_eio.c
+++ b/tests/gem_eio.c
@@ -84,15 +84,6 @@ static void wedge_gpu(int fd)
 	igt_assert(i915_reset_control(true));
 }
 
-static void wedgeme(int drm_fd)
-{
-	int dir = igt_debugfs_dir(drm_fd);
-
-	igt_sysfs_set(dir, "i915_wedged", "-1");
-
-	close(dir);
-}
-
 static int __gem_throttle(int fd)
 {
 	int err = 0;
@@ -181,7 +172,7 @@ static void test_suspend(int fd, int state)
 
 	/* Check we can suspend when the driver is already wedged */
 	igt_require(i915_reset_control(false));
-	wedgeme(fd);
+	igt_force_gpu_reset(fd);
 
 	igt_system_suspend_autoresume(state, SUSPEND_TEST_DEVICES);
 
-- 
2.14.1



More information about the Intel-gfx mailing list