OSDN Git Service

drm/amdgpu: Fix resume failures when device is gone
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 17 Sep 2021 11:18:29 +0000 (07:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Sep 2021 19:17:29 +0000 (15:17 -0400)
commitebe86a57c882871a927986ee6514cb171483d074
treee92a0f0da99afa77d92f7e9341ca428f3488a059
parentc03509cbc01559549700e14c4a6239f2572ab4ba
drm/amdgpu: Fix resume failures when device is gone

Problem:
When device goes into suspend and unplugged during it
then all HW programming during resume fails leading
to a bad SW during pci remove handling which follows.
Because device is first resumed and only later removed
we cannot rely on drm_dev_enter/exit here.

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

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c