summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-03-23 10:29:00 +0800
committerQiang Yu <Qiang.Yu@amd.com>2017-05-17 11:10:46 +0800
commitc4930fdf5842d46337c162c9e58ce1ba1e92bc89 (patch)
tree7fb8b1f1c691553b5743319b01ece2323f2a8940
parent276889b2e10195e9773fb42ba211d5c2601b69d3 (diff)
amdgpu: change max allocation
Change-Id: I83f8f33140609d4d2c3e54954cc2dc96eeaec6ba Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--amdgpu/amdgpu_gpu_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
index dddf6e78..34f77bea 100644
--- a/amdgpu/amdgpu_gpu_info.c
+++ b/amdgpu/amdgpu_gpu_info.c
@@ -272,7 +272,7 @@ int amdgpu_query_heap_info(amdgpu_device_handle dev,
else /* query total vram heap */
info->heap_size = vram_gtt_info.vram_size;
- info->max_allocation = vram_gtt_info.vram_cpu_accessible_size;
+ info->max_allocation = vram_gtt_info.vram_size * 3 / 4;
if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)
r = amdgpu_query_info(dev, AMDGPU_INFO_VIS_VRAM_USAGE,
@@ -287,7 +287,7 @@ int amdgpu_query_heap_info(amdgpu_device_handle dev,
break;
case AMDGPU_GEM_DOMAIN_GTT:
info->heap_size = vram_gtt_info.gtt_size;
- info->max_allocation = vram_gtt_info.vram_cpu_accessible_size;
+ info->max_allocation = vram_gtt_info.gtt_size * 3 / 4;
r = amdgpu_query_info(dev, AMDGPU_INFO_GTT_USAGE,
sizeof(info->heap_usage),