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>
This commit is contained in:
Daniel Vetter 2014-03-14 16:07:28 +01:00
parent 2839619f49
commit b0b4f8db71

View File

@ -37,6 +37,7 @@
#include "drm.h" #include "drm.h"
#include "i915_drm.h" #include "i915_drm.h"
#include "drmtest.h" #include "drmtest.h"
#include "igt_debugfs.h"
#define OBJECT_SIZE (16*1024*1024) #define OBJECT_SIZE (16*1024*1024)
@ -145,6 +146,17 @@ test_sysfs_reader(void)
igt_stop_helper(&reader); 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; int fd;
igt_main igt_main
@ -166,6 +178,9 @@ igt_main
igt_subtest("sysfs-reader") igt_subtest("sysfs-reader")
test_sysfs_reader(); test_sysfs_reader();
igt_subtest("forcewake")
test_forcewake();
igt_fixture igt_fixture
close(fd); close(fd);
} }