[Intel-gfx] [PATCH] drm/i915: Cancel reset-engine if we couldn't find an active request
Chris Wilson
chris at chris-wilson.co.uk
Wed May 17 20:52:02 UTC 2017
On Wed, May 17, 2017 at 01:41:34PM -0700, Michel Thierry wrote:
> @@ -2827,21 +2829,35 @@ 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))
> + return NULL; /* request completed, skip it */
This check is pointless here. We are just a few cycles since it was
known to be true. Both paths should be doing it just before the actual
reset for symmetry.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list