[Intel-gfx] [RFC 14/15] i915: Enable LPE_PIPEA_Interrupt.

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Sat Mar 5 02:50:51 UTC 2016


From: Toyo Abe <toyo.abe at gmail.com>

To enable interrupt, IER, IIR, and IMR must be configured appropriately.
IER setting for hdmi_audio was missing.
This fixes the following warning in dmesg.

[  302.369965] had: Driver detected 2 missed buffer done interrupt(s)!!!!

Signed-off-by: Toyo Abe <toyo.abe at gmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 556fa80..dcc1564 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2857,11 +2857,14 @@ int i915_enable_hdmi_audio_int(struct drm_device *dev)
 	int pipe = 1;
 
 	spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
+	i915_enable_lpe_pipestat(dev_priv, pipe);
+
 	imr = I915_READ(VLV_IMR);
 	/* Audio is on Stream A */
 	imr &= ~I915_LPE_PIPE_A_INTERRUPT;
 	I915_WRITE(VLV_IMR, imr);
-	i915_enable_lpe_pipestat(dev_priv, pipe);
+	I915_WRITE(VLV_IER, ~imr);
+	POSTING_READ(VLV_IER);
 	spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
 
 	return 0;
@@ -2878,7 +2881,10 @@ int i915_disable_hdmi_audio_int(struct drm_device *dev)
 	spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
 	imr = I915_READ(VLV_IMR);
 	imr |= I915_LPE_PIPE_A_INTERRUPT;
+	I915_WRITE(VLV_IER, ~imr);
 	I915_WRITE(VLV_IMR, imr);
+	POSTING_READ(VLV_IMR);
+
 	i915_disable_lpe_pipestat(dev_priv, pipe);
 	spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
 
-- 
1.9.1



More information about the Intel-gfx mailing list