[PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"
Zachary Michaels
zmichaels at oblong.com
Wed Mar 22 18:19:57 UTC 2017
We were experiencing an infinite loop due to VRAM bos getting added back
to the VRAM lru on eviction via ttm_bo_mem_force_space, and reverting
this commit solves the problem.
Signed-off-by: Zachary Michaels <zmichaels at oblong.com>
Signed-off-by: Julien Isorce <jisorce at oblong.com>
---
drivers/gpu/drm/radeon/radeon_ttm.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 0cf03ccbf0a7..d50777f1b48e 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -198,30 +198,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
case TTM_PL_VRAM:
if (rbo->rdev->ring[radeon_copy_ring_index(rbo->rdev)].ready == false)
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_CPU);
- else if (rbo->rdev->mc.visible_vram_size < rbo->rdev->mc.real_vram_size &&
- bo->mem.start < (rbo->rdev->mc.visible_vram_size >> PAGE_SHIFT)) {
- unsigned fpfn = rbo->rdev->mc.visible_vram_size >> PAGE_SHIFT;
- int i;
-
- /* Try evicting to the CPU inaccessible part of VRAM
- * first, but only set GTT as busy placement, so this
- * BO will be evicted to GTT rather than causing other
- * BOs to be evicted from VRAM
- */
- radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_VRAM |
- RADEON_GEM_DOMAIN_GTT);
- rbo->placement.num_busy_placement = 0;
- for (i = 0; i < rbo->placement.num_placement; i++) {
- if (rbo->placements[i].flags & TTM_PL_FLAG_VRAM) {
- if (rbo->placements[0].fpfn < fpfn)
- rbo->placements[0].fpfn = fpfn;
- } else {
- rbo->placement.busy_placement =
- &rbo->placements[i];
- rbo->placement.num_busy_placement = 1;
- }
- }
- } else
+ else
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_GTT);
break;
case TTM_PL_TT:
--
2.11.1
More information about the amd-gfx
mailing list