summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas@tungstengraphics.com>2006-03-02 10:50:16 +0000
committerThomas Hellstrom <thomas@tungstengraphics.com>2006-03-02 10:50:16 +0000
commit48e80f7308e543f4db75a61d6c5f08c12c706655 (patch)
tree6c63010f34a3799527f2df7dedbdf34723425a8a
parent3c5a9f699e07ab5fd119b58393806ac293f47d8a (diff)
mm: Fix eviction loop intel: Fix aperture size Silence compiler warning.
-rw-r--r--linux-core/drm_ttm.c10
-rw-r--r--shared-core/i915_dma.c4
2 files changed, 11 insertions, 3 deletions
diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c
index 37819452..7510c3a8 100644
--- a/linux-core/drm_ttm.c
+++ b/linux-core/drm_ttm.c
@@ -816,6 +816,12 @@ static int drm_ttm_evict_lru_sl(drm_ttm_backend_list_t * entry)
drm_device_t *dev = mm->dev;
drm_mm_node_t *evict_node;
+/*
+ * We must use a loop here, since the list might be updated while we release
+ * the locks to wait for fence.
+ */
+
+
do {
list = entry->mm->lru_head.next;
@@ -831,6 +837,9 @@ static int drm_ttm_evict_lru_sl(drm_ttm_backend_list_t * entry)
}
evict_fence = evict_priv->fence;
+ if (dev->mm_driver->test_fence(dev, evict_priv->region->fence_type,
+ evict_fence))
+ break;
spin_unlock(mm_lock);
up(&dev->struct_sem);
@@ -841,7 +850,6 @@ static int drm_ttm_evict_lru_sl(drm_ttm_backend_list_t * entry)
} while (TRUE);
- DRM_ERROR("Evicting 0x%lx\n", (unsigned long)evict_priv->region);
dev->mm_driver->evicted_tt = TRUE;
evict_node = evict_priv->region->mm_node;
drm_evict_ttm_region(evict_priv->region);
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index b32f815c..86ccb5fb 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -205,7 +205,7 @@ static int i915_initialize(drm_device_t * dev,
arg.vr_offset_lo = 1024*1024*8;
arg.vr_offset_hi = 0;
- arg.tt_p_size_lo = 1024*1024*48;
+ arg.tt_p_size_lo = 1024*1024*48/4096;
arg.tt_p_size_hi = 0;
arg.tt_p_offset_lo = 1024*1024*128/4096;
arg.tt_p_offset_hi = 0;
@@ -432,10 +432,10 @@ static int i915_emit_box(drm_device_t * dev,
static void i915_emit_breadcrumb(drm_device_t *dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
- dev_priv->counter++;
RING_LOCALS;
+ dev_priv->counter++;
if (dev_priv->counter > 0x7FFFFFFFUL)
dev_priv->counter = 0;