aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
diff options
context:
space:
mode:
authorTao Zhou <[email protected]>2019-09-18 09:30:50 +0000
committerAlex Deucher <[email protected]>2019-10-03 14:11:02 +0000
commitde9bbd5273c8caa0361876e4171de2ad36a6b9df (patch)
tree83ddd67b89f00716d25aec090397bf901158b644 /drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
parentdrm/amdgpu: simplify the access to eeprom_control struct (diff)
downloadkernel-de9bbd5273c8caa0361876e4171de2ad36a6b9df.tar.gz
kernel-de9bbd5273c8caa0361876e4171de2ad36a6b9df.zip
drm/amdgpu: add ras fini for nbio
add a common nbio ras fini implementation to cleanup nbio ras framework Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
index 65373ad03763..7d5c3a9de9ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.c
@@ -68,3 +68,17 @@ free:
adev->nbio.ras_if = NULL;
return r;
}
+
+void amdgpu_nbio_ras_fini(struct amdgpu_device *adev)
+{
+ if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__PCIE_BIF) &&
+ adev->nbio.ras_if) {
+ struct ras_common_if *ras_if = adev->nbio.ras_if;
+ struct ras_ih_if ih_info = {
+ .cb = NULL,
+ };
+
+ amdgpu_ras_late_fini(adev, ras_if, &ih_info);
+ kfree(ras_if);
+ }
+}