drm/amdgpu: Fix consecutive DPC recovery failures.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Mon, 24 Aug 2020 16:30:47 +0000 (12:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:25:04 +0000 (17:25 -0400)
commitc1dd4aa624076cb6d4724fad2d9e9e71e46bbc9f
tree0f5e8174ed47fc938b314ff32da89326b0ba1998
parent362c7b91c1b00e31ebd219af1e493e7ef50ccfb4
drm/amdgpu: Fix consecutive DPC recovery failures.

Cache the PCI state on boot and before each case where we might
loose it.

v2: Add pci_restore_state while caching the PCI state to avoid
breaking PCI core logic for stuff like suspend/resume.

v3: Extract pci_restore_state from amdgpu_device_cache_pci_state
to avoid superflous restores during GPU resets and suspend/resumes.

v4: Style fixes.

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