summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/i915_irq.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c
index e7f3b083..ee7c40b5 100644
--- a/shared-core/i915_irq.c
+++ b/shared-core/i915_irq.c
@@ -456,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.