[Intel-gfx] [PATCH 05/20] drm/i915: Cancel reset-engine if we couldn't find an active request
Chris Wilson
chris at chris-wilson.co.uk
Mon May 15 21:31:58 UTC 2017
On Mon, May 15, 2017 at 02:20:01PM -0700, Michel Thierry wrote:
> @@ -2827,21 +2830,34 @@ int i915_gem_reset_prepare_engine(struct intel_engine_cs *engine)
>
> if (engine_stalled(engine)) {
> request = i915_gem_find_active_request(engine);
> - if (request && request->fence.error == -EIO)
> - err = -EIO; /* Previous reset failed! */
> +
> + if (request) {
> + if (request->fence.error == -EIO)
> + return ERR_PTR(-EIO); /* Previous reset failed! */
> +
> + if (__i915_gem_request_completed(request,
> + engine->hangcheck.seqno))
This is not the seqno for the request, so this is incorrect. It will
judge that the request was preempted (as hangcheck.seqno must be less
thn request->global_seqno) and so conclude that the request was never
completed.
You just want if (i915_gem_request_completed(request))
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list