drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1193,9 +1193,6 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
|
|||||||
unsigned long num_pages = bo->mem.num_pages;
|
unsigned long num_pages = bo->mem.num_pages;
|
||||||
struct drm_mm_node *node = bo->mem.mm_node;
|
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) {
|
switch (bo->mem.mem_type) {
|
||||||
case TTM_PL_TT:
|
case TTM_PL_TT:
|
||||||
return true;
|
return true;
|
||||||
@@ -1210,7 +1207,7 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
|
|||||||
num_pages -= node->size;
|
num_pages -= node->size;
|
||||||
++node;
|
++node;
|
||||||
}
|
}
|
||||||
break;
|
return false;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user