From: Paulo Zanoni <paulo.r.zanoni at intel.com> Initialize (disable) the FDI RX interrupts when initializing the driver. The code that uses those interrupts already takes care of properly unmasking the needed ones before using them. This patch will make sure we never get undesired FDI RX interrupts, and then when we enable package C8+ states on Haswell all we'll need to do is to check that we still don't have any pending interrupt, since Haswell doesn't use the FDI RX interrupts. Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com> --- drivers/gpu/drm/i915/i915_irq.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 6706d89..33f404e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2475,6 +2475,7 @@ void i915_hangcheck_elapsed(unsigned long data) static void ibx_irq_preinstall(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; + enum pipe pipe; if (HAS_PCH_NOP(dev)) return; @@ -2489,6 +2490,14 @@ static void ibx_irq_preinstall(struct drm_device *dev) */ I915_WRITE(SDEIER, 0xffffffff); POSTING_READ(SDEIER); + + for_each_pipe(pipe) { + I915_WRITE(FDI_RX_IMR(pipe), 0xffffffff); + POSTING_READ(FDI_RX_IMR(pipe)); + /* Only 1 PCH transcoder. */ + if (HAS_PCH_LPT(dev)) + break; + } } /* drm_dma.h hooks @@ -2621,6 +2630,7 @@ static void ibx_irq_postinstall(struct drm_device *dev) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; u32 mask; + enum pipe pipe; if (HAS_PCH_NOP(dev)) return; @@ -2636,6 +2646,14 @@ static void ibx_irq_postinstall(struct drm_device *dev) I915_WRITE(SDEIIR, I915_READ(SDEIIR)); I915_WRITE(SDEIMR, ~mask); + + for_each_pipe(pipe) { + I915_WRITE(FDI_RX_IMR(pipe), 0xffffffff); + I915_WRITE(FDI_RX_IIR(pipe), I915_READ(FDI_RX_IIR(pipe))); + /* Only 1 PCH transcoder. */ + if (HAS_PCH_LPT(dev)) + break; + } } static int ironlake_irq_postinstall(struct drm_device *dev) @@ -2831,6 +2849,7 @@ static void valleyview_irq_uninstall(struct drm_device *dev) static void ironlake_irq_uninstall(struct drm_device *dev) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + enum pipe pipe; if (!dev_priv) return; @@ -2863,6 +2882,14 @@ static void ironlake_irq_uninstall(struct drm_device *dev) I915_WRITE(SDEIIR, I915_READ(SDEIIR)); if (HAS_PCH_CPT(dev) || HAS_PCH_LPT(dev)) I915_WRITE(SERR_INT, I915_READ(SERR_INT)); + + for_each_pipe(pipe) { + I915_WRITE(FDI_RX_IMR(pipe), 0xffffffff); + I915_WRITE(FDI_RX_IIR(pipe), I915_READ(FDI_RX_IIR(pipe))); + /* Only 1 PCH transcoder. */ + if (HAS_PCH_LPT(dev)) + break; + } } static void i8xx_irq_preinstall(struct drm_device * dev) -- 1.8.1.2