Commit 77171ead authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: add coreboot workaround for KV/KB

Coreboot seems to have a problem correctly setting up access to the stolen VRAM
on KV/KB. Use the direct access only when necessary.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reported-and-tested-by: default avatarFredrik Bruhn <fredrik.bruhn@unibap.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent da2f84ba
...@@ -381,7 +381,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev) ...@@ -381,7 +381,8 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
adev->gmc.aper_size = pci_resource_len(adev->pdev, 0); adev->gmc.aper_size = pci_resource_len(adev->pdev, 0);
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
if (adev->flags & AMD_IS_APU) { if (adev->flags & AMD_IS_APU &&
adev->gmc.real_vram_size > adev->gmc.aper_size) {
adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22; adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
adev->gmc.aper_size = adev->gmc.real_vram_size; adev->gmc.aper_size = adev->gmc.real_vram_size;
} }
......
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