diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_debugfs.c | 59 | ||||
-rw-r--r-- | lib/igt_debugfs.h | 7 |
2 files changed, 0 insertions, 66 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 676884c8..8cac9d1e 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -77,9 +77,6 @@ * * - drm/i915 supports interfaces to evict certain classes of gem buffer * objects, see igt_drop_caches_set(). - * - * - drm/i915 supports an interface to disable prefaulting, useful to test - * slow paths in ioctls. See igt_disable_prefault(). */ /* @@ -1061,62 +1058,6 @@ void igt_drop_caches_set(int drm_fd, uint64_t val) close(dir); } -/* - * Prefault control - */ - -#define PREFAULT_DEBUGFS "/sys/module/i915/parameters/prefault_disable" -static void igt_prefault_control(bool enable) -{ - const char *name = PREFAULT_DEBUGFS; - int fd; - char buf[2] = {'Y', 'N'}; - int index; - - fd = open(name, O_RDWR); - igt_require(fd >= 0); - - if (enable) - index = 1; - else - index = 0; - - igt_require(write(fd, &buf[index], 1) == 1); - - close(fd); -} - -static void enable_prefault_at_exit(int sig) -{ - igt_enable_prefault(); -} - -/** - * igt_disable_prefault: - * - * Disable prefaulting in certain gem ioctls through the debugfs interface. As - * usual this installs an exit handler to clean up and re-enable prefaulting - * even when the test exited abnormally. - * - * igt_enable_prefault() will enable normale operation again. - */ -void igt_disable_prefault(void) -{ - igt_prefault_control(false); - - igt_install_exit_handler(enable_prefault_at_exit); -} - -/** - * igt_enable_prefault: - * - * Enable prefault (again) through the debugfs interface. - */ -void igt_enable_prefault(void) -{ - igt_prefault_control(true); -} - static int get_object_count(int fd) { int dir, ret, scanned; diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 5f0ce492..1e0cc108 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -203,13 +203,6 @@ static inline void rcu_barrier(int fd) } /* - * Prefault control - */ - -void igt_disable_prefault(void); -void igt_enable_prefault(void); - -/* * Put the driver into a stable (quiescent) state and get the current number of * gem buffer objects */ |