aboutsummaryrefslogtreecommitdiff
path: root/linux-core/i915_fence.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-14 13:31:35 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-14 13:31:35 +0100
commit5c9a7b0f9499b94856916facd110059223d243dc (patch)
tree6b0596648ae9210d0fb2013a960e81b5d3d04ba5 /linux-core/i915_fence.c
parent04760563b88c8e94f3ae448710d1ab8b350c2e5f (diff)
Remove an intel-specific hack and replace it with a fence driver callback.
Diffstat (limited to 'linux-core/i915_fence.c')
-rw-r--r--linux-core/i915_fence.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/linux-core/i915_fence.c b/linux-core/i915_fence.c
index 2182604c..fa2a3d1f 100644
--- a/linux-core/i915_fence.c
+++ b/linux-core/i915_fence.c
@@ -61,7 +61,7 @@ static void i915_perform_flush(drm_device_t * dev)
diff = sequence - fm->last_exe_flush;
if (diff < driver->wrap_diff && diff != 0) {
- drm_fence_handler(dev, sequence, DRM_FENCE_TYPE_EXE);
+ drm_fence_handler(dev, 0, sequence, DRM_FENCE_TYPE_EXE);
}
diff = sequence - fm->exe_flush_sequence;
@@ -84,7 +84,7 @@ static void i915_perform_flush(drm_device_t * dev)
flush_flags = dev_priv->flush_flags;
flush_sequence = dev_priv->flush_sequence;
dev_priv->flush_pending = 0;
- drm_fence_handler(dev, flush_sequence, flush_flags);
+ drm_fence_handler(dev, 0, flush_sequence, flush_flags);
}
}
@@ -104,13 +104,13 @@ static void i915_perform_flush(drm_device_t * dev)
flush_flags = dev_priv->flush_flags;
flush_sequence = dev_priv->flush_sequence;
dev_priv->flush_pending = 0;
- drm_fence_handler(dev, flush_sequence, flush_flags);
+ drm_fence_handler(dev, 0, flush_sequence, flush_flags);
}
}
}
-void i915_poke_flush(drm_device_t * dev)
+void i915_poke_flush(drm_device_t * dev, uint32_t class)
{
drm_fence_manager_t *fm = &dev->fm;
unsigned long flags;
@@ -120,7 +120,7 @@ void i915_poke_flush(drm_device_t * dev)
write_unlock_irqrestore(&fm->lock, flags);
}
-int i915_fence_emit_sequence(drm_device_t * dev, uint32_t flags,
+int i915_fence_emit_sequence(drm_device_t * dev, uint32_t class, uint32_t flags,
uint32_t * sequence, uint32_t * native_type)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -144,3 +144,15 @@ void i915_fence_handler(drm_device_t * dev)
i915_perform_flush(dev);
write_unlock(&fm->lock);
}
+
+int i915_fence_has_irq(drm_device_t *dev, uint32_t class, uint32_t flags)
+{
+ /*
+ * We have an irq that tells us when we have a new breadcrumb.
+ */
+
+ if (class == 0 && flags == DRM_FENCE_TYPE_EXE)
+ return 1;
+
+ return 0;
+}