diff options
author | Dave Airlie <airlied@redhat.com> | 2010-07-07 04:37:37 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-07 04:37:37 -0400 |
commit | a907a2e7d287f2b89fd81bc8edf164c0008c624f (patch) | |
tree | d93fecbe492cb9f65e6253d10a2f55333b8800de /drivers/gpu/drm/ttm | |
parent | db8cc27b804f89e8fd5f9d5385161956a777c471 (diff) | |
parent | 709ea97145c125b3811ff70429e90ebdb0e832e5 (diff) |
Merge branch 'drm-intel-lru' into drm-testing
* drm-intel-lru:
drm: implement helper functions for scanning lru list
drm_mm: extract check_free_mm_node
drm: sane naming for drm_mm.c
drm: kill dead code in drm_mm.c
drm: kill drm_mm_node->private
drm: use list_for_each_entry in drm_mm.c
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_util.c | 2 |
2 files changed, 0 insertions, 8 deletions
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; |