summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-14 16:00:22 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-14 16:00:22 +0100
commitea18fc16cd88a31b5d390721ad103efa07e288f1 (patch)
tree6ba621b91b8759e17a9537d90a1d8ad590bad7ae /tests
parent553d594b6efd117497791e708146588268c992a9 (diff)
lib: extract igt_open_forcewake_handle
... and I immediately regret that I've killed the return value for igt_debugfs_init, since we have callers which need to work without the forcewake stuff, e.g. the reg dumper needs to work without i915 loaded. Put this new helper to good use in the mmio code and the pm_pc8 testcase. Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/pm_pc8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c
index 5c74b234..c672e809 100644
--- a/tests/pm_pc8.c
+++ b/tests/pm_pc8.c
@@ -46,6 +46,7 @@
#include "intel_gpu_tools.h"
#include "i915_drm.h"
#include "igt_kms.h"
+#include "igt_debugfs.h"
#define MSR_PC8_RES 0x630
#define MSR_PC9_RES 0x631
@@ -1009,8 +1010,8 @@ static void debugfs_forcewake_user_subtest(void)
disable_all_screens(&ms_data);
igt_assert(wait_for_suspended());
- fd = open("/sys/kernel/debug/dri/0/i915_forcewake_user", O_RDONLY);
- igt_require(fd);
+ fd = igt_open_forcewake_handle();
+ igt_require(fd >= 0);
if (has_runtime_pm) {
igt_assert(wait_for_active());