diff options
Diffstat (limited to 'shared-core/i915_irq.c')
-rw-r--r-- | shared-core/i915_irq.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 870fe402..4ceed3e3 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -381,6 +381,13 @@ void i915_user_irq_off(drm_i915_private_t *dev_priv) spin_unlock(&dev_priv->user_irq_lock); } +static int wait_compare(struct drm_device *dev, void *priv) +{ + drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + int irq_nr = (u64)priv; + + return (READ_BREADCRUMB(dev_priv) >= irq_nr); +} static int i915_wait_irq(drm_device_t * dev, int irq_nr) { @@ -396,8 +403,8 @@ static int i915_wait_irq(drm_device_t * dev, int irq_nr) dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; i915_user_irq_on(dev_priv); - DRM_WAIT_ON(ret, dev_priv->irq_queue, 3 * DRM_HZ, - READ_BREADCRUMB(dev_priv) >= irq_nr); + ret = drm_wait_on(dev, &dev_priv->irq_queue, 3 * DRM_HZ, wait_compare, + (void *)(u64)irq_nr); i915_user_irq_off(dev_priv); if (ret == DRM_ERR(EBUSY)) { @@ -719,9 +726,6 @@ void i915_driver_irq_postinstall(drm_device_t * dev) INIT_LIST_HEAD(&dev_priv->vbl_swaps.head); dev_priv->swaps_pending = 0; - if (!dev_priv->vblank_pipe) - dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A; - dev_priv->swaps_lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&dev_priv->vbl_swaps.head); dev_priv->swaps_pending = 0; @@ -729,8 +733,6 @@ void i915_driver_irq_postinstall(drm_device_t * dev) dev_priv->user_irq_lock = SPIN_LOCK_UNLOCKED; dev_priv->user_irq_refcount = 0; - if (!dev_priv->vblank_pipe) - dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A; i915_enable_interrupt(dev); DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); |