diff options
author | Chris Wilson <[email protected]> | 2017-09-21 22:09:03 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2017-09-22 12:47:59 +0100 |
commit | a3df2c857c103b1103c9d578d68193a6fbe63c61 (patch) | |
tree | 25553efb2c96cf7087995ecd24773c646b2090b8 | |
parent | de4d2106f88ad7d98bf3adc602885d1d9071b644 (diff) |
drm/i915: Confirm request->global_seqno after spin completion
After we see our target seqno has been completed by the hw, we need to
confirm that it still matches the request (as it may have been preempted
before the spin completes). If the request no longer matches the target
seqno, we need to restart the wait to reacquire that seqno.
Signed-off-by: Chris Wilson <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Michal Winiarski <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: MichaĆ Winiarski <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_request.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index 813a3b546d6e..289fb08acaf5 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -1040,12 +1040,9 @@ bool __i915_spin_request(const struct drm_i915_gem_request *req, irq = atomic_read(&engine->irq_count); timeout_us += local_clock_us(&cpu); do { - if (seqno != i915_gem_request_global_seqno(req)) - break; - if (i915_seqno_passed(intel_engine_get_seqno(req->engine), seqno)) - return true; + return seqno == i915_gem_request_global_seqno(req); /* Seqno are meant to be ordered *before* the interrupt. If * we see an interrupt without a corresponding seqno advance, |