diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-08-22 13:47:33 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-06 19:00:53 +0100 |
commit | e56ab79711b3fb248bf165d1601acd25a2b7529d (patch) | |
tree | 84a98307d74144724ef204dbf44008736f154eec /lib/igt_sysfs.h | |
parent | 406bb36aae33f574da522bc4effbf028d5ebca9b (diff) |
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 <chris@chris-wilson.co.uk>
Tested-by: Jari Tahvanainen <jari.tahvanainen@intel.com>
Diffstat (limited to 'lib/igt_sysfs.h')
-rw-r--r-- | lib/igt_sysfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h index d666438a..3ee89b0f 100644 --- a/lib/igt_sysfs.h +++ b/lib/igt_sysfs.h @@ -27,6 +27,7 @@ #include <stdbool.h> +char *igt_sysfs_path(int device, char *path, int pathlen, int *idx); int igt_sysfs_open(int device, int *idx); int igt_sysfs_open_parameters(int device); bool igt_sysfs_set_parameter(int device, |