Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1141507ybg; Tue, 2 Jun 2020 02:23:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8BQ5D9ghIdmMsefmgDKQ5i2sYDxEkCf2u8vfXKJrug7axJbkuhLoRUg4nhU4VICfNVn00 X-Received: by 2002:aa7:d79a:: with SMTP id s26mr23993563edq.202.1591089791317; Tue, 02 Jun 2020 02:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591089791; cv=none; d=google.com; s=arc-20160816; b=rjwMFmH3lGpxsszJw3UZpNhsTWLfnLJvERTRcSR4dfgoClOorDKYK9jWkrCutGEjcd ZiQ1mNb8PQ530yC9RmHQ2ztgx2SlDBpDBQhS9hIcafT/5cEjjVrLS1PpTQ4O+dHmXE6z b5m3Bd532k62WuY0YZZHyiNi+Tc1H/WdQUR/JW0s1DQLbRFcd3MFKLhis5wbIYnzr+n3 +wVkv28TsrL4PYfpEXKNw4mODuIwvUS8aQLLBNjapkOvtaOROgvi8ocGU+lDcGN/n9eS boyqiUufi+nQ+I6KmZiHXo7ocLAzHs4ydHEzKy0dSimNzNRVSoRro3mMsA6NwPmUPknC nnuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=dCYHDT+uMYqHcziJfLiiOrc9kz3OTk+gsLkfXI2lOr0=; b=CvcJ+hwPkp+LVfeaHc7bPCf0XMqwNgeKH2uFIepYHgL5A4brV9LKXEr2FUziS72UI4 wOPrAVLM7u7ujt7tH9Gxc7VSpGdcG/KrqvOpjCmEqc4/Fyk5vRZ3ARueS3bdPujPE20A v9B5voC1I5GFRUJhyAPDZvLIBExYxXTIJv+JQi98/xRDNJSaZtiy97cBGI8RZpYAuN3f NywdA7aBNVJcXshohDegbzDQj6f3i0QaHQeJAlW48VhiSfUbOr1+jKtpATYoB9wKzJot mJbZAPgu7eunY3U9GAaOG2H5HrH7laxp74gqkFFqF9GJXJlK8V/ugeRhY7Ph6KkUEviv bf/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si1141932ejb.697.2020.06.02.02.22.48; Tue, 02 Jun 2020 02:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbgFBJUl (ORCPT + 99 others); Tue, 2 Jun 2020 05:20:41 -0400 Received: from mga17.intel.com ([192.55.52.151]:1742 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726708AbgFBJUl (ORCPT ); Tue, 2 Jun 2020 05:20:41 -0400 IronPort-SDR: vYnsB2sJya5NJzKW4VV9v6AVEKU7mYe9TWjAULT1d7yfrIbs8NF35FaVlL465CV/1Ma9t2wZKg ZnIwZrHncTew== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2020 02:20:40 -0700 IronPort-SDR: 2jrTq9czAJgHkfCg8Sfvuvet4XPOvwOSY4Atd02F/9QchcTH81ecRpuWw75snVAW5Anx6j1Jx0 5mzvQcFm0VTw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,463,1583222400"; d="scan'208";a="312219453" Received: from gklab-125-110.igk.intel.com ([10.91.125.110]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jun 2020 02:20:38 -0700 From: Piotr Stankiewicz To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Zhou , David Airlie , Daniel Vetter Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Piotr Stankiewicz Subject: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate Date: Tue, 2 Jun 2020 11:20:30 +0200 Message-Id: <20200602092030.31966-1-piotr.stankiewicz@intel.com> X-Mailer: git-send-email 2.17.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Andy Shevchenko --- 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