Commit 80aac91b authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/execlists: Add a couple more validity checks to assert_pending()



Check the pending request submission is valid: that it at least has a
reference for the submission and that the request is on the active list.

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/20191203152631.3107653-1-chris@chris-wilson.co.uk
parent 42d10511
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1303,6 +1303,9 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
		unsigned long flags;
		bool ok = true;

		GEM_BUG_ON(!kref_read(&rq->fence.refcount));
		GEM_BUG_ON(!i915_request_is_active(rq));

		if (ce == rq->hw_context) {
			GEM_TRACE_ERR("Dup context:%llx in pending[%zd]\n",
				      ce->timeline->fence_context,