summaryrefslogtreecommitdiff
path: root/lib/ioctl_wrappers.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r--lib/ioctl_wrappers.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 25d04b3e..61f93bd8 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1158,55 +1158,6 @@ void gem_require_caching(int fd)
errno = 0;
}
-static void reset_device(int fd)
-{
- int dir;
-
- dir = igt_debugfs_dir(fd);
- igt_require(dir >= 0);
-
- if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) {
- igt_info("Found wedged device, trying to reset and continue\n");
- igt_sysfs_set(dir, "i915_wedged", "-1");
- }
- igt_sysfs_set(dir, "i915_next_seqno", "1");
-
- close(dir);
-}
-
-void igt_require_gem(int fd)
-{
- char path[256];
- int err;
-
- igt_require_intel(fd);
-
- /*
- * We only want to use the throttle-ioctl for its -EIO reporting
- * of a wedged device, not for actually waiting on outstanding
- * requests! So create a new drm_file for the device that is clean.
- */
- snprintf(path, sizeof(path), "/proc/self/fd/%d", fd);
- fd = open(path, O_RDWR);
- igt_assert_lte(0, fd);
-
- /*
- * Reset the global seqno at the start of each test. This ensures that
- * the test will not wrap unless it explicitly sets up seqno wrapping
- * itself, which avoids accidentally hanging when setting up long
- * sequences of batches.
- */
- reset_device(fd);
-
- err = 0;
- if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE))
- err = -errno;
-
- close(fd);
-
- igt_require_f(err == 0, "Unresponsive i915/GEM device\n");
-}
-
/**
* gem_require_ring:
* @fd: open i915 drm file descriptor