drm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs
authorjsg <jsg@openbsd.org>
Thu, 15 Jun 2023 03:03:34 +0000 (03:03 +0000)
committerjsg <jsg@openbsd.org>
Thu, 15 Jun 2023 03:03:34 +0000 (03:03 +0000)
From Horatio Zhang
7b5a8a23acbc3ee50b23602b61db1563561faf84 in linux-6.1.y/6.1.30
720b47229a5b24061d1c2e29ddb6043a59178d79 in mainline linux

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

index aacff48..df5255c 100644 (file)
@@ -685,9 +685,11 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
                if (r)
                        return r;
 
-               r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
-               if (r)
-                       goto late_fini;
+               if (adev->gfx.cp_ecc_error_irq.funcs) {
+                       r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
+                       if (r)
+                               goto late_fini;
+               }
        } else {
                amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
        }