summaryrefslogtreecommitdiff
path: root/tests/gem_ppgtt.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2017-03-02 10:37:11 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2017-03-21 15:50:54 +0100
commit301ad44cdf1b868b1ab89096721da91fa8541fdc (patch)
treeef18781db6cadae7f8f49f1fc449dc56b33448ec /tests/gem_ppgtt.c
parente7a0d06730f77842998368660fb45fe5c1738fda (diff)
lib: Open debugfs files for the given DRM device
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_ppgtt.c')
-rw-r--r--tests/gem_ppgtt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c
index a64d6d4f..37d601ce 100644
--- a/tests/gem_ppgtt.c
+++ b/tests/gem_ppgtt.c
@@ -236,7 +236,7 @@ static void flink_and_close(void)
gem_sync(fd2, flinked_bo);
gem_close(fd2, flinked_bo);
- igt_drop_caches_set(DROP_RETIRE);
+ igt_drop_caches_set(fd, DROP_RETIRE);
/* the flinked bo VMA should have been cleared now, so a new bo of the
* same size should get the same offset
@@ -269,12 +269,12 @@ static void flink_and_exit(void)
flinked_bo = gem_open(fd2, name);
/* Verify VMA is not there yet. */
- igt_assert(!igt_debugfs_search("i915_gem_gtt", match));
+ igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match));
exec_and_get_offset(fd2, flinked_bo);
/* Verify VMA has been created. */
- igt_assert(igt_debugfs_search("i915_gem_gtt", match));
+ igt_assert(igt_debugfs_search(fd, "i915_gem_gtt", match));
/* Close the context. */
close(fd2);
@@ -286,8 +286,8 @@ static void flink_and_exit(void)
exec_and_get_offset(fd3, gem_create(fd3, 4096));
close(fd3);
- igt_drop_caches_set(DROP_ACTIVE | DROP_RETIRE);
- igt_assert(!igt_debugfs_search("i915_gem_gtt", match));
+ igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE);
+ igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match));
close(fd);
}