drm/amdgpu/gfx: disable gfx9 cp_ecc_error_irq only when enabling legacy gfx ras
authorjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 03:15:33 +0000 (03:15 +0000)
committerjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 03:15:33 +0000 (03:15 +0000)
From Guchun Chen
f661ad53658a1ea35c004af1f5fbe25c4d1cdb08 in linux-6.1.y/6.1.29
4a76680311330aefe5074bed8f06afa354b85c48 in mainline linux

sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c

index 5632b71..bef65c7 100644 (file)
@@ -3798,7 +3798,8 @@ static int gfx_v9_0_hw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0);
+       if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
+               amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0);
        amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
        amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);