Browse Source

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>
Christian König 7 years ago
parent
commit
5f232bd79b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

+ 2 - 1
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);
 		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;
 		mc->gart_start = 0;
 	else
 	else
 		mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
 		mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);