From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/3] drm/i915: Pretend the engine is always idle when mocking
Date: Wed, 12 Apr 2017 00:44:26 +0100 [thread overview]
Message-ID: <20170411234427.14841-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20170411234427.14841-1-chris@chris-wilson.co.uk>
If we have a mock engine and it has no more requests in flight, report
it as idle as there is no hardware to contradict us! Otherwise we
attempt to query the hw that doesn't exist and find that the hw hasn't
set its idle bit and we get upset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index ee87ca7420de..402769d9d840 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1140,6 +1140,9 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
intel_engine_last_submit(engine)))
return false;
+ if (I915_SELFTEST_ONLY(engine->breadcrumbs.mock))
+ return true;
+
/* Interrupt/tasklet pending? */
if (test_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted))
return false;
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-04-11 23:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 23:44 [PATCH 1/3] drm/i915: Add stub mmio read/write routines to mock device Chris Wilson
2017-04-11 23:44 ` Chris Wilson [this message]
2017-04-12 8:49 ` [PATCH 2/3] drm/i915: Pretend the engine is always idle when mocking Joonas Lahtinen
2017-04-11 23:44 ` [PATCH 3/3] drm/i915: Wake device for emitting request during selftest Chris Wilson
2017-04-12 8:50 ` Joonas Lahtinen
2017-04-12 0:01 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Add stub mmio read/write routines to mock device Patchwork
2017-04-12 8:48 ` [PATCH 1/3] " Joonas Lahtinen
2017-04-12 9:21 ` [PATCH v2] " Chris Wilson
2017-04-12 9:36 ` Michal Wajdeczko
2017-04-12 12:28 ` Joonas Lahtinen
2017-04-12 10:30 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Add stub mmio read/write routines to mock device (rev2) Patchwork
2017-04-12 12:40 ` Chris Wilson
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=20170411234427.14841-2-chris@chris-wilson.co.uk \
--to=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.