]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix crash when hot unplug in BACO
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 21 May 2021 20:41:22 +0000 (16:41 -0400)
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Tue, 25 May 2021 15:56:48 +0000 (11:56 -0400)
commitf6feb226c1b7b765fd3b57e967b6f3f5de46f725
tree6e4066bd918e5367466362697f771753893c5492
parent077e8565f66c34d0bb8de0e7c15d7b7e6a645aa2
drm/amdgpu: Fix crash when hot unplug in BACO

Problem:
When device goes into runtime suspend due to prolonged
inactivity (e.g. BACO sleep) and then hot unplugged,
PCI core will try to wake up the device as part of
unplug process. Since the device is gone all HW
programming during rpm resume fails leading
to a bad SW state later during pci remove handling.

Fix:
Use a flag we use for PCIe error recovery to avoid
accessing registres. This allows to successfully complete
rpm resume sequence and finish pci remove.

v2: Renamed HW access block flag

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1081
Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-2-andrey.grodzovsky@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c