diff options
author | Tianci.Yin <tianci.yin@amd.com> | 2020-04-15 11:48:29 +0800 |
---|---|---|
committer | Tianci.Yin <tianci.yin@amd.com> | 2020-04-15 22:16:16 +0800 |
commit | aa4e87efbe687d708dfc90b6227794c4c4bd15d3 (patch) | |
tree | 10634316066de37cb6778c22b3fd63ddd7a705bb | |
parent | 485d7ed9fd615dd1589d393a48367c0241961d90 (diff) |
Revert "Revert "drm/amdgpu: Set GTT size to be bigger than 3/4 of RAM""amd-20.10
Since the origin patch is just work around, OOM has been fixed by other
patches from xinhui, so the WA patch can be removed.
This reverts commit 8404006b798e6d6fbfda31b48683be77f9df233c.
Change-Id: Ie81792f53d9d2352c8f4338073573c938f1e1eba
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
-rwxr-xr-x | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 4001342f6f5c..c93b40aa46f2 100755 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -2089,11 +2089,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) struct sysinfo si; si_meminfo(&si); - gtt_size = min(max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20), - adev->gmc.mc_vram_size), - ((uint64_t)si.totalram * si.mem_unit * 3/4)); - } - else + gtt_size = max3((AMDGPU_DEFAULT_GTT_SIZE_MB << 20), + adev->gmc.mc_vram_size, + ((uint64_t)si.totalram * si.mem_unit)); + } else gtt_size = (uint64_t)amdgpu_gtt_size << 20; /* reserve for DGMA import domain */ |