- gtk-doc requires that the names in comments match the ones in the header declaration. - igt_debugfs_dir works together with igt_sysfs_get(). Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> --- lib/igt_debugfs.c | 8 ++++---- lib/igt_debugfs.h | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 66398aca87ea..103fe4d4c2d3 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -47,7 +47,7 @@ * * This library provides helpers to access debugfs features. On top of some * basic functions to access debugfs files with e.g. igt_debugfs_open() it also - * provides higher-level wrappers for some debugfs features + * provides higher-level wrappers for some debugfs features. * * # Pipe CRC Support * @@ -804,17 +804,17 @@ int igt_get_stable_obj_count(int driver) * @device: fd of the device (or -1 to default to Intel) * * This opens the debugfs directory corresponding to device for use - * with igt_debugfs_set() and igt_debugfs_get(). + * with igt_sysfs_get() and related functions. * * Returns: * The directory fd, or -1 on failure. */ -int igt_debugfs_dir(int fd) +int igt_debugfs_dir(int device) { struct stat st; char path[256]; - if (fstat(fd, &st) || !S_ISCHR(st.st_mode)) + if (fstat(device, &st) || !S_ISCHR(st.st_mode)) return -1; sprintf(path, "%s/dri/%d", __debugfs_mount(), (int)(st.st_rdev & 0xff)); diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 7390fc5756c8..6a3cb07f1649 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -155,6 +155,11 @@ bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b); * Also drop active objects once retired. */ #define DROP_ACTIVE 0x8 +/** + * DROP_ALL: + * + * All of the above DROP_ flags combined. + */ #define DROP_ALL (DROP_UNBOUND | \ DROP_BOUND | \ DROP_RETIRE | \ @@ -175,6 +180,6 @@ void igt_enable_prefault(void); */ int igt_get_stable_obj_count(int driver); -int igt_debugfs_dir(int fd); +int igt_debugfs_dir(int device); #endif /* __IGT_DEBUGFS_H__ */ -- 2.8.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx