From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 507D1C433DF for ; Tue, 9 Jun 2020 13:39:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3045620760 for ; Tue, 9 Jun 2020 13:39:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3045620760 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C978689F73; Tue, 9 Jun 2020 13:39:34 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC7D189E08; Tue, 9 Jun 2020 09:18:12 +0000 (UTC) IronPort-SDR: /0w6LxmpUKXMLgGEwVwe65HHcg5oyI5hkSVndnvPKKOmB2IxgniiBo5ZoTfNKdMvThfdciOtv2 HEo8GrplISvA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 02:18:12 -0700 IronPort-SDR: YEBS/z/G5nU6E9C+Avc8F212L2Mu+I76kyWXn+RbuvYJ3OTuVcZyOfKpBFFnIEAXkSVGuzbp+t ny+MYPhF0XRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,491,1583222400"; d="scan'208";a="274539027" Received: from gklab-125-110.igk.intel.com ([10.91.125.110]) by orsmga006.jf.intel.com with ESMTP; 09 Jun 2020 02:18:09 -0700 From: Piotr Stankiewicz To: Bjorn Helgaas , linux-pci@vger.kernel.org Subject: [PATCH v3 07/15] drm/amdgpu: Use PCI_IRQ_MSI_TYPES where appropriate Date: Tue, 9 Jun 2020 11:18:02 +0200 Message-Id: <20200609091804.1220-1-piotr.stankiewicz@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200609091148.32749-1-piotr.stankiewicz@intel.com> References: <20200609091148.32749-1-piotr.stankiewicz@intel.com> X-Mailman-Approved-At: Tue, 09 Jun 2020 13:39:33 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Aurabindo Pillai , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Piotr Stankiewicz , dri-devel@lists.freedesktop.org, Daniel Vetter , Alex Deucher , shaoyunl , Sam Ravnborg , =?UTF-8?q?Christian=20K=C3=B6nig?= , Hawking Zhang MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index 0cc4c67f95f7..97141aa81f32 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -248,17 +248,8 @@ int amdgpu_irq_init(struct amdgpu_device *adev) adev->irq.msi_enabled = false; if (amdgpu_msi_ok(adev)) { - int nvec = pci_msix_vec_count(adev->pdev); - unsigned int flags; - - if (nvec <= 0) { - 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) { + if (pci_alloc_irq_vectors(adev->pdev, 1, 1, PCI_IRQ_MSI_TYPES) > 0) { adev->irq.msi_enabled = true; dev_dbg(adev->dev, "using MSI/MSI-X.\n"); } -- 2.17.2 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx