[Intel-gfx] [PATCH] drm/i915: vlv: fix display IRQ enable/disable

Daniel Vetter daniel at ffwll.ch
Mon Sep 15 11:56:09 CEST 2014


On Mon, Sep 08, 2014 at 03:21:09PM +0300, Imre Deak wrote:
> We want to enable/disable display IRQs only if global i915 IRQs are
> enabled. To check the latter it's not enough to consult the DRM
> dev->irq_enabled flag, since runtime PM can disable/enable IRQs
> and it won't adjust this flag only the i915 specific
> dev_priv->pm._irqs_disabled flag. Fix this by using the proper
> intel_irqs_enabled() helper instead.
> 
> Fortunately this didn't cause an actual problem since even if we enabled
> display IRQs too early (before enabling global i915 IRQs) the
> VLV_MASTER_IER would still be clear masking all IRQs.
> 
> This issue was caught by
> 
> commit 920dd15a2b2fc60d054646a8a1ffd6aeb6090e05
> Author: Daniel Vetter <daniel.vetter at ffwll.ch>
> Date:   Wed Aug 27 10:43:37 2014 +0200
> 
>     drm/i915: WARN if interrupts aren't on in en/disable_pipestat
> 
> Signed-off-by: Imre Deak <imre.deak at intel.com>

Please cc relevant people next time around, for this Jesse (since this all
goes down to his soix enabling). Thanks for the patch, yours here is
better than the one I've just posted in response to prts.

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

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d6cf1b7..14f52ac 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3723,7 +3723,7 @@ void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv)
>  
>  	dev_priv->display_irqs_enabled = true;
>  
> -	if (dev_priv->dev->irq_enabled)
> +	if (intel_irqs_enabled(dev_priv))
>  		valleyview_display_irqs_install(dev_priv);
>  }
>  
> @@ -3736,7 +3736,7 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv)
>  
>  	dev_priv->display_irqs_enabled = false;
>  
> -	if (dev_priv->dev->irq_enabled)
> +	if (intel_irqs_enabled(dev_priv))
>  		valleyview_display_irqs_uninstall(dev_priv);
>  }
>  
> -- 
> 1.8.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list