tests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases

We don't wake up from forcewake when we only have PC8, but not runtime
PM, so make the test pass.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
Paulo Zanoni 2013-11-14 13:35:43 -02:00
parent 63e4dafb32
commit 19c8d5f4ff

View File

@ -985,9 +985,13 @@ static void debugfs_forcewake_user_subtest(void)
fd = open("/sys/kernel/debug/dri/0/i915_forcewake_user", O_RDONLY);
igt_require(fd);
igt_assert(wait_for_active());
sleep(10);
igt_assert(wait_for_active());
if (has_runtime_pm) {
igt_assert(wait_for_active());
sleep(10);
igt_assert(wait_for_active());
} else {
igt_assert(wait_for_suspended());
}
rc = close(fd);
igt_assert(rc == 0);