[Intel-gfx] [PATCH 3/7] drm/i915/selftests: Relax timeout for error-interrupt reset processing
Mika Kuoppala
mika.kuoppala at linux.intel.com
Tue Feb 11 15:23:24 UTC 2020
Chris Wilson <chris at chris-wilson.co.uk> writes:
> We can not require that the system process a tasklet in reasonable time
> (thanks be to ksoftirqd), but we can insist that having waited
> sufficiently for the error interrupt to have been raised and having
> kicked the tasklet, the reset has begun and the request will be marked
> as in error (if not already completed).
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/selftest_lrc.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> index 8b7383f6d9b3..ccd4cd2c202d 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> @@ -503,14 +503,21 @@ static int live_error_interrupt(void *arg)
> }
>
> for (i = 0; i < ARRAY_SIZE(client); i++) {
> - if (i915_request_wait(client[i], 0, HZ / 5) < 0) {
> - pr_err("%s: %s request still executing!\n",
> - engine->name,
> - error_repr(p->error[i]));
> + if (i915_request_wait(client[i], 0, HZ / 5) < 0)
> + pr_debug("%s: %s request incomplete!\n",
> + engine->name,
> + error_repr(p->error[i]));
> +
> + if (!i915_request_started(client[i])) {
> + pr_debug("%s: %s request not stated!\n",
> + engine->name,
> + error_repr(p->error[i]));
> err = -ETIME;
> goto out;
> }
>
> + /* Kick the tasklet to process the error */
> + intel_engine_flush_submission(engine);
This pattern of usage in selftests makes me want to add mb(); to
intel_engine_flush_submission(), as it does not seem to do it
implicitly.
We want to flush submission and observe the effects, thus
it seems like a good place.
Not in a scope of this patch tho,
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
-Mika
> if (client[i]->fence.error != p->error[i]) {
> pr_err("%s: %s request completed with wrong error code: %d\n",
> engine->name,
> --
> 2.25.0
More information about the Intel-gfx
mailing list