Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2351713pxb; Mon, 20 Sep 2021 19:48:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjEYvkKqn096+6FlRHtuTbimtLvyEAtAzT7k9Na9WFDwZOSlcMhlFYzP9jscnQ7srX1Ljy X-Received: by 2002:a17:906:4452:: with SMTP id i18mr30384621ejp.374.1632192483829; Mon, 20 Sep 2021 19:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192483; cv=none; d=google.com; s=arc-20160816; b=w8JPxFzUfs0722dYdRK7fYnWMWBAZA/OjPLtq1ZeOSw54EpC7/NFQ67qQbGDN+YSX+ 17FS1LteTot8lzpPn+qp+pc2rwpavLlB+7tOyamEcOastqkw9OfL/LFQLU2qQ7gQ30tw RONhavV4EKdxWz6ZTPTi/iXT9c4gbai76g5xtGJ/9olCRSdSuADPrflekfxLy5Wz7cz1 yjntEOBjZrIoxDgjQT2ApPMvWSINwtC21FbYvO6RXntVQveurYDleu/DA6MWuiuWGJ+f dvWMa3IFjuApXitBdDkzuHD0ynVi3mFn4fxd1nnwKFouohU5nViZkNm8QbU4iLvpgZgf b/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DHV2hLxmj38HADjoVqn57z6MjVmPMDBW4kvnZYwz4sc=; b=fOVvDS/ajtW+n00mZJGNiUc9BsMlN0FRw/2diVgm2hTtHF3BsrF4QkVTR3I1Ts+6wd 39Ra+ZxkR7DjA7y2cj6tAarWblIVfEqCLyFK5xIBGG9Mlz6q34KQ1OCdSfwfN0dH7NPd zQnHXAdE1BplX2yKpg1+1911GXH4De3jhGUAT8D4tOTP6wCCW6OCKxTh2oqkKw1ZHy4+ aDemjU14UtUYfyHZgy3twVqsGsQo+y6FD6MOqJtUZ7O443YkKHE6vfkk0EnCk09adVb2 xxKtmO9BvUdyWacrHJbVP3JUjodVRRC2PKkQgfUMD/+Tuo0TsddL/eH4iW1E76EdHql4 uQYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ai0gdjwY; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq16si17021885edb.303.2021.09.20.19.47.39; Mon, 20 Sep 2021 19:48:03 -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=@linuxfoundation.org header.s=korg header.b=Ai0gdjwY; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379670AbhITSbw (ORCPT + 99 others); Mon, 20 Sep 2021 14:31:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:44380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378748AbhITS0V (ORCPT ); Mon, 20 Sep 2021 14:26:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7AC7B61A8A; Mon, 20 Sep 2021 17:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158727; bh=fd05H0LoQ65GaBSvp+7+RMZ8oDLy3WPipdEO/gkQnMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ai0gdjwYU/SHXD3lemzmhVnpJ3Koxerd4UelO4qcUgHxxOSIaVmw0nGoH2lGJB09D ZG+XHjiqN9e1ui61VNiIpxnX2IZAXHOIyo26iFS3TzK4FQHlMYhDrprZdhjp6RBOH7 2MxPAocqqWuBxwDpF5t1tmudyWNBmYHQdaV97G70= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Bjorn Helgaas Subject: [PATCH 5.10 008/122] PCI: Add AMD GPU multi-function power dependencies Date: Mon, 20 Sep 2021 18:43:00 +0200 Message-Id: <20210920163916.037383090@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163915.757887582@linuxfoundation.org> References: <20210920163915.757887582@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evan Quan commit 60b78ed088ebe1a872ee1320b6c5ad6ee2c4bd9a upstream. Some AMD GPUs have built-in USB xHCI and USB Type-C UCSI controllers with power dependencies between the GPU and the other functions as in 6d2e369f0d4c ("PCI: Add NVIDIA GPU multi-function power dependencies"). Add device link support for the AMD integrated USB xHCI and USB Type-C UCSI controllers. Without this, runtime power management, including GPU resume and temp and fan sensors don't work correctly. Reported-at: https://gitlab.freedesktop.org/drm/amd/-/issues/1704 Link: https://lore.kernel.org/r/20210903063311.3606226-1-evan.quan@amd.com Signed-off-by: Evan Quan Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5346,7 +5346,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR PCI_CLASS_MULTIMEDIA_HD_AUDIO, 8, quirk_gpu_hda); /* - * Create device link for NVIDIA GPU with integrated USB xHCI Host + * Create device link for GPUs with integrated USB xHCI Host * controller to VGA. */ static void quirk_gpu_usb(struct pci_dev *usb) @@ -5355,9 +5355,11 @@ static void quirk_gpu_usb(struct pci_dev } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_CLASS_SERIAL_USB, 8, quirk_gpu_usb); +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID, + PCI_CLASS_SERIAL_USB, 8, quirk_gpu_usb); /* - * Create device link for NVIDIA GPU with integrated Type-C UCSI controller + * Create device link for GPUs with integrated Type-C UCSI controller * to VGA. Currently there is no class code defined for UCSI device over PCI * so using UNKNOWN class for now and it will be updated when UCSI * over PCI gets a class code. @@ -5370,6 +5372,9 @@ static void quirk_gpu_usb_typec_ucsi(str DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_CLASS_SERIAL_UNKNOWN, 8, quirk_gpu_usb_typec_ucsi); +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID, + PCI_CLASS_SERIAL_UNKNOWN, 8, + quirk_gpu_usb_typec_ucsi); /* * Enable the NVIDIA GPU integrated HDA controller if the BIOS left it