Commit 3970c65c authored by Chris Wilson's avatar Chris Wilson

drm/i915: Skip repeated calls to i915_gem_set_wedged()

If we already wedged, i915_gem_set_wedged() becomes a complicated no-op.

References: https://bugs.freedesktop.org/show_bug.cgi?id=107343Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180723145335.24579-1-chris@chris-wilson.co.uk
parent 07685c82
...@@ -3312,8 +3312,8 @@ void i915_gem_set_wedged(struct drm_i915_private *i915) ...@@ -3312,8 +3312,8 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
intel_engine_dump(engine, &p, "%s\n", engine->name); intel_engine_dump(engine, &p, "%s\n", engine->name);
} }
set_bit(I915_WEDGED, &i915->gpu_error.flags); if (test_and_set_bit(I915_WEDGED, &i915->gpu_error.flags))
smp_mb__after_atomic(); goto out;
/* /*
* First, stop submission to hw, but do not yet complete requests by * First, stop submission to hw, but do not yet complete requests by
...@@ -3372,6 +3372,7 @@ void i915_gem_set_wedged(struct drm_i915_private *i915) ...@@ -3372,6 +3372,7 @@ void i915_gem_set_wedged(struct drm_i915_private *i915)
i915_gem_reset_finish_engine(engine); i915_gem_reset_finish_engine(engine);
} }
out:
GEM_TRACE("end\n"); GEM_TRACE("end\n");
wake_up_all(&i915->gpu_error.reset_queue); wake_up_all(&i915->gpu_error.reset_queue);
......
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