All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/10] drm/i915: Skip display irq setup if display irqs aren't flagged as enabled
Date: Mon, 11 Apr 2016 19:31:14 +0300	[thread overview]
Message-ID: <1460392274.12168.44.camel@intel.com> (raw)
In-Reply-To: <1460382992-28728-4-git-send-email-ville.syrjala@linux.intel.com>

On ma, 2016-04-11 at 16:56 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> During runtime PM we'll be reinitializing interrupt support from the
> ground up. However since the display power well will be off at that
> time, well end up with a ton of unclaimed register accesses from the
> display irq setup. Since we turned off the power well already before
> runtime suspend, we've flagged display irqs as disabled during runtime
> PM transitions. So we can just check that flag to see if we should do
> skip display irqs during irq setup.
> 
> During driver load display irqs will be flagged as enabled since we've
> turned on the power well already, however the power well code will have
> skipped the display irq setup since irq support as a whole wasn't yet
> enabled when the power well was enabled. So we'll want to do the display
> irq setup in that case.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94164
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c
> b/drivers/gpu/drm/i915/i915_irq.c
> index a1239fedc086..5c6511a5a74b 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3326,7 +3326,8 @@ static void valleyview_irq_preinstall(struct
> drm_device *dev)
>  	I915_WRITE(DPINVGTT, DPINVGTT_STATUS_MASK);
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_reset(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_reset(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  }
>  
> @@ -3403,7 +3404,8 @@ static void cherryview_irq_preinstall(struct
> drm_device *dev)
>  	I915_WRITE(DPINVGTT, DPINVGTT_STATUS_MASK_CHV);
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_reset(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_reset(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  }
>  
> @@ -3725,7 +3727,8 @@ static int valleyview_irq_postinstall(struct
> drm_device *dev)
>  #endif
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_postinstall(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_postinstall(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  
>  	I915_WRITE(VLV_MASTER_IER, MASTER_INTERRUPT_ENABLE);
> @@ -3831,7 +3834,8 @@ static int cherryview_irq_postinstall(struct
> drm_device *dev)
>  	gen8_gt_irq_postinstall(dev_priv);
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_postinstall(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_postinstall(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  
>  	I915_WRITE(GEN8_MASTER_IRQ, MASTER_INTERRUPT_ENABLE);
> @@ -3864,7 +3868,8 @@ static void valleyview_irq_uninstall(struct
> drm_device *dev)
>  	I915_WRITE(HWSTAM, 0xffffffff);
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_reset(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_reset(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  }
>  
> @@ -3883,7 +3888,8 @@ static void cherryview_irq_uninstall(struct
> drm_device *dev)
>  	GEN5_IRQ_RESET(GEN8_PCU_);
>  
>  	spin_lock_irq(&dev_priv->irq_lock);
> -	vlv_display_irq_reset(dev_priv);
> +	if (dev_priv->display_irqs_enabled)
> +		vlv_display_irq_reset(dev_priv);
>  	spin_unlock_irq(&dev_priv->irq_lock);
>  }
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-11 16:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 13:56 [PATCH 00/10] drm/i915: Fix VLV/CHV unclaimed register errors ville.syrjala
2016-04-11 13:56 ` [PATCH 01/10] drm/i915: Remove "VLV magic" from irq setup ville.syrjala
2016-04-11 15:20   ` Imre Deak
2016-04-11 15:45     ` Ville Syrjälä
2016-04-11 13:56 ` [PATCH 02/10] drm/i915: Fix up vlv/chv display " ville.syrjala
2016-04-11 16:29   ` Imre Deak
2016-04-12  9:05     ` Ville Syrjälä
2016-04-12 10:12       ` Imre Deak
2016-04-12 15:56   ` [PATCH v2 " ville.syrjala
2016-04-11 13:56 ` [PATCH 03/10] drm/i915: Skip display irq setup if display irqs aren't flagged as enabled ville.syrjala
2016-04-11 16:31   ` Imre Deak [this message]
2016-04-11 13:56 ` [PATCH 04/10] drm/i915: Move vlv/chv display irq code to a more logical place ville.syrjala
2016-04-11 16:34   ` Imre Deak
2016-04-12 15:56   ` [PATCH v2 " ville.syrjala
2016-04-11 13:56 ` [PATCH 05/10] drm/i915: Clear display interrupt before enabling when turning on the power well ville.syrjala
2016-04-11 16:36   ` Imre Deak
2016-04-11 13:56 ` [PATCH 06/10] drm/i915: Use GEN5_IRQ_INIT() in vlv_display_irq_postinstall() ville.syrjala
2016-04-11 16:38   ` Imre Deak
2016-04-11 13:56 ` [PATCH 07/10] drm/i915: Warn if irq_mask isn't ~0 during vlv/cvh display irq postinstall ville.syrjala
2016-04-11 16:39   ` Imre Deak
2016-04-11 13:56 ` [PATCH 08/10] drm/i915: Move vlv_init_display_clock_gating() to the display power well ville.syrjala
2016-04-12 10:25   ` Imre Deak
2016-04-12 11:51     ` Ville Syrjälä
2016-04-11 13:56 ` [PATCH 09/10] drm/i915: Move DPINVGTT setup to vlv_display_irq_reset() ville.syrjala
2016-04-12 11:59   ` Imre Deak
2016-04-11 13:56 ` [PATCH 10/10] Revert "drm/i915: Limit the auto arming of mmio debugs on vlv/chv" ville.syrjala
2016-04-12 12:04   ` Imre Deak
2016-04-12 17:08     ` Ville Syrjälä
2016-04-12 19:56       ` Chris Wilson
2016-04-11 14:30 ` ✗ Fi.CI.BAT: failure for drm/i915: Fix VLV/CHV unclaimed register errors Patchwork
2016-04-12 16:13   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460392274.12168.44.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.