Hi Nitin,

[...]

> -             if (!stop_ring(engine)) {
> +             /*
> +              * Sometimes engine head failed to set to zero even after 
> writing into it.
> +              * Use wait_for_atomic() with 20ms delay to let engine resumes 
> from
> +              * correct RING_HEAD. Experimented different values and 
> determined
> +              * that 20ms works best based on testing.
> +              */
> +             if (wait_for_atomic((!stop_ring(engine) == 0), 20)) {
>                       drm_err(&engine->i915->drm,
>                               "failed to set %s head to zero "
>                               "ctl %08x head %08x tail %08x start %08x\n",

I am wondering if xcs_resume() calling stop_ring() too would
benefit from having this timeout on hand as well. That would
require moving wait_for_atomic((!stop_ring(engine) == 0), 20)
along with your comment to a separate wrapper function.
What do you think?

Best Regards
Krzysztof

Reply via email to