diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-20 19:22:34 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-22 20:10:38 -0400 |
commit | 9731129c5e3077d0c2da13479f91c3a07e341f70 (patch) | |
tree | 0864d8f90f55a65051ad1971698e8d4ea1b214dc /drivers/gpu/drm/i915/i915_gem.c | |
parent | 2d7ef395b310e17c86fa6190f21ea1f2eccae5d1 (diff) |
drm/i915: Remove eviction debug spam
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 62ba9c121a14..8beec97fa348 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2078,27 +2078,14 @@ i915_gem_evict_everything(struct drm_device *dev) | |||
2078 | int ret; | 2078 | int ret; |
2079 | bool lists_empty; | 2079 | bool lists_empty; |
2080 | 2080 | ||
2081 | DRM_INFO("GTT full, evicting everything: " | ||
2082 | "%d objects [%d pinned], " | ||
2083 | "%d object bytes [%d pinned], " | ||
2084 | "%d/%d gtt bytes\n", | ||
2085 | atomic_read(&dev->object_count), | ||
2086 | atomic_read(&dev->pin_count), | ||
2087 | atomic_read(&dev->object_memory), | ||
2088 | atomic_read(&dev->pin_memory), | ||
2089 | atomic_read(&dev->gtt_memory), | ||
2090 | dev->gtt_total); | ||
2091 | |||
2092 | spin_lock(&dev_priv->mm.active_list_lock); | 2081 | spin_lock(&dev_priv->mm.active_list_lock); |
2093 | lists_empty = (list_empty(&dev_priv->mm.inactive_list) && | 2082 | lists_empty = (list_empty(&dev_priv->mm.inactive_list) && |
2094 | list_empty(&dev_priv->mm.flushing_list) && | 2083 | list_empty(&dev_priv->mm.flushing_list) && |
2095 | list_empty(&dev_priv->mm.active_list)); | 2084 | list_empty(&dev_priv->mm.active_list)); |
2096 | spin_unlock(&dev_priv->mm.active_list_lock); | 2085 | spin_unlock(&dev_priv->mm.active_list_lock); |
2097 | 2086 | ||
2098 | if (lists_empty) { | 2087 | if (lists_empty) |
2099 | DRM_ERROR("GTT full, but lists empty!\n"); | ||
2100 | return -ENOSPC; | 2088 | return -ENOSPC; |
2101 | } | ||
2102 | 2089 | ||
2103 | /* Flush everything (on to the inactive lists) and evict */ | 2090 | /* Flush everything (on to the inactive lists) and evict */ |
2104 | i915_gem_flush(dev, I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); | 2091 | i915_gem_flush(dev, I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); |
@@ -2209,10 +2196,9 @@ i915_gem_evict_something(struct drm_device *dev, int min_size) | |||
2209 | * large enough to swap out for the new one, so just evict | 2196 | * large enough to swap out for the new one, so just evict |
2210 | * everything and start again. (This should be rare.) | 2197 | * everything and start again. (This should be rare.) |
2211 | */ | 2198 | */ |
2212 | if (!list_empty (&dev_priv->mm.inactive_list)) { | 2199 | if (!list_empty (&dev_priv->mm.inactive_list)) |
2213 | DRM_INFO("GTT full, evicting inactive buffers\n"); | ||
2214 | return i915_gem_evict_from_inactive_list(dev); | 2200 | return i915_gem_evict_from_inactive_list(dev); |
2215 | } else | 2201 | else |
2216 | return i915_gem_evict_everything(dev); | 2202 | return i915_gem_evict_everything(dev); |
2217 | } | 2203 | } |
2218 | } | 2204 | } |
@@ -2237,7 +2223,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj) | |||
2237 | BUG_ON(obj_priv->pages != NULL); | 2223 | BUG_ON(obj_priv->pages != NULL); |
2238 | obj_priv->pages = drm_calloc_large(page_count, sizeof(struct page *)); | 2224 | obj_priv->pages = drm_calloc_large(page_count, sizeof(struct page *)); |
2239 | if (obj_priv->pages == NULL) { | 2225 | if (obj_priv->pages == NULL) { |
2240 | DRM_ERROR("Failed to allocate page list\n"); | ||
2241 | obj_priv->pages_refcount--; | 2226 | obj_priv->pages_refcount--; |
2242 | return -ENOMEM; | 2227 | return -ENOMEM; |
2243 | } | 2228 | } |
@@ -2605,11 +2590,9 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) | |||
2605 | DRM_INFO("%s: GTT full, evicting something\n", __func__); | 2590 | DRM_INFO("%s: GTT full, evicting something\n", __func__); |
2606 | #endif | 2591 | #endif |
2607 | ret = i915_gem_evict_something(dev, obj->size); | 2592 | ret = i915_gem_evict_something(dev, obj->size); |
2608 | if (ret != 0) { | 2593 | if (ret) |
2609 | if (ret != -ERESTARTSYS) | ||
2610 | DRM_ERROR("Failed to evict a buffer %d\n", ret); | ||
2611 | return ret; | 2594 | return ret; |
2612 | } | 2595 | |
2613 | goto search_free; | 2596 | goto search_free; |
2614 | } | 2597 | } |
2615 | 2598 | ||
@@ -2634,9 +2617,6 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) | |||
2634 | /* first try to clear up some space from the GTT */ | 2617 | /* first try to clear up some space from the GTT */ |
2635 | ret = i915_gem_evict_something(dev, obj->size); | 2618 | ret = i915_gem_evict_something(dev, obj->size); |
2636 | if (ret) { | 2619 | if (ret) { |
2637 | if (ret != -ERESTARTSYS) | ||
2638 | DRM_ERROR("Failed to allocate space for backing pages %d\n", ret); | ||
2639 | |||
2640 | /* now try to shrink everyone else */ | 2620 | /* now try to shrink everyone else */ |
2641 | if (! retry_alloc) { | 2621 | if (! retry_alloc) { |
2642 | retry_alloc = true; | 2622 | retry_alloc = true; |
@@ -2666,11 +2646,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) | |||
2666 | obj_priv->gtt_space = NULL; | 2646 | obj_priv->gtt_space = NULL; |
2667 | 2647 | ||
2668 | ret = i915_gem_evict_something(dev, obj->size); | 2648 | ret = i915_gem_evict_something(dev, obj->size); |
2669 | if (ret) { | 2649 | if (ret) |
2670 | if (ret != -ERESTARTSYS) | ||
2671 | DRM_ERROR("Failed to allocate space to bind AGP: %d\n", ret); | ||
2672 | return ret; | 2650 | return ret; |
2673 | } | ||
2674 | 2651 | ||
2675 | goto search_free; | 2652 | goto search_free; |
2676 | } | 2653 | } |
@@ -3870,11 +3847,8 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment) | |||
3870 | i915_verify_inactive(dev, __FILE__, __LINE__); | 3847 | i915_verify_inactive(dev, __FILE__, __LINE__); |
3871 | if (obj_priv->gtt_space == NULL) { | 3848 | if (obj_priv->gtt_space == NULL) { |
3872 | ret = i915_gem_object_bind_to_gtt(obj, alignment); | 3849 | ret = i915_gem_object_bind_to_gtt(obj, alignment); |
3873 | if (ret != 0) { | 3850 | if (ret) |
3874 | if (ret != -EBUSY && ret != -ERESTARTSYS) | ||
3875 | DRM_ERROR("Failure to bind: %d\n", ret); | ||
3876 | return ret; | 3851 | return ret; |
3877 | } | ||
3878 | } | 3852 | } |
3879 | /* | 3853 | /* |
3880 | * Pre-965 chips need a fence register set up in order to | 3854 | * Pre-965 chips need a fence register set up in order to |