summaryrefslogtreecommitdiff
path: root/tests/pm_rps.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-12-11 21:41:58 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-04-01 20:09:34 +0100
commitd081953e67b3e15d9dc32a68b1248bb81e586bc5 (patch)
tree937344bf53b34f6d1862c70b486e15275fb636b9 /tests/pm_rps.c
parent3dd5fe8ab294075c558d4f4bd9a74077decfb8c7 (diff)
igt/pm_rps: Trigger a real GPU reset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/pm_rps.c')
-rw-r--r--tests/pm_rps.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 74bbdc85..484db0b5 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -525,6 +525,13 @@ static void stabilize_check(int *freqs)
igt_debug("Waited %d msec to stabilize cur\n", wait);
}
+static void reset_gpu(void)
+{
+ int fd = drm_open_driver(DRIVER_INTEL);
+ igt_post_hang_ring(fd, igt_hang_ring(fd, I915_EXEC_DEFAULT));
+ close(fd);
+}
+
/*
* reset - test that turbo works across a ring stop
*
@@ -560,11 +567,8 @@ static void reset(void)
load_helper_run(LOW);
stabilize_check(pre_freqs);
- igt_debug("Stop rings...\n");
- igt_set_stop_rings(STOP_RING_DEFAULTS);
- while (igt_get_stop_rings())
- usleep(1000 * 100);
- igt_debug("Ring stop cleared\n");
+ igt_debug("Reset gpu...\n");
+ reset_gpu();
igt_debug("Apply high load...\n");
load_helper_set_load(HIGH);