drm/amdgpu: remove extra placement for AMDGPU_GEM_CREATE_NO_CPU_ACCESS
authorChristian König <christian.koenig@amd.com>
Fri, 4 Nov 2016 10:34:07 +0000 (11:34 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Nov 2016 15:21:12 +0000 (10:21 -0500)
This only has the effect of scanning the invisible range twice
since the topdown flag is given anyway.

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_object.c

index 1479d09bd4dd316569c841d08e77b1a159d1154b..4368a0467bdc6e978fffcdca42d37b7954f49b81 100644 (file)
@@ -128,17 +128,6 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
                if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)
                        lpfn = adev->mc.real_vram_size >> PAGE_SHIFT;
 
-               if (flags & AMDGPU_GEM_CREATE_NO_CPU_ACCESS &&
-                   !(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) &&
-                   adev->mc.visible_vram_size < adev->mc.real_vram_size) {
-                       places[c].fpfn = visible_pfn;
-                       places[c].lpfn = lpfn;
-                       places[c].flags = TTM_PL_FLAG_WC |
-                               TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM |
-                               TTM_PL_FLAG_TOPDOWN;
-                       c++;
-               }
-
                places[c].fpfn = 0;
                places[c].lpfn = lpfn;
                places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |