Skip to contentSkip to conversation

drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

PATCH In review Roger He 2 participants 2 messages Nov 2, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Roger He

author
#0 lore raw

PATCH 1/2 drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

Change-Id Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -4
index c7ccd6f..bd7c424 100644
@@ -1167,9 +1167,6 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
 	unsigned long num_pages = bo->mem.num_pages;
 	struct drm_mm_node *node = bo->mem.mm_node;
 
-	if (bo->mem.start != AMDGPU_BO_INVALID_OFFSET)
-		return ttm_bo_eviction_valuable(bo, place);
-
 	switch (bo->mem.mem_type) {
 	case TTM_PL_TT:
 		return true;
@@ -1184,7 +1181,7 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
 			num_pages -= node->size;
 			++node;
 		}
-		break;
+		return false;
 
 	default:
 		break;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#2 lore raw
In reply to a message not in the archive

Am 02.11.2017 um 11:25 schrieb Roger He:

Quoted 2 lines
Change-Id Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4
Quoted 19 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -3
index c7ccd6f..bd7c424 100644
@@ -1167,9 +1167,6 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
  	unsigned long num_pages = bo->mem.num_pages;
  	struct drm_mm_node *node = bo->mem.mm_node;
 
-	if (bo->mem.start != AMDGPU_BO_INVALID_OFFSET)
-		return ttm_bo_eviction_valuable(bo, place);
-
  	switch (bo->mem.mem_type) {
  	case TTM_PL_TT:
  		return true;

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo, · line 1187

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -1184,7 +1181,7 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
  			num_pages -= node->size;
  			++node;
  		}
-		break;
+		return false;
 
  	default:
  		break;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx