Commit bd660f4f authored by shaoyunl's avatar shaoyunl Committed by Alex Deucher

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: default avatarshaoyunl <shaoyun.liu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 452f9bdd
...@@ -245,8 +245,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev) ...@@ -245,8 +245,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
adev->irq.msi_enabled = false; adev->irq.msi_enabled = false;
if (amdgpu_msi_ok(adev)) { if (amdgpu_msi_ok(adev)) {
int ret = pci_enable_msi(adev->pdev); int nvec = pci_alloc_irq_vectors(adev->pdev, 1, pci_msix_vec_count(adev->pdev),
if (!ret) { PCI_IRQ_MSI | PCI_IRQ_MSIX);
if (nvec > 0) {
adev->irq.msi_enabled = true; adev->irq.msi_enabled = true;
dev_dbg(adev->dev, "amdgpu: using MSI.\n"); dev_dbg(adev->dev, "amdgpu: using MSI.\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment