From 60da3cb69fbb4507ff6edc9da253e272fb776e2b Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 19 Jun 2023 00:36:06 +0000 Subject: [PATCH] drm/amdgpu: skip disabling fence driver src_irqs when device is unplugged 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_fence.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_fence.c index 605b4c1b25e..8770aa59de9 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_fence.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_fence.c @@ -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); -- 2.20.1