diff options
author | shaoyunl <shaoyun.liu@amd.com> | 2019-10-01 15:52:31 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-03 09:11:05 -0500 |
commit | bd660f4f111161f60392dd02424c3a3d2240dc2f (patch) | |
tree | 6183e2930313a0696fbb65aa26bd183c42cd6802 /drivers/gpu | |
parent | 452f9bdd9affa30677e76fbbbb61f7fe666bd8ca (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
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 5 |
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 d1d5e7f9b9be..50771b2757dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -245,8 +245,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"); } |