summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/amd
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/amd')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c3
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
index 9f767ce42f6..82dcdb618d6 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
@@ -2729,6 +2729,9 @@ static int psp_hw_fini(void *handle)
psp_rap_terminate(psp);
psp_dtm_terminate(psp);
psp_hdcp_terminate(psp);
+
+ if (adev->gmc.xgmi.num_physical_nodes > 1)
+ psp_xgmi_terminate(psp);
}
psp_asd_unload(psp);
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c
index 2d1921e1142..7a7f49b784c 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -739,7 +739,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
amdgpu_put_xgmi_hive(hive);
}
- return psp_xgmi_terminate(&adev->psp);
+ return 0;
}
static int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev)