drm: kill drm_mm_node->private
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 2 Jul 2010 14:02:12 +0000 (15:02 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 7 Jul 2010 02:26:44 +0000 (12:26 +1000)
Only ever assigned, never used.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[glisse: I will re-add if needed for range-restricted allocations]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/drm_mm.h

index 074385882ccfe721ff5630b9e825950c6479af7e..75061b305b8cfbd91972667f6abb066ecd709ba9 100644 (file)
@@ -2633,10 +2633,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
        if (free_space != NULL) {
                obj_priv->gtt_space = drm_mm_get_block(free_space, obj->size,
                                                       alignment);
-               if (obj_priv->gtt_space != NULL) {
-                       obj_priv->gtt_space->private = obj;
+               if (obj_priv->gtt_space != NULL)
                        obj_priv->gtt_offset = obj_priv->gtt_space->start;
-               }
        }
        if (obj_priv->gtt_space == NULL) {
                /* If the gtt is empty and we're still having trouble
index 555ebb12ace83dae496fbf41e357bc29c954542d..9763288c6b2d300f355f2bba367a405a7bd859f1 100644 (file)
@@ -476,7 +476,6 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all)
                        ++put_count;
                }
                if (bo->mem.mm_node) {
-                       bo->mem.mm_node->private = NULL;
                        drm_mm_put_block(bo->mem.mm_node);
                        bo->mem.mm_node = NULL;
                }
@@ -670,7 +669,6 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible,
                        printk(KERN_ERR TTM_PFX "Buffer eviction failed\n");
                spin_lock(&glob->lru_lock);
                if (evict_mem.mm_node) {
-                       evict_mem.mm_node->private = NULL;
                        drm_mm_put_block(evict_mem.mm_node);
                        evict_mem.mm_node = NULL;
                }
@@ -929,8 +927,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
                mem->mm_node = node;
                mem->mem_type = mem_type;
                mem->placement = cur_flags;
-               if (node)
-                       node->private = bo;
                return 0;
        }
 
@@ -973,7 +969,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
                                                interruptible, no_wait_reserve, no_wait_gpu);
                if (ret == 0 && mem->mm_node) {
                        mem->placement = cur_flags;
-                       mem->mm_node->private = bo;
                        return 0;
                }
                if (ret == -ERESTARTSYS)
@@ -1029,7 +1024,6 @@ int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
 out_unlock:
        if (ret && mem.mm_node) {
                spin_lock(&glob->lru_lock);
-               mem.mm_node->private = NULL;
                drm_mm_put_block(mem.mm_node);
                spin_unlock(&glob->lru_lock);
        }
index 13012a1f1486c1bf4cad58608068f27b667b2335..7cffb3e0423249ec4f78f7c7cbdc72b6df921e50 100644 (file)
@@ -353,8 +353,6 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
        fbo->vm_node = NULL;
 
        fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj);
-       if (fbo->mem.mm_node)
-               fbo->mem.mm_node->private = (void *)fbo;
        kref_init(&fbo->list_kref);
        kref_init(&fbo->kref);
        fbo->destroy = &ttm_transfered_destroy;
index 4c10be39a43bd94d7568fbb41bf3cc8d15fac95f..da94071b1703327da9e01062fe6ee02707be914c 100644 (file)
@@ -48,7 +48,6 @@ struct drm_mm_node {
        unsigned long start;
        unsigned long size;
        struct drm_mm *mm;
-       void *private;
 };
 
 struct drm_mm {