summaryrefslogtreecommitdiff
path: root/shared-core/i915_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/i915_irq.c')
-rw-r--r--shared-core/i915_irq.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index 2c699ecd..ee7c40b5 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -417,8 +417,6 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
if (READ_BREADCRUMB(dev_priv) >= irq_nr)
return 0;
- 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);
@@ -458,12 +456,25 @@ static int i915_driver_vblank_do_wait(struct drm_device *dev,
int i915_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence)
{
- return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received);
+ atomic_t *counter;
+
+ if (i915_get_pipe(dev, 0) == 0)
+ counter = &dev->vbl_received;
+ else
+ counter = &dev->vbl_received2;
+ return i915_driver_vblank_do_wait(dev, sequence, counter);
}
int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence)
{
- return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received2);
+ atomic_t *counter;
+
+ if (i915_get_pipe(dev, 1) == 0)
+ counter = &dev->vbl_received;
+ else
+ counter = &dev->vbl_received2;
+
+ return i915_driver_vblank_do_wait(dev, sequence, counter);
}
/* Needs the lock as it touches the ring.