[PATCH 5/7] drm/amdgpu: don't disable MSI for GPU virtual function

Liu, Monk Monk.Liu at amd.com
Tue Oct 24 07:56:31 UTC 2017


One thing I'm concerned is whether you patch will break the kmd reload functional, but since the latest staging already broken on reload, you won't get chance to
Verify your patch ....

If you have bandwidth you can try applying your patch on our private customer branch ,and see if the driver reloading still works or not.

Ack-by: Monk Liu <monk.liu at amd.com>

BR Monk

-----Original Message-----
From: Ding, Pixel 
Sent: 2017年10月24日 15:52
To: Liu, Monk <Monk.Liu at amd.com>; amd-gfx at lists.freedesktop.org; Xiao, Jack <Jack.Xiao at amd.com>
Cc: Sun, Gary <Gary.Sun at amd.com>; Li, Bingley <Bingley.Li at amd.com>
Subject: Re: [PATCH 5/7] drm/amdgpu: don't disable MSI for GPU virtual function

Tried but still fail. Meanwhile I also think it’s not good to disable device here since we only redo the amdgpu_device_init for exclusive mode timeout.

— 
Sincerely Yours,
Pixel








On 24/10/2017, 11:03 AM, "Liu, Monk" <Monk.Liu at amd.com> wrote:

>Can you try call pci_disable_device once you found init failed, and make sure it is called before re-init 
>
>
>-----Original Message-----
>From: Ding, Pixel 
>Sent: 2017年10月24日 9:31
>To: Liu, Monk <Monk.Liu at amd.com>; amd-gfx at lists.freedesktop.org; Xiao, Jack <Jack.Xiao at amd.com>
>Cc: Sun, Gary <Gary.Sun at amd.com>; Li, Bingley <Bingley.Li at amd.com>
>Subject: Re: [PATCH 5/7] drm/amdgpu: don't disable MSI for GPU virtual function
>
>Tested with 5248e3d9, however issue is still reproduced in reinit case.
>
>+Jack,
>To bypass MSI enable/disable for reinit, any comment?
>>Sincerely Yours,
>Pixel
>
>
>
>
>
>
>
>On 23/10/2017, 6:57 PM, "Liu, Monk" <Monk.Liu at amd.com> wrote:
>
>>Please check commit "5248e3d9", your issue should already be fixed by that patch, please verify
>>
>>-----Original Message-----
>>From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf Of Pixel Ding
>>Sent: 2017年10月23日 18:04
>>To: amd-gfx at lists.freedesktop.org
>>Cc: Sun, Gary <Gary.Sun at amd.com>; Ding, Pixel <Pixel.Ding at amd.com>; Li, Bingley <Bingley.Li at amd.com>
>>Subject: [PATCH 5/7] drm/amdgpu: don't disable MSI for GPU virtual function
>>
>>From: pding <Pixel.Ding at amd.com>
>>
>>After calling pci_disable_msi() and pci_enable_msi(), VF can't receive interrupt anymore. This may introduce problems in module reloading or retrying init.
>>
>>Signed-off-by: pding <Pixel.Ding at amd.com>
>>---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>index c2d8255..a3314b5 100644
>>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>>@@ -229,8 +229,7 @@ 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) {
>>+		if (adev->pdev->msi_enabled || !pci_enable_msi(adev->pdev)) {
>> 			adev->irq.msi_enabled = true;
>> 			INIT_DEV_INFO(adev->dev, "amdgpu: using MSI.\n");
>> 		}
>>@@ -280,7 +279,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
>> 	if (adev->irq.installed) {
>> 		drm_irq_uninstall(adev->ddev);
>> 		adev->irq.installed = false;
>>-		if (adev->irq.msi_enabled)
>>+		if (adev->irq.msi_enabled && !amdgpu_sriov_vf(adev))
>> 			pci_disable_msi(adev->pdev);
>> 		flush_work(&adev->hotplug_work);
>> 		cancel_work_sync(&adev->reset_work);
>>--
>>2.9.5
>>
>>_______________________________________________
>>amd-gfx mailing list
>>amd-gfx at lists.freedesktop.org
>>https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list