summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshaoyunl <shaoyun.liu@amd.com>2019-10-01 15:52:31 -0400
committerFeifei Xu <Feifei.Xu@amd.com>2019-10-29 16:15:24 +0800
commitd4fbfe0766ed127e365f2e590c89b919fd8b5ec7 (patch)
treee7c658b520b7acb67c2e524c356ba24aa0d1f82e
parentd41983e6d9e448edd2b6eda0c147e3f7a55e2352 (diff)
drm/amdgpu : enable msix for amdgpu driver
We might used out of the msi resources in some cloud project which have a lot gpu devices(including PF and VF), msix can provide enough resources from system level view Change-Id: I9f03762074ac416c07f27b8f00c052ca93c7d6cb Signed-off-by: shaoyunl <shaoyun.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 16d56cf0854b..8881e731b438 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -225,8 +225,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
adev->irq.msi_enabled = false;
if (amdgpu_msi_ok(adev)) {
- int ret = pci_enable_msi(adev->pdev);
- if (!ret) {
+ int nvec = pci_alloc_irq_vectors(adev->pdev, 1, pci_msix_vec_count(adev->pdev),
+ PCI_IRQ_MSI | PCI_IRQ_MSIX);
+ if (nvec > 0) {
adev->irq.msi_enabled = true;
dev_dbg(adev->dev, "amdgpu: using MSI.\n");
}