summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_debugfs.c')
-rw-r--r--lib/igt_debugfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 2f58519a..ac9f1522 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -1095,14 +1095,15 @@ bool igt_drop_caches_has(int drm_fd, uint64_t val)
* This calls the debugfs interface the drm/i915 GEM driver exposes to drop or
* evict certain classes of gem buffer objects.
*/
-void igt_drop_caches_set(int drm_fd, uint64_t val)
+bool igt_drop_caches_set(int drm_fd, uint64_t val)
{
- int dir;
+ int dir, ret;
dir = igt_debugfs_dir(drm_fd);
- igt_assert(igt_sysfs_printf(dir, "i915_gem_drop_caches",
- "0x%" PRIx64, val) > 0);
+ ret = igt_sysfs_printf(dir, "i915_gem_drop_caches", "0x%" PRIx64, val);
close(dir);
+
+ return ret > 0;
}
static int get_object_count(int fd)