Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp316626qtb; Wed, 19 Oct 2022 02:44:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Fe2mdvMZ56yi3f0CLmGnsFvzqKXEHAxSffkEPJh0nZvAivjJJsaiUaRbNmcrGFiMszmtP X-Received: by 2002:a17:907:6ea9:b0:794:8b93:2e44 with SMTP id sh41-20020a1709076ea900b007948b932e44mr532140ejc.407.1666172644677; Wed, 19 Oct 2022 02:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172644; cv=none; d=google.com; s=arc-20160816; b=zr0U/EsZ9+bGum5tl42DRetJ4eIZfSpEoHpWSoQqaFzNk/TVnW8rKbksO1MSpATe0d oC0lmPxbRTgvQ1TAzyHrPlPEsTfpBOGeKRbLbKtEIRw/qA3R5nkZASzIpDUOaoueheDe 87hbWaP+NjWs4mRWdZ+Z1LUUrhHRNscSTpX6/Prur6Gx9yVwRiVBKmKZ9agPYAmaJaj2 WILpbkK81zRu55lrl26HXwe42DQnS7Pxrvnht+RryFpyVK/ndUqRk70lqSiMmpYU/DKB Uy7he6wzJXo2Adp8QWBmsJ6dFCMuZsfuj3Zzikqd+8uVa1m3yx32BtW3Ro5yiTmtXTDW PhDQ== 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 Return-Path: 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.43.26; Wed, 19 Oct 2022 02:44:04 -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=20K=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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): -- 2.35.1