mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
drm/ttm: remove manual placement preference
If drivers don't prefer a system memory placement they should not but it into the placement list first. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b2f7a61619
commit
af1dac01a7
1 changed files with 9 additions and 9 deletions
|
@ -1012,8 +1012,12 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||||
ttm_flag_masked(&cur_flags, place->flags,
|
ttm_flag_masked(&cur_flags, place->flags,
|
||||||
~TTM_PL_MASK_MEMTYPE);
|
~TTM_PL_MASK_MEMTYPE);
|
||||||
|
|
||||||
if (mem_type == TTM_PL_SYSTEM)
|
if (mem_type == TTM_PL_SYSTEM) {
|
||||||
break;
|
mem->mem_type = mem_type;
|
||||||
|
mem->placement = cur_flags;
|
||||||
|
mem->mm_node = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ret = (*man->func->get_node)(man, bo, place, mem);
|
ret = (*man->func->get_node)(man, bo, place, mem);
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
|
@ -1025,16 +1029,12 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
||||||
(*man->func->put_node)(man, mem);
|
(*man->func->put_node)(man, mem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
break;
|
mem->mem_type = mem_type;
|
||||||
|
mem->placement = cur_flags;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((type_ok && (mem_type == TTM_PL_SYSTEM)) || mem->mm_node) {
|
|
||||||
mem->mem_type = mem_type;
|
|
||||||
mem->placement = cur_flags;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < placement->num_busy_placement; ++i) {
|
for (i = 0; i < placement->num_busy_placement; ++i) {
|
||||||
const struct ttm_place *place = &placement->busy_placement[i];
|
const struct ttm_place *place = &placement->busy_placement[i];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue