diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-07-02 10:02:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-06 22:26:44 -0400 |
commit | db3307a9f7b8078c654021e3b35354a2b09a8e67 (patch) | |
tree | 95c0a9382dcd95f75977f6dff07e2f7a557967d0 | |
parent | 26f3751eb47c757c656333e74bdceccd8d286d76 (diff) |
drm: kill drm_mm_node->private
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>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 2 | ||||
-rw-r--r-- | include/drm/drm_mm.h | 1 |
4 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 074385882ccf..75061b305b8c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2633,10 +2633,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) | |||
2633 | if (free_space != NULL) { | 2633 | if (free_space != NULL) { |
2634 | obj_priv->gtt_space = drm_mm_get_block(free_space, obj->size, | 2634 | obj_priv->gtt_space = drm_mm_get_block(free_space, obj->size, |
2635 | alignment); | 2635 | alignment); |
2636 | if (obj_priv->gtt_space != NULL) { | 2636 | if (obj_priv->gtt_space != NULL) |
2637 | obj_priv->gtt_space->private = obj; | ||
2638 | obj_priv->gtt_offset = obj_priv->gtt_space->start; | 2637 | obj_priv->gtt_offset = obj_priv->gtt_space->start; |
2639 | } | ||
2640 | } | 2638 | } |
2641 | if (obj_priv->gtt_space == NULL) { | 2639 | if (obj_priv->gtt_space == NULL) { |
2642 | /* If the gtt is empty and we're still having trouble | 2640 | /* If the gtt is empty and we're still having trouble |
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 555ebb12ace8..9763288c6b2d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -476,7 +476,6 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all) | |||
476 | ++put_count; | 476 | ++put_count; |
477 | } | 477 | } |
478 | if (bo->mem.mm_node) { | 478 | if (bo->mem.mm_node) { |
479 | bo->mem.mm_node->private = NULL; | ||
480 | drm_mm_put_block(bo->mem.mm_node); | 479 | drm_mm_put_block(bo->mem.mm_node); |
481 | bo->mem.mm_node = NULL; | 480 | bo->mem.mm_node = NULL; |
482 | } | 481 | } |
@@ -670,7 +669,6 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible, | |||
670 | printk(KERN_ERR TTM_PFX "Buffer eviction failed\n"); | 669 | printk(KERN_ERR TTM_PFX "Buffer eviction failed\n"); |
671 | spin_lock(&glob->lru_lock); | 670 | spin_lock(&glob->lru_lock); |
672 | if (evict_mem.mm_node) { | 671 | if (evict_mem.mm_node) { |
673 | evict_mem.mm_node->private = NULL; | ||
674 | drm_mm_put_block(evict_mem.mm_node); | 672 | drm_mm_put_block(evict_mem.mm_node); |
675 | evict_mem.mm_node = NULL; | 673 | evict_mem.mm_node = NULL; |
676 | } | 674 | } |
@@ -929,8 +927,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
929 | mem->mm_node = node; | 927 | mem->mm_node = node; |
930 | mem->mem_type = mem_type; | 928 | mem->mem_type = mem_type; |
931 | mem->placement = cur_flags; | 929 | mem->placement = cur_flags; |
932 | if (node) | ||
933 | node->private = bo; | ||
934 | return 0; | 930 | return 0; |
935 | } | 931 | } |
936 | 932 | ||
@@ -973,7 +969,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, | |||
973 | interruptible, no_wait_reserve, no_wait_gpu); | 969 | interruptible, no_wait_reserve, no_wait_gpu); |
974 | if (ret == 0 && mem->mm_node) { | 970 | if (ret == 0 && mem->mm_node) { |
975 | mem->placement = cur_flags; | 971 | mem->placement = cur_flags; |
976 | mem->mm_node->private = bo; | ||
977 | return 0; | 972 | return 0; |
978 | } | 973 | } |
979 | if (ret == -ERESTARTSYS) | 974 | if (ret == -ERESTARTSYS) |
@@ -1029,7 +1024,6 @@ int ttm_bo_move_buffer(struct ttm_buffer_object *bo, | |||
1029 | out_unlock: | 1024 | out_unlock: |
1030 | if (ret && mem.mm_node) { | 1025 | if (ret && mem.mm_node) { |
1031 | spin_lock(&glob->lru_lock); | 1026 | spin_lock(&glob->lru_lock); |
1032 | mem.mm_node->private = NULL; | ||
1033 | drm_mm_put_block(mem.mm_node); | 1027 | drm_mm_put_block(mem.mm_node); |
1034 | spin_unlock(&glob->lru_lock); | 1028 | spin_unlock(&glob->lru_lock); |
1035 | } | 1029 | } |
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 13012a1f1486..7cffb3e04232 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c | |||
@@ -353,8 +353,6 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, | |||
353 | fbo->vm_node = NULL; | 353 | fbo->vm_node = NULL; |
354 | 354 | ||
355 | fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); | 355 | fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); |
356 | if (fbo->mem.mm_node) | ||
357 | fbo->mem.mm_node->private = (void *)fbo; | ||
358 | kref_init(&fbo->list_kref); | 356 | kref_init(&fbo->list_kref); |
359 | kref_init(&fbo->kref); | 357 | kref_init(&fbo->kref); |
360 | fbo->destroy = &ttm_transfered_destroy; | 358 | fbo->destroy = &ttm_transfered_destroy; |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 4c10be39a43b..da94071b1703 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -48,7 +48,6 @@ struct drm_mm_node { | |||
48 | unsigned long start; | 48 | unsigned long start; |
49 | unsigned long size; | 49 | unsigned long size; |
50 | struct drm_mm *mm; | 50 | struct drm_mm *mm; |
51 | void *private; | ||
52 | }; | 51 | }; |
53 | 52 | ||
54 | struct drm_mm { | 53 | struct drm_mm { |