From 8d03573de74ebd38d1047131a698a2068605efed Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 18 Oct 2017 13:28:14 +0100 Subject: lib: Flush the driver's internal cache of objects before counting As the driver itself keeps a cache of objects, these too need to be flushed prior to producing a stable count of objects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102655 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen --- lib/igt_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/igt_debugfs.c') diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 60b29e3a..8b33b478 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -1128,7 +1128,8 @@ static int get_object_count(int fd) { int dir, ret, scanned; - igt_drop_caches_set(fd, DROP_RETIRE | DROP_ACTIVE | DROP_FREED); + igt_drop_caches_set(fd, + DROP_RETIRE | DROP_ACTIVE | DROP_IDLE | DROP_FREED); dir = igt_debugfs_dir(fd); scanned = igt_sysfs_scanf(dir, "i915_gem_objects", -- cgit v1.2.3