drm/amdgpu: skip disabling fence driver src_irqs when device is unplugged
authorjsg <jsg@openbsd.org>
Mon, 19 Jun 2023 00:36:06 +0000 (00:36 +0000)
committerjsg <jsg@openbsd.org>
Mon, 19 Jun 2023 00:36:06 +0000 (00:36 +0000)
From Guchun Chen
68ce1d57e52c6f88ffffb0d81b10650eafc8e540 in linux-6.1.y/6.1.33
c1a322a7a4a96cd0a3dde32ce37af437a78bf8cd in mainline linux

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

index 605b4c1..8770aa5 100644 (file)
@@ -545,7 +545,8 @@ void amdgpu_fence_driver_hw_fini(struct amdgpu_device *adev)
                if (r)
                        amdgpu_fence_driver_force_completion(ring);
 
-               if (ring->fence_drv.irq_src)
+               if (!drm_dev_is_unplugged(adev_to_drm(adev)) &&
+                   ring->fence_drv.irq_src)
                        amdgpu_irq_put(adev, ring->fence_drv.irq_src,
                                       ring->fence_drv.irq_type);