Skip to content

Commit

Permalink
drm/i915/execlists: Notify context-out for lost requests
Browse files Browse the repository at this point in the history
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: 221ab97 ("drm/i915/execlists: Unwind incomplete requests on resets")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Zhenyu Wang" <zhenyuw@linux.intel.com>
Cc: "Wang, Zhi A" <zhi.a.wang@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170926101720.9479-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
  • Loading branch information
Chris Wilson committed Sep 27, 2017
1 parent 4e9767b commit 7e44fc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 7e44fc2

Please sign in to comment.