summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-16 14:41:25 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-17 09:47:32 +0100
commitf04f17bcd404d7be720148fee6bb425cdb41dab1 (patch)
tree9b5c8933c77bd80402f058052f9efd97eadad7c2 /tests
parent28b6e41142c035b46d2784de399c5dadfa5ce429 (diff)
lib/igt_debugfs: Remove debugfs from igt_debugfs_open
Also update the api docs a bit since the Returns: section was missing. v2: Readd the accidentally lost line for @filename. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_reset_stats.c6
-rw-r--r--tests/pm_rps.c8
2 files changed, 3 insertions, 11 deletions
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index 71ba6dfe..3719f407 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -76,8 +76,6 @@ struct local_drm_i915_gem_context_destroy {
#define CONTEXT_DESTROY_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2e, struct local_drm_i915_gem_context_destroy)
#define GET_RESET_STATS_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x32, struct local_drm_i915_reset_stats)
-static igt_debugfs_t dfs;
-
#define LOCAL_I915_EXEC_VEBOX (4 << 0)
struct target_ring;
@@ -244,7 +242,7 @@ static void stop_rings(const int mask)
igt_assert((mask & ~((1 << NUM_RINGS) - 1)) == 0);
igt_assert(snprintf(buf, sizeof(buf), "0x%02x", mask) == 4);
- fd = igt_debugfs_open(&dfs, "i915_ring_stop", O_WRONLY);
+ fd = igt_debugfs_open("i915_ring_stop", O_WRONLY);
igt_assert(fd >= 0);
igt_assert(write(fd, buf, 4) == 4);
@@ -1040,8 +1038,6 @@ igt_main
igt_skip_on_f(ret != 0 && (errno == ENODEV || errno == EINVAL),
"Kernel is too old, or contexts not supported: %s\n",
strerror(errno));
-
- igt_debugfs_init(&dfs);
}
igt_subtest("params")
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index d964f2a7..2f321840 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -63,8 +63,6 @@ struct junk {
{ "cur", "r", NULL }, { "min", "rb+", NULL }, { "max", "rb+", NULL }, { "RP0", "r", NULL }, { "RP1", "r", NULL }, { "RPn", "r", NULL }, { NULL, NULL, NULL }
};
-static igt_debugfs_t dfs;
-
static int readval(FILE *filp)
{
int val;
@@ -305,7 +303,7 @@ static void stop_rings(void)
int fd;
static const char data[] = "0xf";
- fd = igt_debugfs_open(&dfs, "i915_ring_stop", O_WRONLY);
+ fd = igt_debugfs_open("i915_ring_stop", O_WRONLY);
igt_assert(fd >= 0);
igt_debug("injecting ring stop\n");
@@ -320,7 +318,7 @@ static bool rings_stopped(void)
static char buf[128];
unsigned long long val;
- fd = igt_debugfs_open(&dfs, "i915_ring_stop", O_RDONLY);
+ fd = igt_debugfs_open("i915_ring_stop", O_RDONLY);
igt_assert(fd >= 0);
igt_assert(read(fd, buf, sizeof(buf)) > 0);
@@ -555,8 +553,6 @@ igt_main
igt_install_exit_handler(pm_rps_exit_handler);
load_helper_init();
-
- igt_debugfs_init(&dfs);
}
igt_subtest("basic-api")