[071/119] drm/i915: Fix IRQ stall issue on Ironlake

Greg KH
2009-12-07T00:13:38Z

[-- Attachment #1: drm-i915-fix-irq-stall-issue-on-ironlake.patch --]
[-- Type: text/plain, Size: 1407 bytes --]

2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------
From: Nanhai Zou <nanhai.zou@intel.com>

commit 2d109a845dd3074885db726892c629ab73dd0ed8 upstream.

The master irq control in DE must be disabled before irq handling,
and enable after the process. This fixes the irq stall issue on
Ironlake.

Signed-off-by: Nanhai Zou <nanhai.zou@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/gpu/drm/i915/i915_irq.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -253,10 +253,15 @@ irqreturn_t igdng_irq_handler(struct drm
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
int ret = IRQ_NONE;
- u32 de_iir, gt_iir;
+ u32 de_iir, gt_iir, de_ier;
u32 new_de_iir, new_gt_iir;
struct drm_i915_master_private *master_priv;

+ /* disable master interrupt before clearing iir */
+ de_ier = I915_READ(DEIER);
+ I915_WRITE(DEIER, de_ier & ~DE_MASTER_IRQ_CONTROL);
+ (void)I915_READ(DEIER);
+
de_iir = I915_READ(DEIIR);
gt_iir = I915_READ(GTIIR);

@@ -287,6 +292,9 @@ irqreturn_t igdng_irq_handler(struct drm
gt_iir = new_gt_iir;
}

+ I915_WRITE(DEIER, de_ier);
+ (void)I915_READ(DEIER);
+
return ret;
}