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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>

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

Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux