Commit 107f27a5 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Open-code i915_gpu_idle() for handling seqno wrapping

The complication is that during seqno wrapping we must be extremely
careful not to write to any ring as that will require a new seqno, and
so would recurse back into the seqno wrap handler. So we cannot call
i915_gpu_idle() as that does additional work beyond simply retiring the
current set of requests, and instead must do the minimal work ourselves
during seqno wrapping.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f72b3435
...@@ -1938,11 +1938,15 @@ i915_gem_handle_seqno_wrap(struct drm_device *dev) ...@@ -1938,11 +1938,15 @@ i915_gem_handle_seqno_wrap(struct drm_device *dev)
if (ret == 0) if (ret == 0)
return ret; return ret;
ret = i915_gpu_idle(dev); /* Carefully retire all requests without writing to the rings */
if (ret) for_each_ring(ring, dev_priv, i) {
return ret; ret = intel_ring_idle(ring);
if (ret)
return ret;
}
i915_gem_retire_requests(dev); i915_gem_retire_requests(dev);
/* Finally reset hw state */
for_each_ring(ring, dev_priv, i) { for_each_ring(ring, dev_priv, i) {
ret = intel_ring_handle_seqno_wrap(ring); ret = intel_ring_handle_seqno_wrap(ring);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment