From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests: Remove i915_missed_irq
Date: Tue, 2 Apr 2019 17:20:12 -0700 [thread overview]
Message-ID: <20190403002012.24691-1-jose.souza@intel.com> (raw)
i915_ring_missed_irq was removed from debugfs in kernel patch
789659f4307a ("drm/i915: Drop fake breadcrumb irq") and it was the
base of which i915_missed_irq was written, so removing this test for
good.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
tests/Makefile.sources | 3 -
tests/i915/i915_missed_irq.c | 165 -----------------------------------
tests/meson.build | 1 -
3 files changed, 169 deletions(-)
delete mode 100644 tests/i915/i915_missed_irq.c
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 71ccf00a..9e4862c8 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -474,9 +474,6 @@ i915_getparams_basic_SOURCES = i915/i915_getparams_basic.c
TESTS_progs += i915_hangman
i915_hangman_SOURCES = i915/i915_hangman.c
-TESTS_progs += i915_missed_irq
-i915_missed_irq_SOURCES = i915/i915_missed_irq.c
-
TESTS_progs += i915_module_load
i915_module_load_SOURCES = i915/i915_module_load.c
diff --git a/tests/i915/i915_missed_irq.c b/tests/i915/i915_missed_irq.c
deleted file mode 100644
index 302da0e8..00000000
--- a/tests/i915/i915_missed_irq.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright © 2016 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.
- *
- */
-
-#include <sched.h>
-
-#include "igt.h"
-#include "igt_debugfs.h"
-#include "igt_dummyload.h"
-#include "igt_sysfs.h"
-
-IGT_TEST_DESCRIPTION("Inject missed interrupts and make sure they are caught");
-
-static void trigger_missed_interrupt(int fd, unsigned ring)
-{
- igt_spin_t *spin = __igt_spin_batch_new(fd, .engine = ring);
- uint32_t go;
- int link[2];
-
- igt_assert(pipe(link) == 0);
-
- igt_fork(child, 1) {
- /*
- * We are now a low priority child on the *same* CPU as the
- * parent. We will have to wait for our parent to sleep
- * (gem_sync -> i915_wait_request) before we run.
- */
- read(link[0], &go, sizeof(go));
- igt_assert(gem_bo_busy(fd, spin->handle));
- igt_spin_batch_end(spin);
- }
-
- write(link[1], &go, sizeof(go));
- gem_sync(fd, spin->handle);
- igt_waitchildren();
-
- igt_spin_batch_free(fd, spin);
- close(link[1]);
- close(link[0]);
-}
-
-static void bind_to_cpu(int cpu)
-{
- const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
- struct sched_param rt = {.sched_priority = 99 };
- cpu_set_t allowed;
-
- igt_assert(sched_setscheduler(getpid(), SCHED_RR | SCHED_RESET_ON_FORK, &rt) == 0);
-
- CPU_ZERO(&allowed);
- CPU_SET(cpu % ncpus, &allowed);
- igt_assert(sched_setaffinity(getpid(), sizeof(cpu_set_t), &allowed) == 0);
-}
-
-static void enable_missed_irq(int dir)
-{
- igt_sysfs_printf(dir, "i915_ring_test_irq", "0x%x", -1);
-}
-
-static uint32_t disable_missed_irq(int dir)
-{
- uint32_t mask = 0;
-
- igt_sysfs_scanf(dir, "i915_ring_test_irq", "%x", &mask);
- igt_sysfs_set(dir, "i915_ring_test_irq", "0");
-
- return mask;
-}
-
-static uint32_t engine_mask(int dir)
-{
- enable_missed_irq(dir);
- return disable_missed_irq(dir);
-}
-
-igt_simple_main
-{
- const struct intel_execution_engine *e;
- unsigned expect_rings;
- unsigned missed_rings;
- unsigned check_rings;
- int debugfs, device;
-
- igt_skip_on_simulation();
- bind_to_cpu(0);
-
- device = drm_open_driver(DRIVER_INTEL);
- igt_require_gem(device);
- igt_skip_on(gem_has_guc_submission(device)); /* irq forced for guc */
- gem_require_mmap_wc(device);
- debugfs = igt_debugfs_dir(device);
-
- expect_rings = engine_mask(debugfs);
- igt_require(expect_rings);
-
- igt_fork_hang_detector(device);
-
- igt_debug("Clearing rings %x\n", expect_rings);
- intel_detect_and_clear_missed_interrupts(device);
- for (e = intel_execution_engines; e->name; e++) {
- if (expect_rings == -1 && e->exec_id)
- continue;
-
- if (expect_rings != -1 && e->exec_id == 0)
- continue;
-
- if (!gem_has_ring(device, e->exec_id | e->flags))
- continue;
-
- igt_debug("Clearing ring %s [%x]\n",
- e->name, e->exec_id | e->flags);
- trigger_missed_interrupt(device, e->exec_id | e->flags);
- }
- igt_assert_eq(intel_detect_and_clear_missed_interrupts(device), 0);
-
- igt_debug("Testing rings %x\n", expect_rings);
- enable_missed_irq(debugfs);
- for (e = intel_execution_engines; e->name; e++) {
- if (expect_rings == -1 && e->exec_id)
- continue;
-
- if (expect_rings != -1 && e->exec_id == 0)
- continue;
-
- if (!gem_has_ring(device, e->exec_id | e->flags))
- continue;
-
- igt_debug("Executing on ring %s [%x]\n",
- e->name, e->exec_id | e->flags);
- trigger_missed_interrupt(device, e->exec_id | e->flags);
- }
- missed_rings = intel_detect_and_clear_missed_interrupts(device);
-
- check_rings = disable_missed_irq(debugfs);
- igt_assert_eq_u32(check_rings, expect_rings);
-
- if (expect_rings == -1)
- igt_assert_eq_u32(missed_rings, 1);
- else
- igt_assert_eq_u32(missed_rings, expect_rings);
-
- close(debugfs);
- igt_stop_hang_detector();
- close(device);
-}
diff --git a/tests/meson.build b/tests/meson.build
index 9015f809..7d2ff948 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -215,7 +215,6 @@ i915_progs = [
'i915_fb_tiling',
'i915_getparams_basic',
'i915_hangman',
- 'i915_missed_irq',
'i915_module_load',
'i915_pm_backlight',
'i915_pm_lpsp',
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-04-03 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 0:20 José Roberto de Souza [this message]
2019-04-03 0:41 ` [igt-dev] ✓ Fi.CI.BAT: success for tests: Remove i915_missed_irq Patchwork
2019-04-03 7:07 ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2019-04-03 8:40 ` Daniel Vetter
2019-04-03 8:42 ` Chris Wilson
2019-04-03 8:46 ` Daniel Vetter
2019-04-03 8:52 ` Chris Wilson
2019-04-03 15:10 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403002012.24691-1-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox