]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amdgpu: move amdgpu_virt_release_full_gpu to fini_early stage
authorGuchun Chen <guchun.chen@amd.com>
Sat, 18 Sep 2021 05:43:41 +0000 (13:43 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:53 +0000 (07:32 +0100)
commiteab7cf1ba770cbddd2550864cb45c880041ef8f6
tree19bcfd1d00d275b42ea1c7f5ecea34d20081f297
parent30e51c3e51cbb20433f4ef20a0fb0d62983b1cfd
drm/amdgpu: move amdgpu_virt_release_full_gpu to fini_early stage

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 6effad8abe0ba4db3d9c58ed585127858a990f35 ]

adev->rmmio is set to be NULL in amdgpu_device_unmap_mmio to prevent
access after pci_remove, however, in SRIOV case, amdgpu_virt_release_full_gpu
will still use adev->rmmio for access after amdgpu_device_unmap_mmio.
The patch is to move such SRIOV calling earlier to fini_early stage.

Fixes: 07775fc13878 ("drm/amdgpu: Unmap all MMIO mappings")
Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Leslie Shi <Yuliang.Shi@amd.com>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c