summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-05-12 17:16:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-12-13 12:01:31 +0000
commit7a373e042633834663d8713a9d92aeb12d881c81 (patch)
treefa75dd4c8bf39fe0c5ed86eb56fe2b21e3f5d7aa
parentd91084778789858c5045af10af41486ce379cb26 (diff)
lib/i915: Discard unused gem_test_engine()
Last user removed, remove the definition of gem_test_engine(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--lib/i915/gem_submission.c49
-rw-r--r--lib/i915/gem_submission.h2
2 files changed, 0 insertions, 51 deletions
diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 320340a5..c8aa7333 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -167,55 +167,6 @@ bool gem_has_guc_submission(int fd)
return gem_submission_method(fd) & GEM_SUBMISSION_GUC;
}
-static bool is_wedged(int i915)
-{
- int err = 0;
- if (ioctl(i915, DRM_IOCTL_I915_GEM_THROTTLE))
- err = -errno;
- return err == -EIO;
-}
-
-/**
- * gem_test_engine:
- * @i915: open i915 drm file descriptor
- * @engine: the engine (I915_EXEC_RING id) to exercise
- *
- * Execute a nop batch on the engine specified, or ALL_ENGINES for all,
- * and check it executes.
- */
-void gem_test_engine(int i915, unsigned int engine)
-{
- const uint32_t bbe = MI_BATCH_BUFFER_END;
- struct drm_i915_gem_exec_object2 obj = { };
- struct drm_i915_gem_execbuffer2 execbuf = {
- .buffers_ptr = to_user_pointer(&obj),
- .buffer_count = 1,
- };
-
- i915 = gem_reopen_driver(i915);
- igt_assert(!is_wedged(i915));
-
- obj.handle = gem_create(i915, 4096);
- gem_write(i915, obj.handle, 0, &bbe, sizeof(bbe));
-
- if (engine == ALL_ENGINES) {
- const struct intel_execution_engine2 *e2;
-
- __for_each_physical_engine(i915, e2) {
- execbuf.flags = e2->flags;
- gem_execbuf(i915, &execbuf);
- }
- } else {
- execbuf.flags = engine;
- gem_execbuf(i915, &execbuf);
- }
- gem_sync(i915, obj.handle);
- gem_close(i915, obj.handle);
-
- igt_assert(!is_wedged(i915));
- close(i915);
-}
-
int gem_cmdparser_version(int i915, uint32_t engine)
{
int version = 0;
diff --git a/lib/i915/gem_submission.h b/lib/i915/gem_submission.h
index 773e7b51..c013e749 100644
--- a/lib/i915/gem_submission.h
+++ b/lib/i915/gem_submission.h
@@ -48,6 +48,4 @@ void gem_require_blitter(int i915);
unsigned int gem_submission_measure(int i915, unsigned int engine);
-void gem_test_engine(int fd, unsigned int engine);
-
#endif /* GEM_SUBMISSION_H */