From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915/selftests: Provide stub reset functions
Date: Wed, 20 Mar 2019 10:55:54 +0200 [thread overview]
Message-ID: <878sx92acl.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190319214233.25498-3-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> If a test fails, we quite often mark the device as wedged. Provide the
> stub functions so that we can wedge the mock device, and avoid exploding
> on test failures.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109981
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/selftests/mock_engine.c | 36 ++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.c b/drivers/gpu/drm/i915/selftests/mock_engine.c
> index 639d36eb904a..61744819172b 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_engine.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_engine.c
> @@ -198,6 +198,37 @@ static void mock_submit_request(struct i915_request *request)
> spin_unlock_irqrestore(&engine->hw_lock, flags);
> }
>
> +static void mock_reset_prepare(struct intel_engine_cs *engine)
> +{
> +}
> +
> +static void mock_reset(struct intel_engine_cs *engine, bool stalled)
> +{
> + GEM_BUG_ON(stalled);
> +}
> +
> +static void mock_reset_finish(struct intel_engine_cs *engine)
> +{
> +}
> +
> +static void mock_cancel_requests(struct intel_engine_cs *engine)
> +{
> + struct i915_request *request;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&engine->timeline.lock, flags);
> +
> + /* Mark all submitted requests as skipped. */
> + list_for_each_entry(request, &engine->timeline.requests, sched.link) {
> + if (!i915_request_signaled(request))
> + dma_fence_set_error(&request->fence, -EIO);
> +
> + i915_request_mark_complete(request);
> + }
> +
> + spin_unlock_irqrestore(&engine->timeline.lock, flags);
> +}
> +
> struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
> const char *name,
> int id)
> @@ -223,6 +254,11 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
> engine->base.emit_fini_breadcrumb = mock_emit_breadcrumb;
> engine->base.submit_request = mock_submit_request;
>
> + engine->base.reset.prepare = mock_reset_prepare;
> + engine->base.reset.reset = mock_reset;
> + engine->base.reset.finish = mock_reset_finish;
> + engine->base.cancel_requests = mock_cancel_requests;
> +
> if (i915_timeline_init(i915,
> &engine->base.timeline,
> engine->base.name,
> --
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-20 8:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 21:42 [PATCH 1/3] drm/i915/selftests: add test to verify get/put fw domains Chris Wilson
2019-03-19 21:42 ` [PATCH 2/3] drm/i915/selftests: Calculate maximum ring size for preemption chain Chris Wilson
2019-03-19 21:42 ` [PATCH 3/3] drm/i915/selftests: Provide stub reset functions Chris Wilson
2019-03-20 8:55 ` Mika Kuoppala [this message]
2019-03-19 22:26 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/selftests: add test to verify get/put fw domains Patchwork
2019-03-19 22:27 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-19 22:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-19 22:54 ` [PATCH] " Chris Wilson
2019-03-19 23:11 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915/selftests: add test to verify get/put fw domains (rev2) Patchwork
2019-03-19 23:32 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-19 23:40 ` [PATCH] drm/i915/selftests: add test to verify get/put fw domains Chris Wilson
2019-03-19 23:55 ` Daniele Ceraolo Spurio
2019-03-20 0:17 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915/selftests: add test to verify get/put fw domains (rev3) Patchwork
2019-03-20 0:43 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-20 0:45 ` [PATCH] drm/i915/selftests: add test to verify get/put fw domains Chris Wilson
2019-03-20 8:00 ` [PATCH v2] " Chris Wilson
2019-03-20 1:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with drm/i915/selftests: add test to verify get/put fw domains (rev4) Patchwork
2019-03-20 1:25 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-20 11:00 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2] drm/i915/selftests: add test to verify get/put fw domains (rev5) Patchwork
2019-03-20 11:23 ` ✗ Fi.CI.BAT: failure " 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=878sx92acl.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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: link
Be 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.