From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH 03/11] drm/i915: Stop pretending to mask/unmask LPE audio interrupts
Date: Tue, 25 Apr 2017 19:27:32 -0500 [thread overview]
Message-ID: <dc9c020f-4305-a955-f1ca-88302ee5e80d@linux.intel.com> (raw)
In-Reply-To: <20170425202730.1384-4-ville.syrjala@linux.intel.com>
On 4/25/17 3:27 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> vlv_display_irq_postinstall() enables the LPE audio interrupts
> regardless of whether the LPE audio irq chip has masked/unmasked
> them. Also the irqchip masking/unmasking doesn't consider the state
> of the display power well or the device, and hence just leads to
> dmesg spew when it tries to access the hardware while it's powered
> down.
>
> If the current way works, then we don't need to do anything in the
> mask/unmask hooks. If it doesn't work, well, then we'd need to properly
> track whether the irqchip has masked/unmasked the interrupts when
> we enable display interrupts. And the mask/unmask hooks would need
> to check whether display interrupts are even enabled before frobbing
> with he registers.
>
> So let's just assume the current way works and neuter the mask/unmask
> hooks. Also clean up vlv_display_irq_postinstall() a bit and stop
> it from trying to unmask/enable the LPE C interrupt on VLV since it
> doesn't exist.
No objections, I assumed that we did want to update VLV_IMR and VLV_IIR
in the mask/unmask, that was the initial recommendation IIRC
There was also a comment where we removed all tests in
vlv_display_irq_postinstall:
>> + if (IS_LPE_AUDIO_ENABLED(dev_priv))
>> + if (IS_LPE_AUDIO_IRQ_VALID(dev_priv))
>
>I think both of these checks can be removed. We won't unmask the
>interrupts unless lpe is enabled, so the IIR bits will never be set in
>that case.
>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 15 ++++++--------
> drivers/gpu/drm/i915/intel_lpe_audio.c | 36 ----------------------------------
> 2 files changed, 6 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index fd97fe00cd0d..190f6aa5d15e 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2953,7 +2953,6 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv)
> u32 pipestat_mask;
> u32 enable_mask;
> enum pipe pipe;
> - u32 val;
>
> pipestat_mask = PLANE_FLIP_DONE_INT_STATUS_VLV |
> PIPE_CRC_DONE_INTERRUPT_STATUS;
> @@ -2964,18 +2963,16 @@ static void vlv_display_irq_postinstall(struct drm_i915_private *dev_priv)
>
> enable_mask = I915_DISPLAY_PORT_INTERRUPT |
> I915_DISPLAY_PIPE_A_EVENT_INTERRUPT |
> - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT;
> + I915_DISPLAY_PIPE_B_EVENT_INTERRUPT |
> + I915_LPE_PIPE_A_INTERRUPT |
> + I915_LPE_PIPE_B_INTERRUPT;
> +
> if (IS_CHERRYVIEW(dev_priv))
> - enable_mask |= I915_DISPLAY_PIPE_C_EVENT_INTERRUPT;
> + enable_mask |= I915_DISPLAY_PIPE_C_EVENT_INTERRUPT |
> + I915_LPE_PIPE_C_INTERRUPT;
>
> WARN_ON(dev_priv->irq_mask != ~0);
>
> - val = (I915_LPE_PIPE_A_INTERRUPT |
> - I915_LPE_PIPE_B_INTERRUPT |
> - I915_LPE_PIPE_C_INTERRUPT);
> -
> - enable_mask |= val;
> -
> dev_priv->irq_mask = ~enable_mask;
>
> GEN5_IRQ_INIT(VLV_, dev_priv->irq_mask, enable_mask);
> diff --git a/drivers/gpu/drm/i915/intel_lpe_audio.c b/drivers/gpu/drm/i915/intel_lpe_audio.c
> index 668f00480d97..292fedf30b00 100644
> --- a/drivers/gpu/drm/i915/intel_lpe_audio.c
> +++ b/drivers/gpu/drm/i915/intel_lpe_audio.c
> @@ -149,44 +149,10 @@ static void lpe_audio_platdev_destroy(struct drm_i915_private *dev_priv)
>
> static void lpe_audio_irq_unmask(struct irq_data *d)
> {
> - struct drm_i915_private *dev_priv = d->chip_data;
> - unsigned long irqflags;
> - u32 val = (I915_LPE_PIPE_A_INTERRUPT |
> - I915_LPE_PIPE_B_INTERRUPT);
> -
> - if (IS_CHERRYVIEW(dev_priv))
> - val |= I915_LPE_PIPE_C_INTERRUPT;
> -
> - spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
> -
> - dev_priv->irq_mask &= ~val;
> - I915_WRITE(VLV_IIR, val);
> - I915_WRITE(VLV_IIR, val);
> - I915_WRITE(VLV_IMR, dev_priv->irq_mask);
> - POSTING_READ(VLV_IMR);
> -
> - spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
> }
>
> static void lpe_audio_irq_mask(struct irq_data *d)
> {
> - struct drm_i915_private *dev_priv = d->chip_data;
> - unsigned long irqflags;
> - u32 val = (I915_LPE_PIPE_A_INTERRUPT |
> - I915_LPE_PIPE_B_INTERRUPT);
> -
> - if (IS_CHERRYVIEW(dev_priv))
> - val |= I915_LPE_PIPE_C_INTERRUPT;
> -
> - spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
> -
> - dev_priv->irq_mask |= val;
> - I915_WRITE(VLV_IMR, dev_priv->irq_mask);
> - I915_WRITE(VLV_IIR, val);
> - I915_WRITE(VLV_IIR, val);
> - POSTING_READ(VLV_IIR);
> -
> - spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
> }
>
> static struct irq_chip lpe_audio_irqchip = {
> @@ -330,8 +296,6 @@ void intel_lpe_audio_teardown(struct drm_i915_private *dev_priv)
>
> desc = irq_to_desc(dev_priv->lpe_audio.irq);
>
> - lpe_audio_irq_mask(&desc->irq_data);
> -
> lpe_audio_platdev_destroy(dev_priv);
>
> irq_free_desc(dev_priv->lpe_audio.irq);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-04-26 2:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 20:27 [PATCH 00/11] drm/i915: LPE audio runtime PM and multipipe ville.syrjala
2017-04-25 20:27 ` [PATCH 01/11] drm/i915: Fix runtime PM for LPE audio ville.syrjala
2017-04-25 20:27 ` [PATCH 02/11] ALSA: x86: Clear the pdata.notify_lpe_audio pointer before teardown ville.syrjala
2017-04-25 20:27 ` [PATCH 03/11] drm/i915: Stop pretending to mask/unmask LPE audio interrupts ville.syrjala
2017-04-26 0:27 ` Pierre-Louis Bossart [this message]
2017-04-26 13:27 ` Ville Syrjälä
2017-04-25 20:27 ` [PATCH 04/11] drm/i915: Remove the unsued pending_notify from LPE platform data ville.syrjala
2017-04-25 20:27 ` [PATCH 05/11] drm/i915: Replace tmds_clock_speed and link_rate with just ls_clock ville.syrjala
2017-04-26 1:09 ` [alsa-devel] " Pierre-Louis Bossart
2017-04-26 13:28 ` Ville Syrjälä
2017-04-25 20:27 ` [PATCH 06/11] drm/i915: Remove hdmi_connected from LPE audio pdata ville.syrjala
2017-04-25 20:27 ` [PATCH 07/11] drm/i915: Reorganize intel_lpe_audio_notify() arguments ville.syrjala
2017-04-25 20:27 ` [PATCH 08/11] drm/i915: Clean up the LPE audio platform data ville.syrjala
2017-04-25 20:27 ` [PATCH 09/11] ALSA: x86: Prepare LPE audio ctls for multiple PCMs ville.syrjala
2017-04-25 20:27 ` [PATCH 10/11] ALSA: x86: Split snd_intelhad into card and PCM specific structures ville.syrjala
2017-04-25 20:27 ` [PATCH 11/11] ALSA: x86: Register multiple PCM devices for the LPE audio card ville.syrjala
2017-04-26 1:58 ` Pierre-Louis Bossart
2017-04-26 7:04 ` [alsa-devel] " Takashi Iwai
2017-04-26 7:19 ` Takashi Iwai
2017-04-26 13:49 ` Ville Syrjälä
2017-04-26 14:04 ` Takashi Iwai
2017-04-25 20:46 ` ✓ Fi.CI.BAT: success for drm/i915: LPE audio runtime PM and multipipe Patchwork
2017-04-26 7:29 ` [PATCH 00/11] " Takashi Iwai
2017-04-26 13:38 ` Ville Syrjälä
2017-04-26 13:47 ` Takashi Iwai
2017-04-26 13:56 ` Ville Syrjälä
2017-04-26 19:59 ` Ville Syrjälä
-- strict thread matches above, loose matches on Subject: below --
2017-04-27 16:02 [PATCH v2 00/11] drm/i915: LPE audio runtime PM and multipipe (v2) ville.syrjala
2017-04-27 16:02 ` [PATCH 03/11] drm/i915: Stop pretending to mask/unmask LPE audio interrupts ville.syrjala
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=dc9c020f-4305-a955-f1ca-88302ee5e80d@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tiwai@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox