* [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection
@ 2019-03-20 9:34 Chris Wilson
2019-03-20 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-21 9:32 ` [PATCH] " Joonas Lahtinen
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2019-03-20 9:34 UTC (permalink / raw)
To: intel-gfx
Use the igt_live_test framework for detecting whether an unwanted hang
occurred during test execution, and report failure if it does.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/selftests/intel_lrc.c | 38 ++++++++++++++++++++--
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
index 42068ed5eec0..59bc39275589 100644
--- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
@@ -10,6 +10,7 @@
#include "../i915_selftest.h"
#include "igt_flush_test.h"
+#include "igt_live_test.h"
#include "igt_spinner.h"
#include "i915_random.h"
@@ -113,11 +114,17 @@ static int live_preempt(void *arg)
I915_USER_PRIORITY(I915_CONTEXT_MIN_USER_PRIORITY);
for_each_engine(engine, i915, id) {
+ struct igt_live_test t;
struct i915_request *rq;
if (!intel_engine_has_preemption(engine))
continue;
+ if (igt_live_test_begin(&t, i915, __func__, engine->name)) {
+ err = -EIO;
+ goto err_ctx_lo;
+ }
+
rq = igt_spinner_create_request(&spin_lo, ctx_lo, engine,
MI_ARB_CHECK);
if (IS_ERR(rq)) {
@@ -153,7 +160,8 @@ static int live_preempt(void *arg)
igt_spinner_end(&spin_hi);
igt_spinner_end(&spin_lo);
- if (igt_flush_test(i915, I915_WAIT_LOCKED)) {
+
+ if (igt_live_test_end(&t)) {
err = -EIO;
goto err_ctx_lo;
}
@@ -207,11 +215,17 @@ static int live_late_preempt(void *arg)
goto err_ctx_hi;
for_each_engine(engine, i915, id) {
+ struct igt_live_test t;
struct i915_request *rq;
if (!intel_engine_has_preemption(engine))
continue;
+ if (igt_live_test_begin(&t, i915, __func__, engine->name)) {
+ err = -EIO;
+ goto err_ctx_lo;
+ }
+
rq = igt_spinner_create_request(&spin_lo, ctx_lo, engine,
MI_ARB_CHECK);
if (IS_ERR(rq)) {
@@ -250,7 +264,8 @@ static int live_late_preempt(void *arg)
igt_spinner_end(&spin_hi);
igt_spinner_end(&spin_lo);
- if (igt_flush_test(i915, I915_WAIT_LOCKED)) {
+
+ if (igt_live_test_end(&t)) {
err = -EIO;
goto err_ctx_lo;
}
@@ -615,6 +630,7 @@ static int live_chain_preempt(void *arg)
struct i915_sched_attr attr = {
.priority = I915_USER_PRIORITY(I915_PRIORITY_MAX),
};
+ struct igt_live_test t;
struct i915_request *rq;
int ring_size, count, i;
@@ -641,6 +657,11 @@ static int live_chain_preempt(void *arg)
goto err_wedged;
}
+ if (igt_live_test_begin(&t, i915, __func__, engine->name)) {
+ err = -EIO;
+ goto err_wedged;
+ }
+
for_each_prime_number_from(count, 1, ring_size) {
rq = igt_spinner_create_request(&hi.spin,
hi.ctx, engine,
@@ -699,6 +720,11 @@ static int live_chain_preempt(void *arg)
goto err_wedged;
}
}
+
+ if (igt_live_test_end(&t)) {
+ err = -EIO;
+ goto err_wedged;
+ }
}
err = 0;
@@ -1022,6 +1048,7 @@ static int live_preempt_smoke(void *arg)
};
const unsigned int phase[] = { 0, BATCH };
intel_wakeref_t wakeref;
+ struct igt_live_test t;
int err = -ENOMEM;
u32 *cs;
int n;
@@ -1058,6 +1085,11 @@ static int live_preempt_smoke(void *arg)
if (err)
goto err_batch;
+ if (igt_live_test_begin(&t, smoke.i915, __func__, "all")) {
+ err = -EIO;
+ goto err_batch;
+ }
+
for (n = 0; n < smoke.ncontext; n++) {
smoke.contexts[n] = kernel_context(smoke.i915);
if (!smoke.contexts[n])
@@ -1075,7 +1107,7 @@ static int live_preempt_smoke(void *arg)
}
err_ctx:
- if (igt_flush_test(smoke.i915, I915_WAIT_LOCKED))
+ if (igt_live_test_end(&t))
err = -EIO;
for (n = 0; n < smoke.ncontext; n++) {
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Mark up preemption tests for hang detection
2019-03-20 9:34 [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection Chris Wilson
@ 2019-03-20 13:27 ` Patchwork
2019-03-21 9:32 ` [PATCH] " Joonas Lahtinen
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2019-03-20 13:27 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Mark up preemption tests for hang detection
URL : https://patchwork.freedesktop.org/series/58236/
State : failure
== Summary ==
Applying: drm/i915/selftests: Mark up preemption tests for hang detection
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/selftests/intel_lrc.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/selftests/intel_lrc.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/selftests/intel_lrc.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 drm/i915/selftests: Mark up preemption tests for hang detection
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection
2019-03-20 9:34 [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection Chris Wilson
2019-03-20 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2019-03-21 9:32 ` Joonas Lahtinen
2019-03-21 10:06 ` Chris Wilson
1 sibling, 1 reply; 4+ messages in thread
From: Joonas Lahtinen @ 2019-03-21 9:32 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Quoting Chris Wilson (2019-03-20 11:34:56)
> Use the igt_live_test framework for detecting whether an unwanted hang
> occurred during test execution, and report failure if it does.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection
2019-03-21 9:32 ` [PATCH] " Joonas Lahtinen
@ 2019-03-21 10:06 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2019-03-21 10:06 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
Quoting Joonas Lahtinen (2019-03-21 09:32:46)
> Quoting Chris Wilson (2019-03-20 11:34:56)
> > Use the igt_live_test framework for detecting whether an unwanted hang
> > occurred during test execution, and report failure if it does.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Can you please look at its companion
https://patchwork.freedesktop.org/patch/293319/?series=58323&rev=1 as
that fixes the GPU hangs this is detecting (in BAT) :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-21 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 9:34 [PATCH] drm/i915/selftests: Mark up preemption tests for hang detection Chris Wilson
2019-03-20 13:27 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-03-21 9:32 ` [PATCH] " Joonas Lahtinen
2019-03-21 10:06 ` 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.