Re: [PATCH 6/6] drm/i915: Skip post-reset request emission if the engine is not idle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2018-02-01 10:36:20)
> Since commit 7b6da818d86f ("drm/i915: Restore the kernel context after a
> GPU reset on an idle engine") we submit a request following the engine
> reset. The intent is that we don't submit a request if the engine is
> busy (as it will restart active by itself) but we only checked to see if
> there were remaining requests in flight on the hardware and skipped
> checking to see if there were any ready requests that would be
> immediately submitted on restart (the same time as our new request would
> be). Having convinced the engine to appear idle in the previous patch,
> we can use intel_engine_is_idle() as a better test to only submit a new
> request if there are no pending requests.
> 
> As it happens, this is tripping up igt/drv_selftest/live_hangcheck in CI
> as we overfill the kernel_context ringbuffer trigger an infinite
> recursion from within the reset.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104786
> References: 7b6da818d86f ("drm/i915: Restore the kernel context after a GPU reset on an idle engine")
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Michel Thierry <michel.thierry@xxxxxxxxx>

This would be nice to have fixed in CI.

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 088579324c14..c049496e8757 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3133,7 +3133,7 @@ void i915_gem_reset(struct drm_i915_private *dev_priv)
>                  * an incoherent read by the CS (presumably stale TLB). An
>                  * empty request appears sufficient to paper over the glitch.
>                  */
> -               if (list_empty(&engine->timeline->requests)) {
> +               if (intel_engine_is_idle(engine)) {
>                         struct drm_i915_gem_request *rq;
>  
>                         rq = i915_gem_request_alloc(engine,
> -- 
> 2.15.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux