]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: disable the VRAM manager on special placements v2
authorChristian König <christian.koenig@amd.com>
Fri, 4 Nov 2016 09:12:38 +0000 (10:12 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Nov 2016 15:21:12 +0000 (10:21 -0500)
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 <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: JimQu <Jim.Qu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

index 180eed7c8bcad6774f7ff3056d4193ff80b1c970..d710226a0fffe2da3fcbecf9650168396adcdbeb 100644 (file)
@@ -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 {