Commit 2ccecaf6 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix AGP location with VRAM at 0x0

That also simplifies handling quite a bit.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bdbb4d6e
...@@ -200,16 +200,13 @@ void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) ...@@ -200,16 +200,13 @@ void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc)
} }
if (size_bf > size_af) { if (size_bf > size_af) {
mc->agp_start = mc->fb_start > mc->gart_start ? mc->agp_start = (mc->fb_start - size_bf) & sixteen_gb_mask;
mc->gart_end + 1 : 0;
mc->agp_size = size_bf; mc->agp_size = size_bf;
} else { } else {
mc->agp_start = (mc->fb_start > mc->gart_start ? mc->agp_start = ALIGN(mc->fb_end + 1, sixteen_gb);
mc->fb_end : mc->gart_end) + 1,
mc->agp_size = size_af; mc->agp_size = size_af;
} }
mc->agp_start = ALIGN(mc->agp_start, sixteen_gb);
mc->agp_end = mc->agp_start + mc->agp_size - 1; mc->agp_end = mc->agp_start + mc->agp_size - 1;
dev_info(adev->dev, "AGP: %lluM 0x%016llX - 0x%016llX\n", dev_info(adev->dev, "AGP: %lluM 0x%016llX - 0x%016llX\n",
mc->agp_size >> 20, mc->agp_start, mc->agp_end); mc->agp_size >> 20, mc->agp_start, mc->agp_end);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment