[Intel-gfx] [PATCH] drm/i915: Warn when execlists changes context without IRQs

Daniel Vetter daniel at ffwll.ch
Mon May 11 09:37:14 PDT 2015


On Mon, May 11, 2015 at 04:03:27PM +0100, Peter Antoine wrote:
> If an batch ends while the IRQs are not turned on the notification can
> go missing and the GPU can hang. So generate a warning in this case.
> 
> Signed-off-by: Peter Antoine <peter.antoine at intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 0fa9209..0413b8f 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -394,6 +394,12 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)
>  
>  	assert_spin_locked(&ring->execlist_lock);
>  
> +	/*
> +	 * If irqs are not active generate a warning as batches that finish
> +	 * without the irqs may get lost and a GPU Hang may occur.
> +	 */
> +	WARN_ON(!intel_irqs_enabled(ring->dev->dev_private));
> +
>  	if (list_empty(&ring->execlist_queue))
>  		return;
>  
> -- 
> 1.9.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list