* [PATCH] drm/i915/selftests: Verify we can perform resets from atomic context
@ 2018-11-01 10:34 Chris Wilson
2018-11-01 13:35 ` ✗ Fi.CI.BAT: failure for " Patchwork
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2018-11-01 10:34 UTC (permalink / raw)
To: intel-gfx
We currently require that our per-engine reset can be called from any
context, even hardirq, and in the future wish to perform the device
reset without holding struct_mutex (which requires some lockless
shenanigans that demand the lowlevel intel_reset_gpu() be able to be
used in atomic context). Test that we meet the current requirements by
calling i915_reset_engine() from under various atomic contexts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
.../gpu/drm/i915/selftests/intel_hangcheck.c | 88 +++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index 51d0e2bed9e1..6f1392d338d5 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -1473,6 +1473,93 @@ static int igt_handle_error(void *arg)
return err;
}
+static void __preempt_begin(void)
+{
+ preempt_disable();
+}
+
+static void __preempt_end(void)
+{
+ preempt_enable();
+}
+
+static void __softirq_begin(void)
+{
+ local_bh_disable();
+}
+
+static void __softirq_end(void)
+{
+ local_bh_enable();
+}
+
+static void __hardirq_begin(void)
+{
+ local_irq_disable();
+}
+
+static void __hardirq_end(void)
+{
+ local_irq_enable();
+}
+
+static int igt_atomic_reset(void *arg)
+{
+ struct drm_i915_private *i915 = arg;
+ int err = 0;
+
+ /* Check that the resets are usable from atomic context */
+
+ global_reset_lock(i915);
+ mutex_lock(&i915->drm.struct_mutex);
+
+ if (intel_has_reset_engine(i915)) {
+ struct intel_engine_cs *engine;
+ enum intel_engine_id id;
+
+ for_each_engine(engine, i915, id) {
+ static const struct {
+ const char *name;
+ void (*critical_section_begin)(void);
+ void (*critical_section_end)(void);
+ } phases[] = {
+ { "preempt", __preempt_begin, __preempt_end },
+ { "softirq", __softirq_begin, __softirq_end },
+ { "hardirq", __hardirq_begin, __hardirq_end },
+ { }
+ };
+ struct tasklet_struct * const t =
+ &engine->execlists.tasklet;
+ const typeof(*phases) *p;
+
+ for (p = phases; p->name; p++) {
+ GEM_TRACE("i915_reset_engine(%s) under %s\n",
+ engine->name, p->name);
+
+ tasklet_disable_nosync(t);
+ p->critical_section_begin();
+
+ err = i915_reset_engine(engine, NULL);
+
+ p->critical_section_end();
+ tasklet_enable(t);
+
+ if (err) {
+ pr_err("i915_reset_engine(%s) failed under %s\n",
+ engine->name, p->name);
+ goto out;
+ }
+ }
+ }
+ }
+
+out:
+ mutex_unlock(&i915->drm.struct_mutex);
+ global_reset_unlock(i915);
+
+ return err;
+}
+
int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
{
static const struct i915_subtest tests[] = {
@@ -1487,6 +1574,7 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
SUBTEST(igt_reset_evict_ppgtt),
SUBTEST(igt_reset_evict_fence),
SUBTEST(igt_handle_error),
+ SUBTEST(igt_atomic_reset),
};
bool saved_hangcheck;
int err;
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Verify we can perform resets from atomic context
2018-11-01 10:34 [PATCH] drm/i915/selftests: Verify we can perform resets from atomic context Chris Wilson
@ 2018-11-01 13:35 ` Patchwork
2018-11-01 16:09 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2018-11-01 13:35 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Verify we can perform resets from atomic context
URL : https://patchwork.freedesktop.org/series/51868/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5065 -> Patchwork_10686 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10686 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10686, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51868/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10686:
=== IGT changes ===
==== Possible regressions ====
igt@drv_selftest@live_hangcheck:
fi-apl-guc: PASS -> DMESG-WARN
igt@pm_rpm@basic-rte:
fi-icl-u: PASS -> DMESG-WARN
== Known issues ==
Here are the changes found in Patchwork_10686 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@pm_rpm@module-reload:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000)
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
== Participating hosts (48 -> 43) ==
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600
== Build changes ==
* Linux: CI_DRM_5065 -> Patchwork_10686
CI_DRM_5065: 173cb9fef9ea2fbc78c3ded8351989f829e349a8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4704: ace031dcb1e8bf2b32b4b0d54a55eb30e8f41d6f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10686: ddc8d5ee8f795ffa386182ae0200abd21c3f09af @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
ddc8d5ee8f79 drm/i915/selftests: Verify we can perform resets from atomic context
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10686/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for drm/i915/selftests: Verify we can perform resets from atomic context
2018-11-01 13:35 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-11-01 16:09 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2018-11-01 16:09 UTC (permalink / raw)
To: Patchwork; +Cc: intel-gfx
Quoting Patchwork (2018-11-01 13:35:04)
> == Series Details ==
>
> Series: drm/i915/selftests: Verify we can perform resets from atomic context
> URL : https://patchwork.freedesktop.org/series/51868/
> State : failure
>
> == Summary ==
>
> = CI Bug Log - changes from CI_DRM_5065 -> Patchwork_10686 =
>
> == Summary - FAILURE ==
>
> Serious unknown changes coming with Patchwork_10686 absolutely need to be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_10686, please notify your bug team to allow them
> to document this new failure mode, which will reduce false positives in CI.
>
> External URL: https://patchwork.freedesktop.org/api/1.0/series/51868/revisions/1/mbox/
>
> == Possible new issues ==
>
> Here are the unknown changes that may have been introduced in Patchwork_10686:
>
> === IGT changes ===
>
> ==== Possible regressions ====
>
> igt@drv_selftest@live_hangcheck:
> fi-apl-guc: PASS -> DMESG-WARN
Fwiw, guc failing here was expected. guc can't do atomic device reset
either. Infuriating guc.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-01 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 10:34 [PATCH] drm/i915/selftests: Verify we can perform resets from atomic context Chris Wilson
2018-11-01 13:35 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-11-01 16:09 ` Chris Wilson
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.