summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-10-18 13:28:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-10-19 09:07:11 +0100
commit8d03573de74ebd38d1047131a698a2068605efed (patch)
treee0dde3935ee01e79580e3783c479225256ce65ca /lib/igt_debugfs.c
parent78159ab1c1023587baf876c647325ae973c88f26 (diff)
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 <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'lib/igt_debugfs.c')
-rw-r--r--lib/igt_debugfs.c3
1 files changed, 2 insertions, 1 deletions
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",