Skip to contentSkip to conversation

drm/radeon: check the right ring in radeon_evict_flags()

PATCH In review Alex Deucher 2 participants 2 messages Dec 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: check the right ring in radeon_evict_flags()

Check the that ring we are using for copies is functional rather than the GFX ring. On newer asics we use the DMA ring for bo moves.

---
 drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
index cbe7b32..d02aa1d 100644
@@ -196,7 +196,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
 	rbo = container_of(bo, struct radeon_bo, tbo);
 	switch (bo->mem.mem_type) {
 	case TTM_PL_VRAM:
-		if (rbo->rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready == false)
+		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)) {
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Am 03.12.2014 um 17:09 schrieb Alex Deucher:

Quoted 5 lines

Check the that ring we are using for copies is functional rather than the GFX ring. On newer asics we use the DMA ring for bo moves.

Quoted 10 lines
---
  drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_ttm.c +0 -0
index cbe7b32..d02aa1d 100644

drivers/gpu/drm/radeon/radeon_ttm.c static void radeon_evict_flags(struct ttm_buffer_object *bo, · line 202

Quoted 8 lines
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
@@ -196,7 +196,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
  	rbo = container_of(bo, struct radeon_bo, tbo);
  	switch (bo->mem.mem_type) {
  	case TTM_PL_VRAM:
-		if (rbo->rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready == false)
+		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)) {

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel