Re: [PATCH 1/3] drm/i915: Warn if we hit the timeout for wait-for-idle

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

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> Hitting the timeout and finding that all engines are actually idle is
> indicative of an interrupt delivery problem. This problem is an issue
> that we need to fix, so make sure we log it and provide the GEM trace.
>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 460f256114f7..71502512ac1f 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3823,6 +3823,12 @@ int i915_gem_wait_for_idle(struct drm_i915_private *i915,
>  			if (timeout < 0)
>  				return timeout;
>  		}
> +		if (GEM_SHOW_DEBUG() && !timeout) {
> +			/* Presume that timeout was non-zero to begin with! */

Now that you mentioned it, with all the current callsites you could
warn or even build_bug to enforce timeout > 0.

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

> +			dev_warn(&i915->drm.pdev->dev,
> +				 "Missed idle-completion interrupt!\n");
> +			GEM_TRACE_DUMP();
> +		}
>  
>  		err = wait_for_engines(i915);
>  		if (err)
> -- 
> 2.18.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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