Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Christian König <christian.koenig@amd.com>
Reported-and-tested-by: Fredrik Bruhn <fredrik.bruhn@unibap.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
77171ead da2f84ba

+2 -1
+2 -1
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
··· 381 381 adev->gmc.aper_size = pci_resource_len(adev->pdev, 0); 382 382 383 383 #ifdef CONFIG_X86_64 384 - if (adev->flags & AMD_IS_APU) { 384 + if (adev->flags & AMD_IS_APU && 385 + adev->gmc.real_vram_size > adev->gmc.aper_size) { 385 386 adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22; 386 387 adev->gmc.aper_size = adev->gmc.real_vram_size; 387 388 }