diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-14 16:07:28 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-14 16:13:09 +0100 |
commit | b0b4f8db717500f2618c8077dc58c217eb46af06 (patch) | |
tree | 743395d14f0e24525fa42b394c55da0ac7e88be1 /tests/drv_suspend.c | |
parent | 2839619f497dae8353d0592dcccf183374a18f73 (diff) |
tests/drv_suspend: new forcewake subtest
I suspect that currently we have an issue in there with the runtime PM
refcounting, but silly me developed this on a machine with runtime PM
support ...
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/drv_suspend.c')
-rw-r--r-- | tests/drv_suspend.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c index 9b3df2be..400c34b9 100644 --- a/tests/drv_suspend.c +++ b/tests/drv_suspend.c @@ -37,6 +37,7 @@ #include "drm.h" #include "i915_drm.h" #include "drmtest.h" +#include "igt_debugfs.h" #define OBJECT_SIZE (16*1024*1024) @@ -145,6 +146,17 @@ test_sysfs_reader(void) igt_stop_helper(&reader); } +static void +test_forcewake(void) +{ + int fw_fd; + + fw_fd = igt_open_forcewake_handle(); + igt_assert(fw_fd >= 0); + igt_system_suspend_autoresume(); + close (fw_fd); +} + int fd; igt_main @@ -166,6 +178,9 @@ igt_main igt_subtest("sysfs-reader") test_sysfs_reader(); + igt_subtest("forcewake") + test_forcewake(); + igt_fixture close(fd); } |