mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amdgpu: set the contiguous flag if possible
This avoids reallocating scanout BOs on first pin in a lot of cases. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Tested-by: Nirmoy Das <nirmoy.das@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2b77ade8b9
commit
abf91e0d33
1 changed files with 3 additions and 2 deletions
|
@ -446,10 +446,11 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
|
|||
}
|
||||
spin_unlock(&mgr->lock);
|
||||
|
||||
if (i == 1)
|
||||
mem->placement |= TTM_PL_FLAG_CONTIGUOUS;
|
||||
|
||||
atomic64_add(vis_usage, &mgr->vis_usage);
|
||||
|
||||
mem->mm_node = nodes;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Add table
Reference in a new issue