summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Deng <Emily.Deng@amd.com>2019-11-06 16:20:54 +0800
committerEmily Deng <Emily.Deng@amd.com>2019-11-07 10:46:02 +0800
commit0d0ac4299607862288c32393296091ab331ff200 (patch)
tree7e7ea75b90520976a08d59ec0870c2a3afed9a71
parent3f36c633f77ab50171fa94e123e46b16ddf45bd8 (diff)
SWDEV-210749 drm/amdgpu: Need to disable msix when unloading driver
For driver reload test, it will report "can't enable MSI (MSI-X already enabled)". Change-Id: Id98a33e8404d8d803f20d9694f2f04a6e5251fb7 Signed-off-by: Emily Deng <Emily.Deng@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 56ed4e3dc7d4..437c7476557d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -291,7 +291,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);
}