summaryrefslogtreecommitdiff
path: root/lib/igt_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-01-28 08:10:31 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-29 14:30:21 +0000
commit4147bab8e3dcaf11bd657b5fb4c109708e94e60c (patch)
tree054ad1e991cd58e8baaec64b4afa065736ca03e6 /lib/igt_debugfs.c
parent1912e0c28d1cefb700f52c8fd4f255eecf1d92ab (diff)
i915: Drop prefault controls
They haven't been effective for a long time; so drop them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/igt_debugfs.c')
-rw-r--r--lib/igt_debugfs.c59
1 files changed, 0 insertions, 59 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;