Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2566368lkm; Mon, 20 Sep 2021 18:53:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlcouYVz1TPcGNFE6Ohq6zxE/UVdRfWfu9TTfipRL3GUU7noTTjPRCbwkvW1f/Ii7lmYOa X-Received: by 2002:a05:6e02:16c8:: with SMTP id 8mr12660310ilx.49.1632189101010; Mon, 20 Sep 2021 18:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189101; cv=none; d=google.com; s=arc-20160816; b=vGQWj/oolDEj4r4ZclKqO75nLyw6x7aTbIf1TXa7ACbMxoRpoFMyBmW8N56Vh84wGX 3EZYHWVaoTg4IvBtU21IMFC/l9OSLob6k1mfxbHiNyBaEXQE3J6trJVNdvwBWDZXPchC ToJDPdBP5JVixPf9xCeaLTicsdterCy2B9CJV2idZIZSbT5I4prRi8ivMpK1IJp1TupI EuutlTRuBEH9WgPt3/JFLUzfCHmb8UT90yExVqOL+6WO4SOjQX1DrUKKDSeM9dDmX2Vl Ak3rHAEIeUkxb2y9CTMJGMHYbU5U6dYK4F797YHcYN3uEs7T+AW3+0UEI74yESW55SKe XPWA== 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=YEqi8tUQshiyDngcqCPwfi18asXNsNV8jeecfXLDzfE=; b=WaPLX67NFzkMnwicI0WZcqLDOYBaov5mX5/Jv9zw+KGOgwTe4zXs7crn2060Lnl781 NJYIdXnKFn6fu2dekbx5YW/T3U75YrASFBS6WDDsRuEYzym5EKrs8kdeA7zvnbNpq/2q U/D4HstZTAfinBpq8uwndPlQQ2t01QRb249qzjAdK3OUyBtHjQioG7u96tbDTMD/TPS1 G8tr2OQOEyH9aEgOFSwAPNjv3vLkDrm5sInrO8o2m9edzKOz3FRSeGt/xrbD9MvxDP4R ilI9s0O5SIUNKl+CSj8/pc5wVN2O5di9isart/Inui724n29OHXMQdVPHK7nsh17wAjv 0VBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ysqmTDv4; 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 d3si14003215ilu.98.2021.09.20.18.51.29; Mon, 20 Sep 2021 18:51:40 -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=ysqmTDv4; 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 S1350733AbhITSAo (ORCPT + 99 others); Mon, 20 Sep 2021 14:00:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:54554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355193AbhITRyT (ORCPT ); Mon, 20 Sep 2021 13:54:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D1CA161184; Mon, 20 Sep 2021 17:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158012; bh=nK+11VL7k6V/+67a+Uxl5QmBHaZ716hS3u4SKKpoFJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ysqmTDv4GC/SXR0m3DyM9WsOTv7Vr9K3KTTXzlD6z18hqGJuXXVIemxuO1n5P5aqG rGilvf9LZZX7lPoRKLo2DFfklG2H7WKo4MbkBjpnMKEHFjfMccK6ZPNDSDsNLG58vv ov9d2gQlHpGEiZ4rb7LptSOL+q4FbgYT8v6G4G6o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Bjorn Helgaas Subject: [PATCH 4.19 255/293] PCI: Add AMD GPU multi-function power dependencies Date: Mon, 20 Sep 2021 18:43:37 +0200 Message-Id: <20210920163942.115450144@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 @@ -5254,7 +5254,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) @@ -5263,9 +5263,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. @@ -5278,6 +5280,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