]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/gt: Pull context closure check from request submit to schedule-in
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 31 Dec 2020 09:39:46 +0000 (09:39 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 31 Dec 2020 11:30:03 +0000 (11:30 +0000)
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: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201231093946.11649-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_execlists_submission.c
drivers/gpu/drm/i915/i915_request.c

index 33c5bbaad9fe9e9c3b8f7310f93a180d6c6e66e9..cb2491ec6d3f2c055a3be1d7d9a7a51b700badb9 100644 (file)
@@ -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);
 
index ad3b6a4f424f1dc10a5d438c270b784f12948214..3a9820a9e5215cbaa3d9cda5b767230b0bba4692 100644 (file)
@@ -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);