diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-24 03:40:10 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-29 13:35:52 -0400 |
commit | 5f232bd79b2417450064b78a9b3d398f9cd498ba (patch) | |
tree | d8c85e4ec9d747245e3f41489857269c6e48e71a /drivers/gpu/drm/amd/amdgpu | |
parent | d78c1fa0c9f815fe951fd57001acca3d35262a17 (diff) |
drm/amdgpu: use the smaller hole for GART
Instead of the larger one use the smaller hole in the MC address
space for the GART mappings.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index 8269197df8e0..265ec6807130 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | |||
@@ -132,7 +132,8 @@ void amdgpu_gmc_gart_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) | |||
132 | mc->gart_size = max(size_bf, size_af); | 132 | mc->gart_size = max(size_bf, size_af); |
133 | } | 133 | } |
134 | 134 | ||
135 | if (size_bf > size_af) | 135 | if ((size_bf >= mc->gart_size && size_bf < size_af) || |
136 | (size_af < mc->gart_size)) | ||
136 | mc->gart_start = 0; | 137 | mc->gart_start = 0; |
137 | else | 138 | else |
138 | mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL); | 139 | mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL); |