diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-03-08 14:28:17 +1100 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-03-08 14:28:17 +1100 |
commit | 796b8f87b56f299928579aad92e02a37f0b8b7c3 (patch) | |
tree | 156d0a034f1ba5aec4fe76c0f26a27e1213efbfa /sys/dev | |
parent | b53d592ff8e2b1fceb5009f11b59c40810f0eb4d (diff) |
remove flushing_list
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.h | 11 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_gem.c | 29 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_gem_evict.c | 26 |
4 files changed, 2 insertions, 66 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 98c5c91e48a..0c3da5965b5 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -953,7 +953,6 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux) /* GEM init */ INIT_LIST_HEAD(&dev_priv->mm.active_list); - INIT_LIST_HEAD(&dev_priv->mm.flushing_list); INIT_LIST_HEAD(&dev_priv->mm.inactive_list); INIT_LIST_HEAD(&dev_priv->mm.fence_list); for (i = 0; i < I915_NUM_RINGS; i++) @@ -1806,7 +1805,6 @@ inteldrm_quiesce(struct inteldrm_softc *dev_priv) * for gtt mapping. Nothing should be pinned over vt switch, if it * is then rendering corruption will occur due to api misuse, shame. */ - KASSERT(list_empty(&dev_priv->mm.flushing_list)); KASSERT(list_empty(&dev_priv->mm.active_list)); /* Disabled because root could panic the kernel if this was enabled */ /* KASSERT(dev->pin_count == 0); */ diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index 7267ac42eb4..314c2f4ac73 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -649,17 +649,6 @@ struct inteldrm_softc { struct list_head active_list; /** - * List of objects which are not in the ringbuffer but which - * still have a write_domain which needs to be flushed before - * unbinding. - * - * last_rendering_seqno is 0 while an object is in this list - * - * A reference is held on the buffer while on this list. - */ - struct list_head flushing_list; - - /** * LRU list of objects which are not in the ringbuffer and * are ready to unbind, but are still in the GTT. * diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c index b820a8c155a..49e957f937e 100644 --- a/sys/dev/pci/drm/i915_gem.c +++ b/sys/dev/pci/drm/i915_gem.c @@ -889,18 +889,6 @@ i915_gem_object_move_off_active(struct drm_i915_gem_object *obj) obj->last_write_seqno = 0; } -void -i915_gem_object_move_to_flushing(struct drm_i915_gem_object *obj) -{ - struct drm_device *dev = obj->base.dev; - drm_i915_private_t *dev_priv = dev->dev_private; - - BUG_ON(!obj->active); - list_move_tail(&obj->mm_list, &dev_priv->mm.flushing_list); - - i915_gem_object_move_off_active(obj); -} - /* called locked */ void i915_gem_object_move_to_inactive_locked(struct drm_i915_gem_object *obj) @@ -1161,19 +1149,6 @@ i915_gem_reset(struct drm_device *dev) for (i = 0; i < I915_NUM_RINGS; i++) i915_gem_reset_ring_lists(dev_priv, &dev_priv->rings[i]); - /* Remove anything from the flushing lists. The GPU cache is likely - * to be lost on reset along with the data, so simply move the - * lost bo to the inactive list. - */ - while (!list_empty(&dev_priv->mm.flushing_list)) { - obj = list_first_entry(&dev_priv->mm.flushing_list, - struct drm_i915_gem_object, - mm_list); - - obj->base.write_domain = 0; - i915_gem_object_move_to_inactive(obj); - } - /* Move everything out of the GPU domains to ensure we do any * necessary invalidation upon reuse. */ @@ -1243,7 +1218,7 @@ i915_gem_retire_requests_ring(struct intel_ring_buffer *ring) break; if (obj->base.write_domain != 0) - i915_gem_object_move_to_flushing(obj); + i915_gem_object_move_off_active(obj); else i915_gem_object_move_to_inactive(obj); } @@ -1836,7 +1811,6 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj, * fitting our object in, we're out of memory. */ if (list_empty(&dev_priv->mm.inactive_list) && - list_empty(&dev_priv->mm.flushing_list) && list_empty(&dev_priv->mm.active_list)) { DRM_ERROR("GTT full, but LRU list empty\n"); goto error; @@ -2894,7 +2868,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, /* gtt mapping means that the inactive list may not be empty */ KASSERT(list_empty(&dev_priv->mm.active_list)); - KASSERT(list_empty(&dev_priv->mm.flushing_list)); for_each_ring(ring, dev_priv, i) KASSERT(list_empty(&ring->request_list)); DRM_UNLOCK(); diff --git a/sys/dev/pci/drm/i915_gem_evict.c b/sys/dev/pci/drm/i915_gem_evict.c index 9ac0c28efdd..84721e198e9 100644 --- a/sys/dev/pci/drm/i915_gem_evict.c +++ b/sys/dev/pci/drm/i915_gem_evict.c @@ -63,7 +63,7 @@ i915_gem_evict_something(struct inteldrm_softc *dev_priv, size_t min_size) struct drm_i915_gem_object *obj_priv; struct intel_ring_buffer *ring; u_int32_t seqno; - int ret = 0, write_domain = 0, i; + int ret = 0, i; int found; for (;;) { @@ -111,28 +111,6 @@ i915_gem_evict_something(struct inteldrm_softc *dev_priv, size_t min_size) if (found) continue; - /* If we didn't have anything on the request list but there - * are buffers awaiting a flush, emit one and try again. - * When we wait on it, those buffers waiting for that flush - * will get moved to inactive. - */ - list_for_each_entry(obj_priv, &dev_priv->mm.flushing_list, - mm_list) { - obj = &obj_priv->base; - if (obj->size >= min_size) { - write_domain = obj->write_domain; - break; - } - obj = NULL; - } - - if (write_domain) { - if (i915_gem_flush_ring(obj_priv->ring, write_domain, - write_domain) == 0) - return (ENOMEM); - continue; - } - /* * If we didn't do any of the above, there's no single buffer * large enough to swap out for the new one, so just evict @@ -153,7 +131,6 @@ i915_gem_evict_everything(struct inteldrm_softc *dev_priv) int ret; if (list_empty(&dev_priv->mm.inactive_list) && - list_empty(&dev_priv->mm.flushing_list) && list_empty(&dev_priv->mm.active_list)) return (ENOSPC); @@ -174,7 +151,6 @@ i915_gem_evict_everything(struct inteldrm_softc *dev_priv) * we evicted the whole shebang, only pinned objects are still bound. */ KASSERT(list_empty(&dev_priv->mm.inactive_list)); - KASSERT(list_empty(&dev_priv->mm.flushing_list)); KASSERT(list_empty(&dev_priv->mm.active_list)); return (0); |