Quoting Chris Wilson (2017-06-02 21:16:42)
> I think you want to do something like:
>
> if (intel_has_engine_reset()) {
> for_each_engine_mask() {
> if (test_and_set_bit(I915_RESET_ENGINE + engine->id))
> continue;
>
> if (i915_reset_engine() == 0)
> engine_mask &= ~engine->mask;
>
> clear_bit(I915_RESET_ENGINE + engine->id);
> wake_up_bit(I915_RESET_ENGINE + engine->id);
> }
> }
>
> if (!engine_mask)
> goto out;
>
> if (test_and_set_bit(I915_RESET_BACKOFF))
> goto out;
>
> for_each_engine() {
> wait_on_bit(I915_RESET_ENGINE + engine->id);
> set_bit(I915_RESET_ENGINE);
> }
This needs to be in a loop for that sweet layer of paranoia.
while (test_and_set_bit(I915_RESET_ENGINE + engine->id))
wait_on_bit(I915_RESET_ENGINE + engine->id);
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx