[Intel-gfx] [PATCH 4/4] drm/i915/gt: Clear the execlists timers upon reset

Mika Kuoppala mika.kuoppala at linux.intel.com
Fri Dec 4 13:58:42 UTC 2020


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Across a reset, we stop the engine but not the timers. This leaves a
> window where the timers have inconsistent state with the engine, but
> should only result in a spurious timeout. As we cancel the outstanding
> events, also cancel their timers.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 7f25894e41d5..0c7f1e3dee5c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -2450,6 +2450,11 @@ cancel_port_requests(struct intel_engine_execlists * const execlists)
>  
>  	smp_wmb(); /* complete the seqlock for execlists_active() */
>  	WRITE_ONCE(execlists->active, execlists->inflight);
> +
> +	/* Having cancelled all outstanding process_csb(), stop their timers */
> +	GEM_BUG_ON(execlists->pending[0]);
> +	cancel_timer(&execlists->timer);
> +	cancel_timer(&execlists->preempt);
>  }
>  
>  static inline void
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list