From patchwork Wed Oct 19 08:33:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp225378wrs; Wed, 19 Oct 2022 02:42:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4X2jiQCtokXD0i9te+R5QQL8ZOR2wXL4M0w4mnJ0LHsm/Zalf0yaATuct+iMdk5wbNbCr8 X-Received: by 2002:a05:6402:254d:b0:45d:3ed3:8aa9 with SMTP id l13-20020a056402254d00b0045d3ed38aa9mr6433042edb.157.1666172579753; Wed, 19 Oct 2022 02:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172579; cv=none; d=google.com; s=arc-20160816; b=rk3itp2Nofe0haGNhr/AC0bYiRCNqmPiSbASFtntzK6teDNyV+xmb71FoGDu50s5JK bt5wvZMJno2mf44YYJfgQeh5pAdPahQKSyQC7fGXRB/AfdEZCY+HTcHnKWG2EPLh6KRe qUw2DgJfJASiY+QqsEpGjMfCzDrsMLK6ooEWouXVt8xMPAPiZJl7s44lTj3NuUMS6wpq zdxrSEjX/lk79AdVF14ZXXiNa6qM3D4Sv3uldDzBwJQuxWgRpjjsVC6iPhLB03AA0Thb UsduoKSwrIDJ5JGHQNMIXZKMc2BLPH51iShvsumPOkma6dmqJeZ73fmMqpi1SfKZz8LP ZLRg== 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=b/gssEaT72zinhV99eXUnvdx6oHKgFWsLcCEgSiK+o4=; b=kUq+/sgBEYO/TJeKcU0/1stM5kATufJLnSe1OEt+nB9NUhb16CVIUDhmSL0I9t0bgJ hu00izr+FvRcvtCdabX8CXtj04q0j3HZYMK8B7R1L7wKhGP4fPPcAMOLpOeUx1IxREJY PG0KI6NXCogxzTKnjTS350t8s6D/gQXsuLlTSBZ2dbB1U3nUBoVAtfu7YqsQea+seF2Z dLsDgWPok5CnsEI8w+ctWx7D0jYl9RieW3nPwwgb/qmsm4zckQl7rWjkZOJbY8BpazOk c2fti6+0OBtGf4neD+7ffXWcj7nJRDsg8DU7hbxDdRt3Lv/TCmgCKHnQ1fXFh/gmvv+f ahEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j7EK8f8Y; 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 s3-20020a17090699c300b0078b6559a610si16311195ejn.12.2022.10.19.02.42.33; Wed, 19 Oct 2022 02:42:59 -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=j7EK8f8Y; 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 S233735AbiJSJcJ (ORCPT + 99 others); Wed, 19 Oct 2022 05:32:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233638AbiJSJ20 (ORCPT ); Wed, 19 Oct 2022 05:28:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3996FC4D98; Wed, 19 Oct 2022 02:12:27 -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 D5B6F6188D; Wed, 19 Oct 2022 09:11:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6947C433D6; Wed, 19 Oct 2022 09:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170671; bh=ueAwCMAZ21Z3WumpFmAnkEqCVUSiHtJuAqmbEshjAq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j7EK8f8YD90Ea4KR5GM1yU76c586mleuF9cUkcE55Rcpn6Ce8KJilowwauRx8C9ZC QAdQ7rUXL/qdn7Cqmn96fTnqYHyUg4nFXjHUCRcKQJmXtx3fW1mVjte2pUSGhjLpQj 4O6ceEWPbeHuZ50B5slBeKQ9DHdTnrjzYpQObWoI= 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 6.0 742/862] drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF Date: Wed, 19 Oct 2022 10:33:49 +0200 Message-Id: <20221019083322.734583373@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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?1747108578544535174?= X-GMAIL-MSGID: =?utf-8?q?1747108578544535174?= 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 276ff6709881..9c3463b48139 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -583,6 +583,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):