From: Christian König Date: Fri, 4 Nov 2016 09:12:38 +0000 (+0100) Subject: drm/amdgpu: disable the VRAM manager on special placements v2 X-Git-Tag: v4.10-rc1~154^2~14^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5befb22a4d6edf570a8e40669f5395a24997adcd;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: disable the VRAM manager on special placements v2 This disables the VRAM manager when a special placement is requested, otherwise we play ping/pong with the buffers on every command submission. v2: only check lpfn Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: JimQu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index 180eed7c8bcad..d710226a0fffe 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -108,7 +108,7 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man, lpfn = man->size; if (bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS || - amdgpu_vram_page_split == -1) { + place->lpfn || amdgpu_vram_page_split == -1) { pages_per_node = ~0ul; num_nodes = 1; } else {