[PATCH 1/2] drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition
Roger He
Hongbo.He at amd.com
Thu Nov 2 10:25:40 UTC 2017
Change-Id: Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4
Signed-off-by: Roger He <Hongbo.He at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index c7ccd6f..bd7c424 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -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;
--
2.7.4
More information about the amd-gfx
mailing list