]> 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)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2022 16:40:24 +0000 (12:40 -0400)
commit74922b39bbdaf952f5cc79d22244ea62b00128ba
treeee2d225a28041e48b29fc559d1574d7549aabee1
parenta4877e2babb53de45fac78eff367d67b9c6888d0
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 <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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