Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1163999ybg; Tue, 2 Jun 2020 03:02:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG589Zn+BR4YpbOa8rK/ztm0xzmNpqAqkg69qDRCZ9hzKeS56xCmMN2tRwoO8A/OPI/m9b X-Received: by 2002:a17:906:4989:: with SMTP id p9mr23939920eju.417.1591092141022; Tue, 02 Jun 2020 03:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591092141; cv=none; d=google.com; s=arc-20160816; b=Yija5+B0DJBUdD9GVbDiz9vzJf+3uBt2Q26rxz5YP9uZxLKELjSUnsjQItN5yv7Ngn uJDmBfc5jyVBdWSpFX5fbqJvuOYGjkk+dGum1xPVfdEuBkaDGR7IN929y5PvhIiraWcs rHsdp+eIViPsv6+tZ1eiHPOEiG1rKWsz35AKeUTC285xnCV4PgR6B7m35staFnTeu6rB x6ufH5yOWQS2qOCjp2srX1dCCJwxF9IWviw9FVPdMWzxeRxzkH1IOYSWPecL/zNGP5fP MxombOgxN2puTvwSLLU+qx8cR1v8+NZPvojXqRTX7qLOc1AIC3QSRJZf3LDK3/EOJcLC /rqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Zp5PU9Twd2i2tzFPrLrjXtcDPzTLivpIOOvbhmocsuo=; b=C8zg/AvguNN/OVdH9KLMmddNQufvCNjhrVqPTOjvY39mbWYNcuZ2jN7coTYowEVO2G YCMNmYMl2HBAPVLDDAw8Yie8pO1dYKyUah4MzGB211ftN+B4PlODcx2Pkq6PzpLUYNkB pNQF+uwGx7arVmTUB3b4k302WU9+536CTHlNkz+UTubIYTNgcqQFea75iOLMjnhiwLr2 S2ju6pjVTohn0lFgAypP0XPrzWzjSeTASL8joNITXZ5dTZR9P52IQ/p+qi9MATaCEKK/ k/lYucoKdqS1K+Ug53q2KRptbbkBUSFoCzNKOdGbAAXplqCilWIXZ8LmvHyGva0jCB0X PvYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dmnR1WvZ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se4si1225373ejb.636.2020.06.02.03.01.49; Tue, 02 Jun 2020 03:02:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dmnR1WvZ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726785AbgFBKAC (ORCPT + 99 others); Tue, 2 Jun 2020 06:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgFBKAB (ORCPT ); Tue, 2 Jun 2020 06:00:01 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94601C061A0E for ; Tue, 2 Jun 2020 03:00:00 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d66so4825036pfd.6 for ; Tue, 02 Jun 2020 03:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Zp5PU9Twd2i2tzFPrLrjXtcDPzTLivpIOOvbhmocsuo=; b=dmnR1WvZuRPZ/6Vpb+2SuZ+t+QRjmdnWP4ZzKF3uTHDv6g1pEoMDEDg0XZp1RQS4Rc PcdwQZ29rNPnq3l2fjwqhuF7j/2HX+rBmez4tAy8HbfuXFzxbKgiqrjW/bkv/yD58r1Q RIPnaU6YMZn5W47hiL5Cwf7GTc+8XvqW2lhYOl2l6y2WsJw0EDbx5auoVaKZRGYT/MrW 65P2sOwN8DsDt4Wk/Hj4ZI7jftv3djCsQ51f81pX/h2RYakYDO5iyWeC2mruTm4m/oAt spMKkoM1c0u9+ks+AAa++E4S2fyAHS2aD1Hvrb5vDAG2sKTV79mdr4NuETxL7Y2knUFA aapg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Zp5PU9Twd2i2tzFPrLrjXtcDPzTLivpIOOvbhmocsuo=; b=qBMSsI1bn7m6/gw0Xqjbg2TKizTFQoaeyfEU7Eaiid0gp6X/J0TXLBt9sYEwXIV9Kd Ox7y63b2MSpNSp8dxMXnYg2gz6NeQWTmTDPQA/8n2PlFBTlKdK/thWbTkSm2noTgiNws pZVG+MrHPR+d5wrlXxSu/nr+cHklB7FBgfQhykZgQKeiYWm+/8llq5ESgaNkl//S5Dt1 xoY9wGLuwVSkI6JWNpXj8uixbCgsM/Ja625jjVShHV8fPFSfnAbuXiZVUC6Q9swvtB7c 8CJ2bVJTEA2lvFgf2a3FvVczvx9J2cthLuSidg3ZR3kApw6nHmCk9pzFzDmbsI0ebcBn EGNQ== X-Gm-Message-State: AOAM532NgoI/Shpw1QtDOTFhdnSIdTmP0pcUNKAF7fSKIIcEtywvaptZ ItXPJgYXqK2914LedqyP9e1BkhT/eoYN1R073Oc= X-Received: by 2002:a63:545a:: with SMTP id e26mr22863595pgm.4.1591092000175; Tue, 02 Jun 2020 03:00:00 -0700 (PDT) MIME-Version: 1.0 References: <20200602092030.31966-1-piotr.stankiewicz@intel.com> In-Reply-To: From: Andy Shevchenko Date: Tue, 2 Jun 2020 12:59:48 +0300 Message-ID: Subject: Re: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where appropriate To: "Stankiewicz, Piotr" Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Zhou , David Airlie , Daniel Vetter , "amd-gfx@lists.freedesktop.org" , dri-devel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 2, 2020 at 12:58 PM Stankiewicz, Piotr wrote: > > -----Original Message----- > > From: Andy Shevchenko > > Sent: Tuesday, June 2, 2020 11:49 AM > > To: Stankiewicz, Piotr > > Cc: Alex Deucher ; Christian K=C3=B6nig > > ; David Zhou ; David > > Airlie ; Daniel Vetter ; amd- > > gfx@lists.freedesktop.org; dri-devel ;= Linux > > Kernel Mailing List > > Subject: Re: [PATCH 07/15] drm/amdgpu: use PCI_IRQ_MSI_TYPES where > > appropriate > > On Tue, Jun 2, 2020 at 12:24 PM Piotr Stankiewicz > > wrote: ... > > > int nvec =3D pci_msix_vec_count(adev->pdev); > > > unsigned int flags; > > > > > > - if (nvec <=3D 0) { > > > + if (nvec > 0) > > > + flags =3D PCI_IRQ_MSI_TYPES; > > > + else > > > flags =3D PCI_IRQ_MSI; > > > - } else { > > > - flags =3D PCI_IRQ_MSI | PCI_IRQ_MSIX; > > > - } > > > + > > > /* we only need one vector */ > > > nvec =3D pci_alloc_irq_vectors(adev->pdev, 1, 1, flag= s); > > > > I'm not sure if you have seen my last comment internally about this pat= ch. > > > > I don't understand why we need these pci_msix_vec_count() followed by > > conditional at all. > > Perhaps we may simple drop all these and supply flag directly? > > > > But OTOH, I don't know the initial motivation, so, the above patch is > > non-intrusive and keeps original logic. > > > > Sorry, I must have misunderstood or missed that comment. I am happy > to do a V2 if dropping the conditional is preferable. Let's wait for AMD people to confirm either. --=20 With Best Regards, Andy Shevchenko