drm/amdgpu: improve MSI-X handling
Subsystems (2)
PATCH 1/2 drm/amdgpu: improve MSI-X handling
Check the number of supported vectors and fall back to MSI if we return or error or 0 MSI-X vectors.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +11 -3
@@ -245,11 +245,19 @@ int amdgpu_irq_init(struct amdgpu_device *adev) adev->irq.msi_enabled = false;if (amdgpu_msi_ok (adev)) { -int nvec =pci_alloc_irq_vectors (adev->pdev,1 ,pci_msix_vec_count (adev->pdev), -PCI_IRQ_MSI |PCI_IRQ_MSIX ); +unsigned int flags; +int nvec =pci_msix_vec_count (adev->pdev); + +if (nvec <=0 ) { + flags =PCI_IRQ_MSI ; + nvec =1 ; + }else { + flags =PCI_IRQ_MSI |PCI_IRQ_MSIX ; + } + nvec =pci_alloc_irq_vectors (adev->pdev,1 , nvec, flags);if (nvec >0 ) { adev->irq.msi_enabled = true; -dev_dbg (adev->dev,"amdgpu: using MSI.\n" ); +dev_dbg (adev->dev,"amdgpu: using MSI/MSI-X.\n" ); } }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191003141326.7600-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu: disable MSI-X on APUs
Raven claims to support them, but seems to have problems. Stick with MSIs for now on APUs.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +2 -1
@@ -248,7 +248,8 @@ int amdgpu_irq_init(struct amdgpu_device *adev)unsigned int flags;int nvec =pci_msix_vec_count (adev->pdev); -if (nvec <=0 ) { +/* Raven claims to support MSI-X, but seems to have problems */ +if ((nvec <=0 ) || (adev->flags &AMD_IS_APU )) { flags =PCI_IRQ_MSI ; nvec =1 ; }else {
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191003141326.7600-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 2/2] drm/amdgpu: disable MSI-X on APUs
Thanks Alex and Tom to catch and revolve the issue . I didn't do enough test on original test.
We don't need to enable msix on APU . The serials is reviewed by shaoyun.liu <[email protected]>
Regards
shaoyun.liu
Quoted 14 lines · Alex Deucher
Raven claims to support them, but seems to have problems. Stick with MSIs for now on APUs.
Tested-by Tom St Denis <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c int amdgpu_irq_init(struct amdgpu_device *adev) · line 255
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +2
-1@@ -248,7 +248,8 @@ int amdgpu_irq_init(struct amdgpu_device *adev)unsigned int flags;int nvec =pci_msix_vec_count (adev->pdev); -if (nvec <=0 ) { +/* Raven claims to support MSI-X, but seems to have problems */ +if ((nvec <=0 ) || (adev->flags &AMD_IS_APU )) { flags =PCI_IRQ_MSI ; nvec =1 ; }else {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Series are Reviewed-by: Huang Rui <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, October 3, 2019 10:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: improve MSI-X handling
Check the number of supported vectors and fall back to MSI if we return or error or 0 MSI-X vectors.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +11 -3
@@ -245,11 +245,19 @@ int amdgpu_irq_init(struct amdgpu_device *adev) adev->irq.msi_enabled = false;if (amdgpu_msi_ok (adev)) { -int nvec =pci_alloc_irq_vectors (adev->pdev,1 ,pci_msix_vec_count (adev->pdev), -PCI_IRQ_MSI |PCI_IRQ_MSIX ); +unsigned int flags; +int nvec =pci_msix_vec_count (adev->pdev); + +if (nvec <=0 ) { + flags =PCI_IRQ_MSI ; + nvec =1 ; + }else { + flags =PCI_IRQ_MSI |PCI_IRQ_MSIX ; + } + nvec =pci_alloc_irq_vectors (adev->pdev,1 , nvec, flags);if (nvec >0 ) { adev->irq.msi_enabled = true; -dev_dbg (adev->dev,"amdgpu: using MSI.\n" ); +dev_dbg (adev->dev,"amdgpu: using MSI/MSI-X.\n" ); } }
--
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx