Commit 9c080b0f authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/gt: Pull context closure check from request submit to schedule-in



We only need to evaluate the current status of the context when it is
scheduled in, we will force a reschedule when the context is closed
propagating the change to inflight contexts.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201231093946.11649-1-chris@chris-wilson.co.uk
parent 7904e081
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -522,6 +522,10 @@ __execlists_schedule_in(struct i915_request *rq)

	intel_context_get(ce);

	if (unlikely(intel_context_is_closed(ce) &&
		     !intel_engine_has_heartbeat(engine)))
		intel_context_set_banned(ce);

	if (unlikely(intel_context_is_banned(ce)))
		reset_active(rq, engine);

+0 −4
Original line number Diff line number Diff line
@@ -546,10 +546,6 @@ bool __i915_request_submit(struct i915_request *request)
	if (i915_request_completed(request))
		goto xfer;

	if (unlikely(intel_context_is_closed(request->context) &&
		     !intel_engine_has_heartbeat(engine)))
		intel_context_set_banned(request->context);

	if (unlikely(intel_context_is_banned(request->context)))
		i915_request_set_error_once(request, -EIO);