From 875c32ca610280340b282ce08e4762b7059ac76f Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 13 Jun 2023 03:27:33 +0000 Subject: [PATCH] drm/amdgpu: disable sdma ecc irq only when sdma RAS is enabled in suspend From Guchun Chen 2a179117a3b29e7136e4045c57090a05bb97f373 in linux-6.1.y/6.1.29 8b229ada2669b74fdae06c83fbfda5a5a99fc253 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c b/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c index a223bca6bb9..caa8a2118a6 100644 --- a/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/sdma_v4_0.c @@ -1941,9 +1941,11 @@ static int sdma_v4_0_hw_fini(void *handle) return 0; } - for (i = 0; i < adev->sdma.num_instances; i++) { - amdgpu_irq_put(adev, &adev->sdma.ecc_irq, - AMDGPU_SDMA_IRQ_INSTANCE0 + i); + if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__SDMA)) { + for (i = 0; i < adev->sdma.num_instances; i++) { + amdgpu_irq_put(adev, &adev->sdma.ecc_irq, + AMDGPU_SDMA_IRQ_INSTANCE0 + i); + } } sdma_v4_0_ctx_switch_enable(adev, false); -- 2.20.1