From patchwork Sat Oct 22 07:28:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7802 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1133976wrr; Sat, 22 Oct 2022 03:05:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6puUENW6+visfjlg2PiiR3HyWy/1iGL/m8gCW+nckPKIVzcR069rm987t+be7zsz3+zVCT X-Received: by 2002:a17:907:1687:b0:78e:4b6:1aff with SMTP id hc7-20020a170907168700b0078e04b61affmr18989142ejc.520.1666433157879; Sat, 22 Oct 2022 03:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666433157; cv=none; d=google.com; s=arc-20160816; b=mE/dleCjjvKUrmW/5uvmwG5ovWMpSkR2Xa7ILzqWGpJEE8T/i0PDP/BTRdQOvSpLBK sBm+kd9CrfiPi/xJBxCsFIhZD92jwAjvp/qA89JwioCiJftzPLgxoSIqrGLsUOsbVNSE fSycLp3EtxbBFQUohO+6Yt+UwPDQ5SlC8ECLLchEH977wL8L7LLL9dnyAljCgXw3DnMB pBWdrLEVy+SQFv3tspUWx1aMIvTM/vsY3F3jUlgS8hbMe2mr1KMSNxkP47Vd48qayT+z cdaHx3yYzkXNf44APEQC7AYrBgLzMlRo5YAwXhO0Bj+XZn7ZlPjCBrrqxbDr5bEdutjQ gqRQ== 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=toHBm9cliMBRRwVmFWHJh0D+AoyUzjQlzPqKqIc3bOE=; b=GwjGGPxllYvmLbCP7/vhSv2tjftO4jOw/i6ifdEXNil9i/eTwJ9G4Mn+W1P0qysJ6G xJTI86WddNf26nP5A87zdY1Y/n6DEgWziDXYALRTV+79bnStdZz1VXog+ke1HR49WA00 3J9EO7HoOn0Kz0Usr7CyebKPNK/GrdDnCAbkc3nyQGwKBPUZ5gjqwAebQ0AV6d+5BOuD Vm73LEKRnM9uSHzTM+0Emjh9+vTPv76gc/4iDiK+Efa17vxHxl9IuWhISzVr81y8CUYS CRCW50mrNNiD5QW9Ncd4uI07WEEA0TnjNYuG4feacU1U2wNSdyuDdKrzaD2VkcplPHTy U3Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=co16kPiT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170906600900b0078054af5eeasi20597472ejj.374.2022.10.22.03.05.33; Sat, 22 Oct 2022 03:05:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=co16kPiT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229792AbiJVKDv (ORCPT + 99 others); Sat, 22 Oct 2022 06:03:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbiJVKDI (ORCPT ); Sat, 22 Oct 2022 06:03:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8627430A42D; Sat, 22 Oct 2022 02:19:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0110C60BA9; Sat, 22 Oct 2022 08:02:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA901C433D7; Sat, 22 Oct 2022 08:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425764; bh=GE2YQiTOCkVprWu/xnAquC2VU2jYU3qYnrea42lOiBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=co16kPiTxzl20xiGBiXP/fqQ8Rr050toob6K5JFYbOV/Zsj/VwuZUqJ0gdhx5OBv5 z8NWwEGkATsh7mt6nLXD7kIvVyi2B+zUe1Urp70qDN2yC92URMGLKQN0Hqdb67CHnA Ksn3m44QK81LEolDTqOwnuSD5ByEE2BKfHzveEvw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Christian_K=C3=B6nig?= , Yifan Zha , Hawking Zhang , Alex Deucher , Sasha Levin Subject: [PATCH 5.19 608/717] drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF Date: Sat, 22 Oct 2022 09:28:07 +0200 Message-Id: <20221022072525.353474342@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747381815014278111?= X-GMAIL-MSGID: =?utf-8?q?1747381815014278111?= From: Yifan Zha [ Upstream commit 828418259254863e0af5805bd712284e2bd88e3b ] [Why] There is no CG(Clock Gating)/PG(Power Gating) requirement on SRIOV VF. For multi VF, VF should not enable any CG/PG features. For one VF, PF will program CG/PG related registers. [How] Do not set any cg/pg flag bit at early init under sriov. Acked-by: Christian König Signed-off-by: Yifan Zha Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/soc21.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 8d5c452a9100..6d3bfb0f0346 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -551,6 +551,10 @@ static int soc21_common_early_init(void *handle) AMD_PG_SUPPORT_JPEG | AMD_PG_SUPPORT_ATHUB | AMD_PG_SUPPORT_MMHUB; + if (amdgpu_sriov_vf(adev)) { + adev->cg_flags = 0; + adev->pg_flags = 0; + } adev->external_rev_id = adev->rev_id + 0x1; // TODO: need update break; case IP_VERSION(11, 0, 2):