<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Liu, Shaoyun <Shaoyun.Liu@amd.com><br>
<b>Sent:</b> Tuesday, October 1, 2019 4:03 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Liu, Shaoyun <Shaoyun.Liu@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu : enable msix for amdgpu driver</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">We might used out of the msi resources in some cloud project<br>
which have a lot gpu devices(including PF and VF), msix can<br>
provide enough resources from system level view<br>
<br>
Change-Id: I9f03762074ac416c07f27b8f00c052ca93c7d6cb<br>
Signed-off-by: shaoyunl <shaoyun.liu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 5 +++--<br>
 1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
index d1d5e7f..1bd27ea 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
@@ -245,8 +245,9 @@ int amdgpu_irq_init(struct amdgpu_device *adev)<br>
         adev->irq.msi_enabled = false;<br>
 <br>
         if (amdgpu_msi_ok(adev)) {<br>
-               int ret = pci_enable_msi(adev->pdev);<br>
-               if (!ret) {<br>
+               int nvec = pci_alloc_irq_vectors(adev->pdev, 1, pci_msix_vec_count(adev->pdev),<br>
+                                       PCI_IRQ_MSI | PCI_IRQ_MSIX)<br>
+               if (nvec > 0) {<br>
                         adev->irq.msi_enabled = true;<br>
                         dev_dbg(adev->dev, "amdgpu: using MSI.\n");<br>
                 }<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>