diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-11-03 13:48:51 +0000 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-11-06 13:25:03 +0000 |
commit | c049c39f357295ecfc4d0795b5b3b1e35b04ac58 (patch) | |
tree | b67e1b8b4f7208c76e0f8adc7f6e6df00457fef2 /tests/kms_flip.c | |
parent | 4f689d52e7e6a511fb0de21ccc0b938d57ce6f41 (diff) |
tests: use igt_debugfs where possible
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r-- | tests/kms_flip.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 6fb291c9..612d7a9e 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -679,20 +679,11 @@ static void stop_rings(bool stop) static void eat_error_state(void) { - static const char dfs_base[] = "/sys/kernel/debug/dri"; static const char dfs_entry_error[] = "i915_error_state"; static const char data[] = ""; - char fname[FILENAME_MAX]; - int card_index = drm_get_card(); int fd; - igt_assert(card_index != -1); - - /* clear the error state */ - snprintf(fname, FILENAME_MAX, "%s/%i/%s", - dfs_base, card_index, dfs_entry_error); - - fd = open(fname, O_WRONLY); + fd = igt_debugfs_open(dfs_entry_error, O_WRONLY); igt_assert(fd >= 0); igt_assert(write(fd, data, sizeof(data)) == sizeof(data)); |