All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function
Date: Thu, 18 Apr 2019 15:16:39 +0300	[thread overview]
Message-ID: <20190418121639.GM1747@intel.com> (raw)
In-Reply-To: <977ec8cb3b7ce47013331a0ebcc211116987cb18.camel@intel.com>

On Wed, Apr 17, 2019 at 08:50:58PM -0700, Dhinakaran Pandiyan wrote:
> On Wed, 2019-04-17 at 15:37 -0700, José Roberto de Souza wrote:
> > Just moving it to reduce the tabs and avoid break code lines.
> > No behavior changes intended here.
> > 
> > v2:
> > - Reading misc display IRQ outside of gen8_de_misc_irq_handler() as
> > other irq handlers (Dhinakaran)
> > 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_irq.c | 45 ++++++++++++++++++---------------
> >  1 file changed, 25 insertions(+), 20 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index b92cfd69134b..a1299f10ed49 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -2768,6 +2768,28 @@ static u32 gen8_de_port_aux_mask(struct
> > drm_i915_private *dev_priv)
> >  	return mask;
> >  }
> >  
> > +static void
> > +gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
> > +{
> > +	bool found = false;
> > +
> > +	if (iir & GEN8_DE_MISC_GSE) {
> > +		intel_opregion_asle_intr(dev_priv);
> > +		found = true;
> > +	}
> > +
> > +	if (iir & GEN8_DE_EDP_PSR) {
> > +		u32 psr_iir = I915_READ(EDP_PSR_IIR);
> > +
> > +		intel_psr_irq_handler(dev_priv, psr_iir);
> > +		I915_WRITE(EDP_PSR_IIR, psr_iir);
> 
> Two things unrelated to your refactoring, 
> 
> 1) we can ack the irq right after reading the iir bits. I had noticed this a
> while back but never got to changing it.

See https://patchwork.freedesktop.org/series/59512/

> 
> 2) we don't DRM_ERROR() for unexpected PSR interrupts like how other handlers
> do. Not sure what's the point though, other than getting to know that the
> hardware is broken. 
> 
> Ville, any idea why unexpected interrupts warrant DRM_ERROR().

I suppose people wanted some confirmation that the code and hardware
are doing the right thing.

> 
> 
> This patch is 
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> 
> 
> > +		found = true;
> > +	}
> > +
> > +	if (!found)
> > +		DRM_ERROR("Unexpected DE Misc interrupt\n");
> > +}
> > +
> >  static irqreturn_t
> >  gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
> >  {
> > @@ -2778,29 +2800,12 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv,
> > u32 master_ctl)
> >  	if (master_ctl & GEN8_DE_MISC_IRQ) {
> >  		iir = I915_READ(GEN8_DE_MISC_IIR);
> >  		if (iir) {
> > -			bool found = false;
> > -
> >  			I915_WRITE(GEN8_DE_MISC_IIR, iir);
> >  			ret = IRQ_HANDLED;
> > -
> > -			if (iir & GEN8_DE_MISC_GSE) {
> > -				intel_opregion_asle_intr(dev_priv);
> > -				found = true;
> > -			}
> > -
> > -			if (iir & GEN8_DE_EDP_PSR) {
> > -				u32 psr_iir = I915_READ(EDP_PSR_IIR);
> > -
> > -				intel_psr_irq_handler(dev_priv, psr_iir);
> > -				I915_WRITE(EDP_PSR_IIR, psr_iir);
> > -				found = true;
> > -			}
> > -
> > -			if (!found)
> > -				DRM_ERROR("Unexpected DE Misc interrupt\n");
> > -		}
> > -		else
> > +			gen8_de_misc_irq_handler(dev_priv, iir);
> > +		} else {
> >  			DRM_ERROR("The master control interrupt lied (DE
> > MISC)!\n");
> > +		}
> >  	}
> >  
> >  	if (INTEL_GEN(dev_priv) >= 11 && (master_ctl & GEN11_DE_HPD_IRQ)) {

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-04-18 12:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 22:37 [PATCH v4 1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function José Roberto de Souza
2019-04-17 22:37 ` [PATCH v4 2/4] drm/i915: Add _TRANS2() José Roberto de Souza
2019-04-18  4:09   ` Dhinakaran Pandiyan
2019-04-22 22:05     ` Lucas De Marchi
2019-04-21  4:10   ` Pandiyan, Dhinakaran
2019-04-17 22:37 ` [PATCH v4 3/4] drm/i915: Make PSR registers relative to transcoders José Roberto de Souza
2019-04-19  2:04   ` Dhinakaran Pandiyan
2019-04-17 22:37 ` [PATCH v4 4/4] drm/i915: Add transcoder parameter to PSR registers macros José Roberto de Souza
2019-04-17 22:48 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v4,1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function Patchwork
2019-04-17 22:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-17 23:10 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-18  3:50 ` [PATCH v4 1/4] " Dhinakaran Pandiyan
2019-04-18 12:16   ` Ville Syrjälä [this message]
2019-04-18  5:37 ` ✓ Fi.CI.IGT: success for series starting with [v4,1/4] " Patchwork

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=20190418121639.GM1747@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.