aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunming Zhou <[email protected]>2015-09-23 17:22:43 +0800
committerAlex Deucher <[email protected]>2015-10-07 23:48:22 -0400
commit95d7918323be0090a1cc36f0ebdd1d3af88f2335 (patch)
tree2c6dd61dcace9efd5b8ccf09e0dcf7d68dc9e99a
parenta2ef8a974931bd4a28e81a3de0a3813e97acfc30 (diff)
drm/amdgpu: add TOPDOWN flag to the whole vram
need to decrease visible vram usage by default. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: monk.liu <[email protected]> Reviewed-by: Christian König <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 2 insertions, 0 deletions
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) {