Commit abf91e0d authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: set the contiguous flag if possible

This avoids reallocating scanout BOs on first pin in a lot of cases.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Tested-by: default avatarNirmoy Das <nirmoy.das@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2b77ade8
......@@ -446,10 +446,11 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
}
spin_unlock(&mgr->lock);
atomic64_add(vis_usage, &mgr->vis_usage);
if (i == 1)
mem->placement |= TTM_PL_FLAG_CONTIGUOUS;
atomic64_add(vis_usage, &mgr->vis_usage);
mem->mm_node = nodes;
return 0;
error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment