if (!dev->irq_enabled)
return false;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (ring->irq_refcount++ == 0) {
if (HAS_PCH_SPLIT(dev))
ironlake_enable_irq(dev_priv,
else
i915_enable_irq(dev_priv, I915_USER_INTERRUPT);
}
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
return true;
}
struct drm_device *dev = ring->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (--ring->irq_refcount == 0) {
if (HAS_PCH_SPLIT(dev))
ironlake_disable_irq(dev_priv,
else
i915_disable_irq(dev_priv, I915_USER_INTERRUPT);
}
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
}
void intel_ring_setup_status_page(struct intel_ring_buffer *ring)
if (!dev->irq_enabled)
return false;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (ring->irq_refcount++ == 0)
ironlake_enable_irq(dev_priv, flag);
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
return true;
}
struct drm_device *dev = ring->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (--ring->irq_refcount == 0)
ironlake_disable_irq(dev_priv, flag);
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
}
static bool
if (!dev->irq_enabled)
return false;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (ring->irq_refcount++ == 0) {
ring->irq_mask &= ~rflag;
I915_WRITE_IMR(ring, ring->irq_mask);
ironlake_enable_irq(dev_priv, gflag);
}
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
return true;
}
struct drm_device *dev = ring->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
- spin_lock(&dev_priv->irq_lock);
+ spin_lock(&ring->irq_lock);
if (--ring->irq_refcount == 0) {
ring->irq_mask |= rflag;
I915_WRITE_IMR(ring, ring->irq_mask);
ironlake_disable_irq(dev_priv, gflag);
}
- spin_unlock(&dev_priv->irq_lock);
+ spin_unlock(&ring->irq_lock);
}
static bool
INIT_LIST_HEAD(&ring->active_list);
INIT_LIST_HEAD(&ring->request_list);
INIT_LIST_HEAD(&ring->gpu_write_list);
+
+ spin_lock_init(&ring->irq_lock);
ring->irq_mask = ~0;
if (I915_NEED_GFX_HWS(dev)) {