summaryrefslogtreecommitdiff
path: root/linux-core/i915_drv.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-08-21 21:36:00 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-08-21 21:36:00 +0200
commite089de33e8efd87b30d59c571b9ab9aa302b23e1 (patch)
tree4939751b00374bc0e7344693babc3fe4aba10d0a /linux-core/i915_drv.c
parent6571f74a4906ae4f5f92916d64cc2cce3c8e0043 (diff)
i915 fence object driver implementing 2 fence object types:
0x00 EXE fence. Signals when command stream interpreter has reached the point where the fence was emitted. 0x01 FLUSH fence. Signals when command stream interpreter has reached the point where the fence was emitted, and all previous drawing operations have been completed and flushed. Implements busy wait (for fastest response time / high CPU) and lazy wait (User interrupt or timer driven).
Diffstat (limited to 'linux-core/i915_drv.c')
-rw-r--r--linux-core/i915_drv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index c6e25f9b..d1b8d2d2 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -38,6 +38,16 @@ static struct pci_device_id pciidlist[] = {
i915_PCI_IDS
};
+static drm_fence_driver_t i915_fence_driver = {
+ .no_types = 2,
+ .wrap_diff = (1 << 30),
+ .flush_diff = 200,
+ .sequence_mask = 0xffffffffU,
+ .lazy_capable = 1,
+ .emit = i915_fence_emit_sequence,
+ .poke_flush = i915_poke_flush,
+};
+
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static struct drm_driver driver = {
/* don't use mtrr's here, the Xserver or user space app should
@@ -78,6 +88,7 @@ static struct drm_driver driver = {
.remove = __devexit_p(drm_cleanup_pci),
},
+ .fence_driver = &i915_fence_driver,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,