From e56ab79711b3fb248bf165d1601acd25a2b7529d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 22 Aug 2017 13:47:33 +0100 Subject: igt/pm_rpm: Use libc 'ftw' rather than opencoding our own filetree walk By using ftw, we avoid the issue of having to handle directory recursion ourselves and can focus on the test of checking the reading a sysfs/debugfs does not break runtime suspend. In the process, disregard errors when opening the individual files as they may fail for other reasons. v2: Bracket the file open/close with the wait_for_suspended() tests. Whilst the fd is open, it may be keeping the device awake, e.g. i915_forcewake_user. Signed-off-by: Chris Wilson Tested-by: Jari Tahvanainen --- lib/igt_debugfs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/igt_debugfs.h') diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index f1a76406..4fa49d21 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -32,6 +32,7 @@ enum pipe; const char *igt_debugfs_mount(void); +char *igt_debugfs_path(int device, char *path, int pathlen); int igt_debugfs_dir(int device); -- cgit v1.2.3