Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8968a364 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Pretend the engine is always idle when mocking



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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170411234427.14841-2-chris@chris-wilson.co.uk


Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 0757ac8f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;