Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2370039pxb; Mon, 20 Sep 2021 20:25:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyecsg4oTT9yp2rA418iZmuYKUt0sO3Cqr3YKgUEhubpMJgvk14++XYajLEzAPq9A8ND+/s X-Received: by 2002:a17:906:c205:: with SMTP id d5mr32624010ejz.74.1632194712216; Mon, 20 Sep 2021 20:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632194712; cv=none; d=google.com; s=arc-20160816; b=VVIq8u9n9MTlflsx02A1y3mCE9jME4kWaTiC7ktOLHOFlEFNPo8sBC23F1/FpaVI/Y 3X74e5CN7ghMbgOU8CiV/S1wSYnf1cj8on4yXO1dUUGEsjOFsf4vR3NO2hWE1/flFLpa sNp6SPsDQgCmwtKA8g3ZH1dW3T2GuyiwOA7MTQH25rnU2oVdExpnJvz9rqwBhJRrdGJ2 qQfxxVhlkN7AO5Sliq92zdYA1dlcARIfy2x97blQVL4g2j/pmCD8rOd6G/fPaTMLpbyO Z/mbye3FXmGezNwp9Lt9MeEWu3xJDRmLK2zcQl/JZC3pkUlcd6nOk9jsPJhUCZL1nS6S y6oA== 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=YyQMGA+xx8gnhf+mvB1MYlNfHTZU00YZ6cXkWsxLPhc=; b=lfIagHYLi1LIqnL6DVwIJTRZeXsGWofqK2BKSTnW2jZelzVVojPprjNSxYoJVmRqVW bKE5p9vGjjJpZPA/Hmq6OWGBQ1ywzw+c3EV9yzWszDpYg078jZlSb/CT8MpBtbJY0oqm Jqi5qKIfaWT3F6zABG2dEVbV1aLcQvE5lxLdh9FgAkfliA0WV5ChWF8I3CBkPwQvAkA1 5ws+G6nuVlUxsweKUhdSfvgYISK2OszXPbwCrOP94mAbFBhHmNH7v4TLPq8eWRi+hMlA unEB7olroKiEFo3Fp1dMGEeuXNH17sbGS2tKdDs5G/pDBTBkSMk5Bnpku/kQBIKOMFT9 qGcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ymvf4Y83; 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 p15si23562629edj.97.2021.09.20.20.24.47; Mon, 20 Sep 2021 20:25:12 -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=ymvf4Y83; 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 S1352012AbhITSX1 (ORCPT + 99 others); Mon, 20 Sep 2021 14:23:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:38976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376384AbhITSQR (ORCPT ); Mon, 20 Sep 2021 14:16:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E63D663292; Mon, 20 Sep 2021 17:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158525; bh=v/tayfpX1bOz7k2xErtAMSvzzuqhs/FPU1R4fo7tjMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ymvf4Y839WPtkczEbAEuQn1PrG0K3AzHrxnmbkN943xthhMBOSm36U1+7cO9jvuP0 nK+mCTbVcJqLgD0YxrrUVlF5LOFBLvR2Fpn1XZxVqzk/EIGOXVUbKlQqKwbom3dXnS 3OggPY8GpqNrP4kb2aJS/JmXOTADNzObiW+soF/c= 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.4 197/260] PCI: Add AMD GPU multi-function power dependencies Date: Mon, 20 Sep 2021 18:43:35 +0200 Message-Id: <20210920163937.804777673@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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 @@ -5394,7 +5394,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) @@ -5403,9 +5403,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. @@ -5418,6 +5420,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