Commit 2da21daa authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm/i915/gt: Always flush the submission queue on checking for idle



We check for idle during debug prints and other debugging actions.
Simplify the flow by not touching execlists state.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210205174358.28465-1-chris@chris-wilson.co.uk


Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 985458d7
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1254,15 +1254,9 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
		return true;

	/* Waiting to drain ELSP? */
	if (execlists_active(&engine->execlists)) {
	synchronize_hardirq(to_pci_dev(engine->i915->drm.dev)->irq);

	intel_engine_flush_submission(engine);

		if (execlists_active(&engine->execlists))
			return false;
	}

	/* ELSP is empty, but there are ready requests? E.g. after reset */
	if (!RB_EMPTY_ROOT(&engine->execlists.queue.rb_root))
		return false;