From: Chunming Zhou Date: Wed, 23 Sep 2015 09:22:43 +0000 (+0800) Subject: drm/amdgpu: add TOPDOWN flag to the whole vram X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95d7918323be0090a1cc36f0ebdd1d3af88f2335;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: add TOPDOWN flag to the whole vram need to decrease visible vram usage by default. Signed-off-by: Chunming Zhou Reviewed-by: monk.liu Reviewed-by: Christian König --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 1a7708f365f3..0d524384ff79 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -132,6 +132,8 @@ static void amdgpu_ttm_placement_init(struct amdgpu_device *adev, placements[c].fpfn = 0; placements[c++].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM; + if (!(flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)) + placements[c - 1].flags |= TTM_PL_FLAG_TOPDOWN; } if (domain & AMDGPU_GEM_DOMAIN_GTT) {