diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 5 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 12 | ||||
-rw-r--r-- | shared-core/via_drv.c | 14 | ||||
-rw-r--r-- | shared-core/via_drv.h | 11 | ||||
-rw-r--r-- | shared-core/via_map.c | 3 |
5 files changed, 12 insertions, 33 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 287e95ac..15fb8117 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -422,6 +422,9 @@ void i915_emit_breadcrumb(struct drm_device *dev) RING_LOCALS; if (++dev_priv->counter > BREADCRUMB_MASK) { +#ifdef I915_HAVE_FENCE + i915_invalidate_reported_sequence(dev); +#endif dev_priv->counter = 1; DRM_DEBUG("Breadcrumb counter wrapped around\n"); } @@ -1113,7 +1116,7 @@ static int i915_execbuffer(struct drm_device *dev, void *data, fence_arg->handle = fence->base.hash.key; fence_arg->fence_class = fence->fence_class; fence_arg->type = fence->type; - fence_arg->signaled = fence->signaled; + fence_arg->signaled = fence->signaled_types; } } drm_fence_usage_deref_unlocked(&fence); diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index c92758fa..3f6c8066 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -136,6 +136,8 @@ typedef struct drm_i915_private { uint32_t flush_flags; uint32_t flush_pending; uint32_t saved_flush_status; + uint32_t reported_sequence; + int reported_sequence_valid; #endif #ifdef I915_HAVE_BUFFER void *agp_iomap; @@ -290,15 +292,9 @@ extern void i915_mem_release(struct drm_device * dev, struct mem_block *heap); #ifdef I915_HAVE_FENCE /* i915_fence.c */ - - extern void i915_fence_handler(struct drm_device *dev); -extern int i915_fence_emit_sequence(struct drm_device *dev, uint32_t class, - uint32_t flags, - uint32_t *sequence, - uint32_t *native_type); -extern void i915_poke_flush(struct drm_device *dev, uint32_t class); -extern int i915_fence_has_irq(struct drm_device *dev, uint32_t class, uint32_t flags); +extern void i915_invalidate_reported_sequence(struct drm_device *dev); + #endif #ifdef I915_HAVE_BUFFER diff --git a/shared-core/via_drv.c b/shared-core/via_drv.c index a802e4ae..dd632c3d 100644 --- a/shared-core/via_drv.c +++ b/shared-core/via_drv.c @@ -40,17 +40,9 @@ static struct pci_device_id pciidlist[] = { #ifdef VIA_HAVE_FENCE -static struct drm_fence_driver via_fence_driver = { - .num_classes = 1, - .wrap_diff = (1 << 30), - .flush_diff = (1 << 20), - .sequence_mask = 0xffffffffU, - .lazy_capable = 1, - .emit = via_fence_emit_sequence, - .poke_flush = via_poke_flush, - .has_irq = via_fence_has_irq, -}; +extern struct drm_fence_driver via_fence_driver; #endif + #ifdef VIA_HAVE_BUFFER /** @@ -76,6 +68,8 @@ static struct drm_bo_driver via_bo_driver = { .init_mem_type = via_init_mem_type, .evict_flags = via_evict_flags, .move = NULL, + .ttm_cache_flush = NULL, + .command_stream_barrier = NULL }; #endif diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h index 8dd4a727..941a2d77 100644 --- a/shared-core/via_drv.h +++ b/shared-core/via_drv.h @@ -196,17 +196,6 @@ extern void via_dmablit_handler(struct drm_device *dev, int engine, int from_irq extern void via_init_dmablit(struct drm_device *dev); #endif -#ifdef VIA_HAVE_FENCE -extern void via_fence_timer(unsigned long data); -extern void via_poke_flush(struct drm_device * dev, uint32_t class); -extern int via_fence_emit_sequence(struct drm_device * dev, uint32_t class, - uint32_t flags, - uint32_t * sequence, - uint32_t * native_type); -extern int via_fence_has_irq(struct drm_device * dev, uint32_t class, - uint32_t flags); -#endif - #ifdef VIA_HAVE_BUFFER extern struct drm_ttm_backend *via_create_ttm_backend_entry(struct drm_device *dev); extern int via_fence_types(struct drm_buffer_object *bo, uint32_t *fclass, diff --git a/shared-core/via_map.c b/shared-core/via_map.c index 11bfa551..54934367 100644 --- a/shared-core/via_map.c +++ b/shared-core/via_map.c @@ -69,9 +69,6 @@ static int via_do_init_map(struct drm_device * dev, drm_via_init_t * init) dev_priv->emit_0_sequence = 0; dev_priv->have_idlelock = 0; spin_lock_init(&dev_priv->fence_lock); - init_timer(&dev_priv->fence_timer); - dev_priv->fence_timer.function = &via_fence_timer; - dev_priv->fence_timer.data = (unsigned long) dev; #endif /* VIA_HAVE_FENCE */ dev->dev_private = (void *)dev_priv; #ifdef VIA_HAVE_BUFFER |