diff options
author | Chris Wilson <[email protected]> | 2017-09-26 11:17:19 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2017-09-27 10:48:59 +0100 |
commit | 7e44fc289d54aa3f1f37d6c9e5157f79011c6476 (patch) | |
tree | fdbc976376d5272efc1ec48ab4019307536d18c9 | |
parent | 4e9767bc28e93139442847f023ff2fc0c2a21d34 (diff) |
drm/i915/execlists: Notify context-out for lost requests
When cancelling requests, also send the notification to any listeners
(gvt) that the request is no longer scheduled on hw. They may require to
keep the in/out exactly balanced, and so the reuse after the reset may
confuse the listener.
Fixes: 221ab9719bf3 ("drm/i915/execlists: Unwind incomplete requests on resets")
Signed-off-by: Chris Wilson <[email protected]>
Cc: "Zhenyu Wang" <[email protected]>
Cc: "Wang, Zhi A" <[email protected]>
Cc: MichaĆ Winiarski <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Mika Kuoppala <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 2c07f3c08bd3..61cac26a8b05 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -578,7 +578,11 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists) unsigned int num_ports = ARRAY_SIZE(execlists->port); while (num_ports-- && port_isset(port)) { - i915_gem_request_put(port_request(port)); + struct drm_i915_gem_request *rq = port_request(port); + + execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT); + i915_gem_request_put(rq); + memset(port, 0, sizeof(*port)); port++; } |