drm/amdgpu: use top down allocation for non-CPU accessible vram
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Sep 2015 19:06:08 +0000 (15:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Sep 2015 14:29:32 +0000 (10:29 -0400)
Should help avoid fragmentation of vram due to CPU access
requirements.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 57adcad2f7ba19e7261efd97faa0e5c7d57b9ab3..08b09d55b96fedbe77bfa7a9925e61f8bd3028a5 100644 (file)
@@ -127,7 +127,7 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev,
                        placements[c].fpfn =
                                adev->mc.visible_vram_size >> PAGE_SHIFT;
                        placements[c++].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |
-                               TTM_PL_FLAG_VRAM;
+                               TTM_PL_FLAG_VRAM | TTM_PL_FLAG_TOPDOWN;
                }
                placements[c].fpfn = 0;
                placements[c++].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |