Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp30593ybl; Tue, 27 Aug 2019 15:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgKeMYzZiJZL+iBOm5VtSsbw/+sByH5Ah11+nUyJ/kqs+y1NiN2dw47QfTmZ192p++S+km X-Received: by 2002:a62:cec4:: with SMTP id y187mr897022pfg.84.1566944072493; Tue, 27 Aug 2019 15:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566944072; cv=none; d=google.com; s=arc-20160816; b=wylW1b0UsqyW3PuDl65GRrr5LI8mB+3Xl++Yk++MvXQEums19uafBKVhQQt0fViS+6 VEElQ/njkOkQCAXmLxc9ynhhlMICbhvhdw+O5CurR3QsvrL4ZRoRE7rx1Pqq/XaMtfGR 3Qq4nQMv5gXt+6XdrFU5sK6nGoBmMlTLt+MiSGQbClw7v9OaBU22b+cGK4pGTyPj3ClS jrQ/108iM3YP1aLuFd7rl0doNc6JLV0pUxJ4XuNJtsa1dAeDR0qegpNX83xAqkDhjflz acWXrUCnXu3/NAZMyYxtHVb+ieFnSgLOjD+8Jr7FDTshVUR2tSYAAG5nsPk5zVuxXcJc FV0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m/PaYubDqT4klxlFEfMZrN7Kb217ZpR2jYg14zxTsF4=; b=GqRlPLzEWq/VbqbJ1HF96Q7QqWPpsfBFuROWKgEVVvckJWp/YsIiw8cBNg3Vx2Zx9C lq+fIZYL42LQaKadW7qMoUXD5nZ75yhlz5ZT+3uWAGLlPMW/Ir5KyawXHK9Tzd9AnZ5/ fuzzjBhh0Ra6jdpoPkznuKNrU+tfOQKSPPBB18SqvGFXiOz/FloeAk7tbrgN5jk+vjbr b/r5LYHMxH6PCN2fPhC94BOU21OAp+SrtQxGwXoR0WY/DdNDRdu6EZeObStfNjlfHHH/ Mv6I3Y/wpKKQhTd26OqXpmb43EiygQKHS8Yp/ecoU9Sm5v0yoaVTZa92kOifb/PxkT0Z Xjlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qY4Vfyb0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 196si530260pfz.277.2019.08.27.15.14.14; Tue, 27 Aug 2019 15:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qY4Vfyb0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726243AbfH0WNZ (ORCPT + 99 others); Tue, 27 Aug 2019 18:13:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:54806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfH0WNZ (ORCPT ); Tue, 27 Aug 2019 18:13:25 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D036120679; Tue, 27 Aug 2019 22:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566944004; bh=LZPQogWInSb9gqAI/aacGbig10OJaeQDStsJ1k9m4k8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qY4Vfyb0VjYNejMGwIgHw25hJrjYFb+65rOtdKARqBjG31pqtDOU7WfU9tXxDjYjo jPnwwr5yMWnzW5y6m1+X2akbYC87QcyyGv+tGBnMRnxtfq+6uD1FgObO18DFy7kPw/ zRECNK84asDwgGcK+jly/EWPp28g+asVgZxD8N1s= Date: Tue, 27 Aug 2019 17:13:21 -0500 From: Bjorn Helgaas To: Kai-Heng Feng Cc: Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Peter Wu , Mika Westerberg , Dave Airlie Subject: Re: [PATCH 1/2] PCI: Add a helper to check Power Resource Requirements _PR3 existence Message-ID: <20190827221321.GA9987@google.com> References: <20190827134756.10807-1-kai.heng.feng@canonical.com> <0379E973-651A-442C-AF74-51702388F55D@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0379E973-651A-442C-AF74-51702388F55D@canonical.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Peter, Mika, Dave] https://lore.kernel.org/r/20190827134756.10807-1-kai.heng.feng@canonical.com On Wed, Aug 28, 2019 at 12:58:28AM +0800, Kai-Heng Feng wrote: > at 23:25, Takashi Iwai wrote: > > On Tue, 27 Aug 2019 15:47:55 +0200, > > Kai-Heng Feng wrote: > > > A driver may want to know the existence of _PR3, to choose different > > > runtime suspend behavior. A user will be add in next patch. > > > > > > This is mostly the same as nouveau_pr3_present(). > > > > Then it'd be nice to clean up the nouveau part, too? > > nouveau_pr3_present() may call pci_d3cold_disable(), and my intention is to > only check the presence of _PR3 (i.e. a dGPU) without touching anything. It looks like Peter added that code with 279cf3f23870 ("drm/nouveau/acpi: use DSM if bridge does not support D3cold"). I don't understand the larger picture, but it is somewhat surprising that nouveau_pr3_present() *looks* like a simple predicate with no side-effects, but in fact it disables the use of D3cold in some cases. If the disable were moved to the caller, Kai-Heng's new interface could be used both places.