]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/gmc: use PCI BARs for APUs in passthrough
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Mar 2022 23:02:11 +0000 (18:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:34:14 +0000 (09:34 +0200)
commit0a330805b9a18fa9468f4434bd333ef46efbab3f
tree696c660d7cecaef20883ef392f3fe8b78c5be5b4
parent5b880ba9b1b94428e0866f6fcd4f58601404773e
drm/amdgpu/gmc: use PCI BARs for APUs in passthrough

[ Upstream commit 74922b39bbdaf952f5cc79d22244ea62b00128ba ]

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 <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c