Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t] i915/perf_pmu: Check on the health of the spinner while waiting
Date: Mon,  9 Sep 2019 08:12:26 +0100	[thread overview]
Message-ID: <20190909071226.15401-1-chris@chris-wilson.co.uk> (raw)

And give up if we never even make it to the start.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111592
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tests/perf_pmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index d392a67d4..8a06e5d44 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -191,10 +191,12 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)
 		while (!igt_spin_has_started(spin)) {
 			unsigned long t = igt_nsec_elapsed(&start);
 
+			igt_assert(gem_bo_busy(fd, spin->handle));
 			if ((t - timeout) > 250e6) {
 				timeout = t;
 				igt_warn("Spinner not running after %.2fms\n",
 					 (double)t / 1e6);
+				igt_assert(t < 2e9);
 			}
 		}
 	} else {
@@ -202,6 +204,7 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)
 		usleep(500e3); /* Better than nothing! */
 	}
 
+	igt_assert(gem_bo_busy(fd, spin->handle));
 	return igt_nsec_elapsed(&start);
 }
 
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-09-09  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  7:12 Chris Wilson [this message]
2019-09-09  8:03 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/perf_pmu: Check on the health of the spinner while waiting Patchwork
2019-09-09  9:19 ` [igt-dev] [Intel-gfx] [PATCH i-g-t] " Tvrtko Ursulin
2019-09-09  9:23   ` Chris Wilson
2019-09-09  9:34     ` Tvrtko Ursulin
2019-09-09 11:22 ` [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=20190909071226.15401-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@intel.com \
    /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