Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1304831ybg; Tue, 2 Jun 2020 06:40:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6TXJ4EK1mky1SVIWivrwuloC/mnBRvcEOUPKihmp7kTgLTRxxxTHLgqxsgFpg4bGaqxGr X-Received: by 2002:aa7:d48f:: with SMTP id b15mr11121140edr.8.1591105243739; Tue, 02 Jun 2020 06:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591105243; cv=none; d=google.com; s=arc-20160816; b=E2cm/7It3sV1Kjr4hw8TDCXzzLDRfDeBUnSBT9c5bN1uOuxytA6f2/hSaFL2KrLnwX rv04ArE+zcgr9g7EVQYbsW8sJHuMxwyxeZAPwT3ptPS+9YDhK4WqgLeqJ5Oc4o0w+KV3 bpzV/cDyzFgPE9psiPYQ/ym4YBCdqQAfsEW8nZaaT0gNwvGmAwN0dHF/3F48/6BEmIuU 8QCF2aDXn2vXwUfuJ69nPgKH8ObdLeQSF1SNM0Tf0NDK68rcpupK49mEBM4iP2gS73ax mBrhFj5tazPWvTnzvGxnEnkTOKzb5JB19Cr80+akQfzxAgbyiKUm3PjGhGRgssrnyn3P pFRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=D3pbK0Q5+EeN532tjRtaByENYD6o/UbXIdotZSV0VrE=; b=cLG44BFq7yjxmKS05xaBjxLHA5UzZXjEOTfgBr6WzznR2o0RBVLpltAtMe5J/EIGaH NJ9NkOujl2kKrs2CGVOE0NwOqTooptWc1kyAmgVfED+LkUbLSnezmCRr7MRxHGZ779lv 3rOvwMrsLQB+S6ytfwId3JV1A9A9MC3jjZ90nvjd6zHMEYrzsQISz4rTuwtuH7ZfK+Jg RdzKoQBaKWMXq1HNITd21Owa2ITrqa9auq1BCpIuoaxipZQZdDlV+yaIoETutSjNV4J6 JdipcSVcGtB5p1976XfB0QIy6BIw/wLY+HzLZIbUwXlYmgsrQ1ErAgc8Q9JRzo2UY1Sb 5UKw== 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 e13si1543435ejd.417.2020.06.02.06.40.18; Tue, 02 Jun 2020 06:40:43 -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 S1727785AbgFBNg0 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 2 Jun 2020 09:36:26 -0400 Received: from mga01.intel.com ([192.55.52.88]:11395 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgFBNgZ (ORCPT ); Tue, 2 Jun 2020 09:36:25 -0400 IronPort-SDR: bvFYyemll5sTkaRpzI1aVTMRam3WvWHb5FVhKT9AvBO3010qUbA3LX4F3A4BXhMiNxFPK+2jsG G+ddehdN+G0A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2020 06:36:25 -0700 IronPort-SDR: NBeSQghNBhFX6gfvY+doY0ZyDPw4dDqR5/Hs8LXo5/2uJ8VK42VCv7OXn2DNZoegfHmCvIvTSb beQDtVJARb4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,464,1583222400"; d="scan'208";a="286653698" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 02 Jun 2020 06:36:24 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jun 2020 06:36:24 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.97]) by FMSMSX114.amr.corp.intel.com ([169.254.6.185]) with mapi id 14.03.0439.000; Tue, 2 Jun 2020 06:35:20 -0700 From: "Ruhl, Michael J" To: "Stankiewicz, Piotr" , Alex Deucher , =?iso-8859-1?Q?Christian_K=F6nig?= , David Zhou , David Airlie , Daniel Vetter CC: "Stankiewicz, Piotr" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate Thread-Topic: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate Thread-Index: AQHWOL8clbNxZ7bnykCB8ftlNPJ+z6jFUrZg Date: Tue, 2 Jun 2020 13:35:20 +0000 Message-ID: <14063C7AD467DE4B82DEDB5C278E8663010E23E538@FMSMSX108.amr.corp.intel.com> References: <20200602092030.31966-1-piotr.stankiewicz@intel.com> In-Reply-To: <20200602092030.31966-1-piotr.stankiewicz@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: dri-devel On Behalf Of >Piotr Stankiewicz >Sent: Tuesday, June 2, 2020 5:21 AM >To: Alex Deucher ; Christian K?nig >; David Zhou ; David >Airlie ; Daniel Vetter >Cc: Stankiewicz, Piotr ; dri- >devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; linux- >kernel@vger.kernel.org >Subject: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where >appropriate > >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; >- } Minor nit: Is it really necessary to set do this check? Can flags just be set? I.e.: flags = PCI_IRQ_MSI_TYPES; pci_alloc_irq_vector() tries stuff in order. If MSIX is not available, it will try MSI. M >+ > /* 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