summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-12-30 18:16:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-12-30 18:20:36 +0000
commitf11259fe129e3d5cf6a2c092fbf3932d86d3d01c (patch)
tree4bf0b8320bd9baa065783916644947142af08298
parent7ec1eedfba6246eb21c185fa4ac33a04544b9190 (diff)
i915: Drop gem_cs_prefetch
Covered with more accuracy with selftests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/Makefile.sources3
-rw-r--r--tests/i915/gem_busy.c1
-rw-r--r--tests/i915/gem_cs_prefetch.c149
-rw-r--r--tests/i915/gem_exec_await.c3
-rw-r--r--tests/i915/gem_exec_balancer.c1
-rw-r--r--tests/i915/gem_exec_endless.c1
-rw-r--r--tests/i915/gem_exec_fair.c1
-rw-r--r--tests/i915/gem_exec_schedule.c1
-rw-r--r--tests/i915/perf_pmu.c1
-rw-r--r--tests/intel-ci/blacklist.txt1
-rw-r--r--tests/meson.build1
12 files changed, 0 insertions, 165 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 415271ad..33ec61f7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -97,8 +97,6 @@ gem_create_LDADD = $(LDADD) -lpthread -latomic
gem_close_race_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_close_race_LDADD = $(LDADD) -lpthread
gem_ctx_freq_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
-gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
-gem_ctx_thrash_LDADD = $(LDADD) -lpthread
gem_ctx_sseu_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
gem_exec_balancer_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
gem_exec_capture_LDADD = $(LDADD) -lz
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index c7ee2183..da228034 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -158,9 +158,6 @@ gem_concurrent_blit_SOURCES = i915/gem_concurrent_blit.c
TESTS_progs += gem_create
gem_create_SOURCES = i915/gem_create.c
-TESTS_progs += gem_cs_prefetch
-gem_cs_prefetch_SOURCES = i915/gem_cs_prefetch.c
-
TESTS_progs += gem_cs_tlb
gem_cs_tlb_SOURCES = i915/gem_cs_tlb.c
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index 435f30d7..77a55101 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -26,7 +26,6 @@
#include <sys/ioctl.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_rand.h"
#include "igt_vgem.h"
diff --git a/tests/i915/gem_cs_prefetch.c b/tests/i915/gem_cs_prefetch.c
deleted file mode 100644
index 4830f62b..00000000
--- a/tests/i915/gem_cs_prefetch.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright © 2011 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- *
- * Authors:
- * Daniel Vetter <daniel.vetter@ffwll.ch>
- *
- */
-
-/*
- * Testcase: Test the CS prefetch behaviour on batches
- *
- * Historically the batch prefetcher doesn't check whether it's crossing page
- * boundaries and likes to throw up when it gets a pagefault in return for his
- * over-eager behaviour. Check for this.
- *
- * This test for a bug where we've failed to plug a scratch pte entry into the
- * very last gtt pte.
- */
-#include "i915/gem.h"
-#include "i915/gem_ring.h"
-#include "igt.h"
-
-IGT_TEST_DESCRIPTION("Test the CS prefetch behaviour on batches.");
-
-#define BATCH_SIZE 4096
-
-struct shadow {
- uint32_t handle;
- struct drm_i915_gem_relocation_entry reloc;
-};
-
-static void setup(int fd, int gen, struct shadow *shadow)
-{
- uint32_t buf[16];
- int i;
-
- shadow->handle = gem_create(fd, 4096);
-
- i = 0;
- buf[i++] = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0);
- if (gen >= 8) {
- buf[i++] = BATCH_SIZE - sizeof(uint32_t);
- buf[i++] = 0;
- } else if (gen >= 4) {
- buf[i++] = 0;
- buf[i++] = BATCH_SIZE - sizeof(uint32_t);
- } else {
- buf[i-1]--;
- buf[i++] = BATCH_SIZE - sizeof(uint32_t);
- }
- buf[i++] = MI_BATCH_BUFFER_END;
- buf[i++] = MI_BATCH_BUFFER_END;
- gem_write(fd, shadow->handle, 0, buf, sizeof(buf));
-
- memset(&shadow->reloc, 0, sizeof(shadow->reloc));
- if (gen >= 8 || gen < 4)
- shadow->reloc.offset = sizeof(uint32_t);
- else
- shadow->reloc.offset = 2*sizeof(uint32_t);
- shadow->reloc.delta = BATCH_SIZE - sizeof(uint32_t);
- shadow->reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION;
- shadow->reloc.write_domain = I915_GEM_DOMAIN_INSTRUCTION;
-}
-
-static void can_test_ring(unsigned ring)
-{
- int master = drm_open_driver_master(DRIVER_INTEL);
- int fd = drm_open_driver(DRIVER_INTEL);
-
- /* Dance to avoid dying with master open */
- close(master);
- igt_require_gem(fd);
- gem_require_ring(fd, ring);
- igt_require(gem_can_store_dword(fd, ring));
- close(fd);
-}
-
-static void test_ring(unsigned ring)
-{
- struct drm_i915_gem_execbuffer2 execbuf;
- struct drm_i915_gem_exec_object2 obj[2];
- struct shadow shadow;
- uint64_t i, count;
- int fd, gen;
-
- can_test_ring(ring);
-
- fd = drm_open_driver_master(DRIVER_INTEL);
- gen = intel_gen(intel_get_drm_devid(fd));
- setup(fd, gen, &shadow);
-
- count = gem_aperture_size(fd) / BATCH_SIZE;
- intel_require_memory(count, BATCH_SIZE, CHECK_RAM);
- /* Fill the entire gart with batches and run them. */
- memset(obj, 0, sizeof(obj));
- obj[1].handle = shadow.handle;
- obj[1].relocs_ptr = to_user_pointer(&shadow.reloc);
- obj[1].relocation_count = 1;
-
- memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = to_user_pointer(obj);
- execbuf.flags = ring;
- if (gen < 6)
- execbuf.flags |= I915_EXEC_SECURE;
-
- for (i = 0; i < count; i++) {
- /* Create the new batch using the GPU */
- obj[0].handle = gem_create(fd, BATCH_SIZE);
- shadow.reloc.target_handle = obj[0].handle;
- execbuf.buffer_count = 2;
- gem_execbuf(fd, &execbuf);
-
- /* ...then execute the new batch */
- execbuf.buffer_count = 1;
- gem_execbuf(fd, &execbuf);
-
- /* ...and leak the handle to consume the GTT */
- }
-
- close(fd);
-}
-
-igt_main
-{
- const struct intel_execution_ring *e;
-
- for (e = intel_execution_rings; e->name; e++)
- igt_subtest_f("%s", e->name)
- test_ring(eb_ring(e));
-}
diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
index 70fda968..e64d2a94 100644
--- a/tests/i915/gem_exec_await.c
+++ b/tests/i915/gem_exec_await.c
@@ -26,14 +26,11 @@
#include <sys/signal.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_rand.h"
#include "igt_sysfs.h"
#include "igt_vgem.h"
-#define ENGINE_FLAGS (I915_EXEC_RING_MASK | I915_EXEC_BSD_MASK)
-
static double elapsed(const struct timespec *start, const struct timespec *end)
{
return ((end->tv_sec - start->tv_sec) +
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index c3950aad..01db0e11 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -27,7 +27,6 @@
#include <sys/signal.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_gt.h"
#include "igt_perf.h"
diff --git a/tests/i915/gem_exec_endless.c b/tests/i915/gem_exec_endless.c
index f32e6dae..1b320d4c 100644
--- a/tests/i915/gem_exec_endless.c
+++ b/tests/i915/gem_exec_endless.c
@@ -24,7 +24,6 @@
#include <sys/ioctl.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_device.h"
#include "igt_sysfs.h"
diff --git a/tests/i915/gem_exec_fair.c b/tests/i915/gem_exec_fair.c
index 4f51c4a1..b99d15ec 100644
--- a/tests/i915/gem_exec_fair.c
+++ b/tests/i915/gem_exec_fair.c
@@ -18,7 +18,6 @@
#include "sync_file.h"
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_rand.h"
#include "igt_rapl.h"
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 84b874fc..6dffb83e 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -35,7 +35,6 @@
#include <unistd.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_rand.h"
#include "igt_rapl.h"
diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
index da06a28b..88bc4dfa 100644
--- a/tests/i915/perf_pmu.c
+++ b/tests/i915/perf_pmu.c
@@ -39,7 +39,6 @@
#include <sched.h>
#include "i915/gem.h"
-#include "i915/gem_ring.h"
#include "igt.h"
#include "igt_core.h"
#include "igt_device.h"
diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
index 1915d8cb..2aacf10a 100644
--- a/tests/intel-ci/blacklist.txt
+++ b/tests/intel-ci/blacklist.txt
@@ -16,7 +16,6 @@ igt@i915_pm_rpm@gem-execbuf-stress-extra-wait
igt@gem_busy@hang.*
igt@gem_close_race@(?!.*basic).*
igt@gem_concurrent_blit(@.*)?
-igt@gem_cs_prefetch(@.*)?
igt@gem_ctx_create@(?!.*basic).*
igt@gem_ctx_exec@(?!.*basic).*
igt@gem_ctx_shared@*exhaust*
diff --git a/tests/meson.build b/tests/meson.build
index b1325577..a628b4d2 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -124,7 +124,6 @@ i915_progs = [
'gem_close',
'gem_close_race',
'gem_concurrent_blit',
- 'gem_cs_prefetch',
'gem_cs_tlb',
'gem_ctx_bad_destroy',
'gem_ctx_clone',