<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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> Deng, Emily <Emily.Deng@amd.com><br>
<b>Sent:</b> Wednesday, November 6, 2019 5:09 AM<br>
<b>To:</b> Koenig, Christian <Christian.Koenig@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Need to disable msix when unloading driver</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Christian,<br>
We use " pci_alloc_irq_vectors " in amdgpu_irq_init. This patch use " pci_free_irq_vectors " in amdgpu_irq_fini.<br>
<br>
Hi Alex,<br>
Could you help to review this?<br>
<br>
Best wishes<br>
Emily Deng<br>
<br>
<br>
<br>
>-----Original Message-----<br>
>From: Christian König <ckoenig.leichtzumerken@gmail.com><br>
>Sent: Wednesday, November 6, 2019 5:32 PM<br>
>To: Deng, Emily <Emily.Deng@amd.com>; amd-gfx@lists.freedesktop.org<br>
>Subject: Re: [PATCH] drm/amdgpu: Need to disable msix when unloading<br>
>driver<br>
><br>
>Not an expert on the PCI IRQ stuff, but from what I know that looks correct to<br>
>me.<br>
><br>
>Only question I can see is why don't we use pci_alloc_irq_vectors()?<br>
>Alex probably needs to take a look.<br>
><br>
>Regards,<br>
>Christian.<br>
><br>
>Am 06.11.19 um 07:28 schrieb Deng, Emily:<br>
>> Hi all,<br>
>> Please help to review this. This is to fix driver reload issue.<br>
>><br>
>> Best wishes<br>
>> Emily Deng<br>
>><br>
>><br>
>>> -----Original Message-----<br>
>>> From: Emily Deng <Emily.Deng@amd.com><br>
>>> Sent: Wednesday, November 6, 2019 2:24 PM<br>
>>> To: amd-gfx@lists.freedesktop.org<br>
>>> Cc: Deng, Emily <Emily.Deng@amd.com><br>
>>> Subject: [PATCH] drm/amdgpu: Need to disable msix when unloading<br>
>>> driver<br>
>>><br>
>>> For driver reload test, it will report "can't enable MSI (MSI-X already<br>
>enabled)".<br>
>>><br>
>>> Signed-off-by: Emily Deng <Emily.Deng@amd.com><br>
>>> ---<br>
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-<br>
>>> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
>>><br>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
>>> index 6f3b03f..30d540d 100644<br>
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c<br>
>>> @@ -311,7 +311,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)<br>
>>> drm_irq_uninstall(adev->ddev);<br>
>>> adev->irq.installed = false;<br>
>>> if (adev->irq.msi_enabled)<br>
>>> - pci_disable_msi(adev->pdev);<br>
>>> + pci_free_irq_vectors(adev->pdev);<br>
>>> if (!amdgpu_device_has_dc_support(adev))<br>
>>> flush_work(&adev->hotplug_work);<br>
>>> }<br>
>>> --<br>
>>> 2.7.4<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><br>
<br>
</div>
</span></font></div>
</body>
</html>