diff mbox

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

Message ID 20180316101919.25997-1-mika.kuoppala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala March 16, 2018, 10:19 a.m. UTC
From: Mika Kuoppala <mika.kuoppala@intel.com>

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

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

Comments

Chris Wilson March 16, 2018, 10:25 a.m. UTC | #1
Quoting Mika Kuoppala (2018-03-16 10:19:19)
> From: Mika Kuoppala <mika.kuoppala@intel.com>
> 
> Instead of poking the debugfs directly, use a library
> function to force a gpu reset.

Unfortunately said library function asserts the reset succeeds, which is
the antithesis of gem_eio.
-Chris
Mika Kuoppala March 16, 2018, 10:30 a.m. UTC | #2
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Mika Kuoppala (2018-03-16 10:19:19)
>> From: Mika Kuoppala <mika.kuoppala@intel.com>
>> 
>> Instead of poking the debugfs directly, use a library
>> function to force a gpu reset.
>
> Unfortunately said library function asserts the reset succeeds, which is
> the antithesis of gem_eio.

Ah indeed it does. Patch withdrawn.
-Mika
diff mbox

Patch

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);