Commit d3df42b7 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Wait for reset to complete before returning from debugfs/i915_wedged

Provide some serialisation between user operations by waiting for the
reset initiated by setting i915_wedged to complete.

The automatic wait here makes
        echo 1 > i915_wedged; cat i915_error_state
do the right thing, and not risk reporting "No error collected".
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-4-chris@chris-wilson.co.uk
parent 2e8f9d32
...@@ -4135,6 +4135,10 @@ i915_wedged_set(void *data, u64 val) ...@@ -4135,6 +4135,10 @@ i915_wedged_set(void *data, u64 val)
i915_handle_error(dev_priv, val, i915_handle_error(dev_priv, val,
"Manually setting wedged to %llu", val); "Manually setting wedged to %llu", val);
wait_on_bit(&dev_priv->gpu_error.flags,
I915_RESET_HANDOFF,
TASK_UNINTERRUPTIBLE);
return 0; return 0;
} }
......
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