Skip to contentSkip to conversation

drm/amdgpu: Need to disable msix when unloading driver

PATCH In review Emily Deng 1 participant 2 messages Nov 6, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Emily Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Need to disable msix when unloading driver

For driver reload test, it will report "can't enable MSI (MSI-X already enabled)".

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -0
index 6040eb3..48d9cf0d 100644
@@ -325,7 +325,11 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
 		drm_irq_uninstall(adev->ddev);
 		adev->irq.installed = false;
 		if (adev->irq.msi_enabled)
+#ifdef PCI_IRQ_MSI
+			pci_free_irq_vectors(adev->pdev);
+#else
 			pci_disable_msi(adev->pdev);
+#endif
 		if (!amdgpu_device_has_dc_support(adev))
 			flush_work(&adev->hotplug_work);
 	}
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1573021089-14955-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Sorry, please ignore this, will send another patch later.

Best wishes
Emily Deng

Quoted 32 lines

-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Wednesday, November 6, 2019 2:18 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu: Need to disable msix when unloading driver

For driver reload test, it will report "can't enable MSI (MSI-X already enabled)".

---
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++

1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -1
index 6040eb3..48d9cf0d 100644
@@ -325,7 +325,11 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
 		drm_irq_uninstall(adev->ddev);
 		adev->irq.installed = false;
 		if (adev->irq.msi_enabled)
+#ifdef PCI_IRQ_MSI
+			pci_free_irq_vectors(adev->pdev);
+#else
 			pci_disable_msi(adev->pdev);
+#endif
 		if (!amdgpu_device_has_dc_support(adev))
 			flush_work(&adev->hotplug_work);
 	}
--
Quoted 1 line

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx