igt/pm_rps: Trigger a real GPU reset

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-12-11 21:41:58 +00:00
parent 3dd5fe8ab2
commit d081953e67

View File

@ -525,6 +525,13 @@ static void stabilize_check(int *freqs)
igt_debug("Waited %d msec to stabilize cur\n", wait); 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 * reset - test that turbo works across a ring stop
* *
@ -560,11 +567,8 @@ static void reset(void)
load_helper_run(LOW); load_helper_run(LOW);
stabilize_check(pre_freqs); stabilize_check(pre_freqs);
igt_debug("Stop rings...\n"); igt_debug("Reset gpu...\n");
igt_set_stop_rings(STOP_RING_DEFAULTS); reset_gpu();
while (igt_get_stop_rings())
usleep(1000 * 100);
igt_debug("Ring stop cleared\n");
igt_debug("Apply high load...\n"); igt_debug("Apply high load...\n");
load_helper_set_load(HIGH); load_helper_set_load(HIGH);