[PATCH 7/8] drm/amdgpu: enable/disable ras_controller_irq and err_event_athub_irq

Hawking Zhang Hawking.Zhang at amd.com
Mon Aug 26 03:54:59 UTC 2019


Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 55da6f5..8b4a568 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -822,6 +822,18 @@ static int gmc_v9_0_ecc_ras_block_late_init(void *handle,
 			goto irq;
 	}
 
+	if (adev->nbio.funcs->init_ras_controller_interrupt) {
+		r = amdgpu_irq_get(adev, &adev->nbio.ras_controller_irq, 0);
+		if (r)
+			goto irq;
+	}
+
+	if (adev->nbio.funcs->init_ras_err_event_athub_interrupt) {
+		r = amdgpu_irq_get(adev, &adev->nbio.ras_err_event_athub_irq, 0);
+		if (r)
+			goto irq;
+	}
+
 	return 0;
 irq:
 	amdgpu_ras_sysfs_remove(adev, *ras_if);
@@ -1427,6 +1439,10 @@ static int gmc_v9_0_hw_fini(void *handle)
 
 	amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
 	amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
+	if (adev->nbio.funcs->init_ras_controller_interrupt)
+		amdgpu_irq_put(adev, &adev->nbio.ras_controller_irq, 0);
+	if (adev->nbio.funcs->init_ras_err_event_athub_interrupt)
+		amdgpu_irq_put(adev, &adev->nbio.ras_err_event_athub_irq, 0);
 	gmc_v9_0_gart_disable(adev);
 
 	return 0;
-- 
2.7.4



More information about the amd-gfx mailing list