diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-23 08:03:24 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-24 13:26:31 -0500 |
commit | 5a9a8d1a99c617df82339456fbdd30d6ed3a856b (patch) | |
tree | 0aa92fdfa778a05353cbe82d4635597ba9e87114 /drivers | |
parent | 3885c6bbd0c6c9cc3c8e6d4f723abc87c593b07a (diff) |
drm/i915: Handle the no-interrupts case for UMS by polling
If the driver calls into the kernel to wait for a breadcrumb to pass,
but hasn't enabled interrupts, fallback to polling the breadcrumb value.
Reported-by: Chris Clayton <chris2553@googlemail.com>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 98106b7efa8b..4b5a35c88bec 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -1293,12 +1293,12 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr) | |||
1293 | if (master_priv->sarea_priv) | 1293 | if (master_priv->sarea_priv) |
1294 | master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; | 1294 | master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; |
1295 | 1295 | ||
1296 | ret = -ENODEV; | ||
1297 | if (ring->irq_get(ring)) { | 1296 | if (ring->irq_get(ring)) { |
1298 | DRM_WAIT_ON(ret, ring->irq_queue, 3 * DRM_HZ, | 1297 | DRM_WAIT_ON(ret, ring->irq_queue, 3 * DRM_HZ, |
1299 | READ_BREADCRUMB(dev_priv) >= irq_nr); | 1298 | READ_BREADCRUMB(dev_priv) >= irq_nr); |
1300 | ring->irq_put(ring); | 1299 | ring->irq_put(ring); |
1301 | } | 1300 | } else if (wait_for(READ_BREADCRUMB(dev_priv) >= irq_nr, 3000)) |
1301 | ret = -EBUSY; | ||
1302 | 1302 | ||
1303 | if (ret == -EBUSY) { | 1303 | if (ret == -EBUSY) { |
1304 | DRM_ERROR("EBUSY -- rec: %d emitted: %d\n", | 1304 | DRM_ERROR("EBUSY -- rec: %d emitted: %d\n", |