[Intel-gfx] [PATCH 10/20] drm/i915: fix GEN7_ERR_INT init/reset code

Ben Widawsky ben at bwidawsk.net
Tue Mar 18 20:42:32 CET 2014


On Fri, Mar 07, 2014 at 08:10:26PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> 
> Same as SERR_INT and the other IIR registers: reset on
> preinstall/uninstall and WARN for non-zero values at postinstall. This
> one also doesn't need double-clear.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

This one just like patch 9 is:
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

Like that, I'd prefer to get rid of the IIR assertion

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d295624..02eb493 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2845,6 +2845,9 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
>  
>  	GEN5_IRQ_RESET(DE);
>  
> +	if (IS_GEN7(dev))
> +		I915_WRITE(GEN7_ERR_INT, 0xffffffff);
> +
>  	gen5_gt_irq_preinstall(dev);
>  
>  	ibx_irq_preinstall(dev);
> @@ -3011,7 +3014,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
>  		extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB |
>  			      DE_PIPEA_VBLANK_IVB);
>  
> -		I915_WRITE(GEN7_ERR_INT, I915_READ(GEN7_ERR_INT));
> +		GEN5_ASSERT_IIR_IS_ZERO(GEN7_ERR_INT);
>  	} else {
>  		display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
>  				DE_PLANEA_FLIP_DONE | DE_PLANEB_FLIP_DONE |
> @@ -3295,7 +3298,7 @@ static void ironlake_irq_uninstall(struct drm_device *dev)
>  
>  	GEN5_IRQ_RESET(DE);
>  	if (IS_GEN7(dev))
> -		I915_WRITE(GEN7_ERR_INT, I915_READ(GEN7_ERR_INT));
> +		I915_WRITE(GEN7_ERR_INT, 0xffffffff);
>  
>  	GEN5_IRQ_RESET(GT);
>  	if (INTEL_INFO(dev)->gen >= 6)
> -- 
> 1.8.5.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ben Widawsky, Intel Open Source Technology Center



More information about the Intel-gfx mailing list