diff options
| author | Alex Deucher <[email protected]> | 2022-03-09 23:02:11 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-03-25 16:40:24 +0000 |
| commit | b818a5d374542ccec73dcfe578a081574029820e (patch) | |
| tree | ee2d225a28041e48b29fc559d1574d7549aabee1 /drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | |
| parent | drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire() (diff) | |
| download | kernel-b818a5d374542ccec73dcfe578a081574029820e.tar.gz kernel-b818a5d374542ccec73dcfe578a081574029820e.zip | |
drm/amdgpu/gmc: use PCI BARs for APUs in passthrough
If the GPU is passed through to a guest VM, use the PCI
BAR for CPU FB access rather than the physical address of
carve out. The physical address is not valid in a guest.
v2: Fix HDP handing as suggested by Michel
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index ca9841d5669f..1932a3e4af7e 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c @@ -581,7 +581,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev) adev->gmc.aper_size = pci_resource_len(adev->pdev, 0); #ifdef CONFIG_X86_64 - if (adev->flags & AMD_IS_APU) { + if ((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev)) { adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22; adev->gmc.aper_size = adev->gmc.real_vram_size; } |
