From 5f232bd79b2417450064b78a9b3d398f9cd498ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Fri, 24 Aug 2018 09:40:10 +0200 Subject: [PATCH] drm/amdgpu: use the smaller hole for GART MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Instead of the larger one use the smaller hole in the MC address space for the GART mappings. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) mc->gart_size = max(size_bf, size_af); } - if (size_bf > size_af) + if ((size_bf >= mc->gart_size && size_bf < size_af) || + (size_af < mc->gart_size)) mc->gart_start = 0; else mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL); -- 2.30.2