Commit 362c7b91 authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Alex Deucher

drm/amdgpu: Fix SMU error failure

Wait for HW/PSP initiated ASIC reset to complete before
starting the recovery operations.

v2: Remove typo
Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent acd89fca
...@@ -4843,13 +4843,31 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) ...@@ -4843,13 +4843,31 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev)
{ {
struct drm_device *dev = pci_get_drvdata(pdev); struct drm_device *dev = pci_get_drvdata(pdev);
struct amdgpu_device *adev = drm_to_adev(dev); struct amdgpu_device *adev = drm_to_adev(dev);
int r; int r, i;
bool vram_lost; bool vram_lost;
u32 memsize;
DRM_INFO("PCI error: slot reset callback!!\n"); DRM_INFO("PCI error: slot reset callback!!\n");
/* wait for asic to come out of reset */
msleep(500);
pci_restore_state(pdev); pci_restore_state(pdev);
/* confirm ASIC came out of reset */
for (i = 0; i < adev->usec_timeout; i++) {
memsize = amdgpu_asic_get_config_memsize(adev);
if (memsize != 0xffffffff)
break;
udelay(1);
}
if (memsize == 0xffffffff) {
r = -ETIME;
goto out;
}
/* TODO Call amdgpu_pre_asic_reset instead */
adev->in_pci_err_recovery = true; adev->in_pci_err_recovery = true;
r = amdgpu_device_ip_suspend(adev); r = amdgpu_device_ip_suspend(adev);
adev->in_pci_err_recovery = false; adev->in_pci_err_recovery = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment