aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWeinan Li <weinan.z.li@intel.com>2018-03-05 21:15:57 -0500
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2018-03-08 06:50:11 -0500
commit702791f7f20473813e613b7899d2c5ba5dc86b04 (patch)
tree03fcfd2da32235c5daec31314f9bfe94a64b1805 /drivers
parentc822e059185585f79b2007b1d2cafacf4264e610 (diff)
drm/i915: add schedule out notification of preempted but completed request
There is one corner case missing schedule out notification of the preempted request. The preempted request is just completed when preemption happen, then it will be canceled and won't be resubmitted later, GVT-g will lost the schedule out notification. Here add schedule out notification if found the preempted request has been completed. v2: - refine description, add completed check and notification in execlists_cancel_port_requests. (Chris) v3: - use ternary confitional, remove local variable. (Tvrtko) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Weinan Li <weinan.z.li@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1520302557-25079-1-git-send-email-weinan.z.li@intel.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index d763dfb51190..3a69b367e565 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -727,7 +727,12 @@ execlists_cancel_port_requests(struct intel_engine_execlists * const execlists)
727 727
728 GEM_BUG_ON(!execlists->active); 728 GEM_BUG_ON(!execlists->active);
729 intel_engine_context_out(rq->engine); 729 intel_engine_context_out(rq->engine);
730 execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_PREEMPTED); 730
731 execlists_context_status_change(rq,
732 i915_request_completed(rq) ?
733 INTEL_CONTEXT_SCHEDULE_OUT :
734 INTEL_CONTEXT_SCHEDULE_PREEMPTED);
735
731 i915_request_put(rq); 736 i915_request_put(rq);
732 737
733 memset(port, 0, sizeof(*port)); 738 memset(port, 0, sizeof(*port));