dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate
@ 2020-06-02  9:20 Piotr Stankiewicz
  2020-06-02  9:49 ` Andy Shevchenko
  2020-06-02 13:35 ` Ruhl, Michael J
  0 siblings, 2 replies; 9+ messages in thread
From: Piotr Stankiewicz @ 2020-06-02  9:20 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Daniel Vetter
  Cc: Piotr Stankiewicz, dri-devel, amd-gfx, linux-kernel

Seeing as there is shorthand available to use when asking for any type
of interrupt, or any type of message signalled interrupt, leverage it.

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 5ed4227f304b..6dbe173a9fd4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -251,11 +251,11 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
 		int nvec = pci_msix_vec_count(adev->pdev);
 		unsigned int flags;
 
-		if (nvec <= 0) {
+		if (nvec > 0)
+			flags = PCI_IRQ_MSI_TYPES;
+		else
 			flags = PCI_IRQ_MSI;
-		} else {
-			flags = PCI_IRQ_MSI | PCI_IRQ_MSIX;
-		}
+
 		/* we only need one vector */
 		nvec = pci_alloc_irq_vectors(adev->pdev, 1, 1, flags);
 		if (nvec > 0) {
-- 
2.17.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-02 14:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  9:20 [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate Piotr Stankiewicz
2020-06-02  9:49 ` Andy Shevchenko
2020-06-02  9:57   ` Stankiewicz, Piotr
2020-06-02  9:59     ` Andy Shevchenko
2020-06-02 13:35 ` Ruhl, Michael J
2020-06-02 14:00   ` Andy Shevchenko
2020-06-02 14:21     ` Alex Deucher
2020-06-02 14:35       ` Andy Shevchenko
2020-06-02 14:39         ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).