summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-06-10 23:10:33 -0700
committerEric Anholt <eric@anholt.net>2008-06-10 23:11:09 -0700
commit62a3be962f1915d17813ecbfc9544232908b44e4 (patch)
tree2b34a22045d8eadabe0b0186b2fa784b3a361eb4
parent2150da5d1a57d25d0f4bc39bb6c883d410f586d1 (diff)
[intel] Fix BUG_ON trigger in irq masking if you did on/off with irqs disabled.
-rw-r--r--shared-core/i915_irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 077af1ab..0125f8b3 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -560,7 +560,7 @@ void i915_user_irq_on(drm_i915_private_t *dev_priv)
void i915_user_irq_off(drm_i915_private_t *dev_priv)
{
DRM_SPINLOCK(&dev_priv->user_irq_lock);
- BUG_ON(dev_priv->user_irq_refcount <= 0);
+ BUG_ON(dev_priv->irq_enabled && dev_priv->user_irq_refcount <= 0);
if (dev_priv->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
dev_priv->irq_mask_reg |= I915_USER_INTERRUPT;
I915_WRITE(I915REG_INT_MASK_R, dev_priv->irq_mask_reg);