From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [PATCH igt 1/2] lib: force a reset on an uncooperative i915 device Date: Fri, 9 Feb 2018 11:46:53 +0000 [thread overview] Message-ID: <20180209114654.10564-1-chris@chris-wilson.co.uk> (raw) Try to reset the GPU from within igt_require_gem() if we notice we are starting with a wedged device. If it remains wedged, the test definitely cannot run. We leave a warning in place to highlight the potentially suspect result, which will keep the flip-flops alive in CI! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/ioctl_wrappers.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 10d958726..5d2c82099 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1428,14 +1428,20 @@ void igt_require_gem(int fd) * sequences of batches. */ err = igt_debugfs_dir(fd); - if (err != -1) { - igt_sysfs_printf(err, "i915_next_seqno", "1"); - close(err); + igt_require(err >= 0); + + if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) { + igt_warn("Found wedged device, trying to reset and continue\n"); + igt_sysfs_set(err, "i915_wedged", "-1"); } + igt_sysfs_set(err, "i915_next_seqno", "1"); + + close(err); err = 0; if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) err = -errno; + close(fd); igt_require_f(err == 0, "Unresponsive i915/GEM device\n"); -- 2.16.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [Intel-gfx] [PATCH igt 1/2] lib: force a reset on an uncooperative i915 device Date: Fri, 9 Feb 2018 11:46:53 +0000 [thread overview] Message-ID: <20180209114654.10564-1-chris@chris-wilson.co.uk> (raw) Try to reset the GPU from within igt_require_gem() if we notice we are starting with a wedged device. If it remains wedged, the test definitely cannot run. We leave a warning in place to highlight the potentially suspect result, which will keep the flip-flops alive in CI! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/ioctl_wrappers.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 10d958726..5d2c82099 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1428,14 +1428,20 @@ void igt_require_gem(int fd) * sequences of batches. */ err = igt_debugfs_dir(fd); - if (err != -1) { - igt_sysfs_printf(err, "i915_next_seqno", "1"); - close(err); + igt_require(err >= 0); + + if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) { + igt_warn("Found wedged device, trying to reset and continue\n"); + igt_sysfs_set(err, "i915_wedged", "-1"); } + igt_sysfs_set(err, "i915_next_seqno", "1"); + + close(err); err = 0; if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) err = -errno; + close(fd); igt_require_f(err == 0, "Unresponsive i915/GEM device\n"); -- 2.16.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-02-09 11:46 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-02-09 11:46 Chris Wilson [this message] 2018-02-09 11:46 ` [Intel-gfx] [PATCH igt 1/2] lib: force a reset on an uncooperative i915 device Chris Wilson 2018-02-09 11:46 ` [PATCH igt 2/2] igt/gem_eio: Use slow spinners to inject hangs Chris Wilson 2018-02-09 11:46 ` [igt-dev] " Chris Wilson 2018-02-09 17:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [1/2] lib: force a reset on an uncooperative i915 device Patchwork 2018-02-12 21:28 ` [igt-dev] [PATCH igt 1/2] " Antonio Argenziano 2018-02-12 21:28 ` Antonio Argenziano
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=20180209114654.10564-1-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.