Don't clobber the unfenced list with DONT_FENCE operations.
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Mon, 22 Oct 2007 17:09:36 +0000 (19:09 +0200)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Mon, 22 Oct 2007 17:09:36 +0000 (19:09 +0200)
linux-core/drm_bo.c

index e6eb632..9598e35 100644 (file)
@@ -1299,10 +1299,7 @@ int drm_bo_move_buffer(struct drm_buffer_object * bo, uint32_t new_mem_flags,
 
        mutex_lock(&bm->evict_mutex);
        mutex_lock(&dev->struct_mutex);
-       list_del(&bo->lru);
-       list_add_tail(&bo->lru, &bm->unfenced);
-       DRM_FLAG_MASKED(bo->priv_flags, _DRM_BO_FLAG_UNFENCED,
-                       _DRM_BO_FLAG_UNFENCED);
+       list_del_init(&bo->lru);
        mutex_unlock(&dev->struct_mutex);
 
        /*
@@ -1322,10 +1319,6 @@ int drm_bo_move_buffer(struct drm_buffer_object * bo, uint32_t new_mem_flags,
                                drm_mm_put_block(mem.mm_node);
                        mem.mm_node = NULL;
                }
-               DRM_FLAG_MASKED(bo->priv_flags, 0, _DRM_BO_FLAG_UNFENCED);
-               DRM_WAKEUP(&bo->event_queue);
-               list_del(&bo->lru);
-               drm_bo_add_to_lru(bo);
                mutex_unlock(&dev->struct_mutex);
        }