From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796386503; b=nCMg3CNeFQdLZopq7IFcCjEeO38R0eMnUfqX+9vtVUc2PmWmTAiAWVCfsH08bu/japLI gGEKIs6MZyJF5nAcUCj9VvImj6/lE0YbMHabXwjgMGoqWeFc0pSGsuvyAid2JL8QHozx3 SBOubVirvXYuJvcv7/dPLzX7kDmlNs7JEoabZaI27cqD4Vn5GuvvSeWkYojrtiEHAtkJP /YdhoKdM8FMpG6Obvo7f/t+iUFeiqVtt7zKnhMXYg9d83vK+gp8L8HaZVlDEDxBm1v/y9 Axp4Z4XPU71LVgCKtG5y5DJK3v4B940DNov6Ra/axlyYRb88HjZvDqyij3AdvJIjVow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386503; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=rNmoNeldsspcu88RTggh+pGFQ53OiuN+wGeRwrV2cew=; b=Rvy8mQknb3d8ZQJWMxdaVNW1C+QtZMU1eDZvIw5l7fLhv59XFQj17reN2DLkbUadOngt yGTdpb5rb8A5PkzPHjoAWfiT535g34vCR+lKejgY1y7WIg0I6jJAJEIXNVHr3XGMfzNJi JPGBA+Pn/RImBXgdSWq0q5eFPrurYSKZ/dUls/rAp+9vmkqL1jw6k0W/v41mUFXWWOPo4 GeieC04INrGCg/TTtHRICi6S9SahkcL5SqzqZJOM+Hc5bWVhCZwC7XETmTOPURYTnNyYt s08LNmqqrXqovc6kdPewDpZBNx0UZ2JzfMTIkTwIbxLBJX/JoHrvsJWBFGgdLVa8xxw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=2LLtuj37; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87983606A333; Fri, 4 Dec 2026 12:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=2LLtuj37 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CED51F000CE; Fri, 4 Dec 2026 12:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796386503; bh=rNmoNeldsspcu88RTggh+pGFQ53OiuN+wGeRwrV2cew=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2LLtuj3773R+20gYE0pXi7Zvo15yXL0aAjHego45oeUVqoChPGhrWkWWMoQWfIZOb kbELgAgO2T6FLkyqtfnwwJN3UvcHe+/ijjIUPGrZn2cVdaQdKTsZN73FW5zUQdMXL1 DI06dOmVmA6llReF/M0Jp6s9qef3W+WL2sVwr0U0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andrei Krautsou , Kenneth Feng , Alex Deucher Subject: [PATCH 6.6 0991/1167] drm/amdgpu: enable MGCG/FGCG/PERF_CLK for GC 11.0.2 Date: Fri, 4 Dec 2026 19:06:58 +0900 Message-ID: <20261204100728.016423612@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrei Krautsou commit 491aa2b083e18ef11d34f776bcb0e396a84f47e4 upstream. GC 11.0.2 (Navi33) never got the GFX MGCG, FGCG and PERF_CLK clock gating flags. GC 11.0.0, 11.0.1 and 11.0.4 have all three, GC 11.0.3 has MGCG. The gfx_v11_0 code behind these flags is shared by all GC 11 parts. Enable them for GC 11.0.2, same as for GC 11.0.0. Without the flags the driver does not clear the override bits in RLC_CGTT_MGCG_OVERRIDE (0x000605e7 under load), so this gating stays off. On RX 7600S the GFX clock is limited by the GFX TDC limit (68 A), in Linux and in Windows. With the gating off each MHz costs more GFX current, so PMFW stops at a lower clock than in Windows. vkpeak fp32-scalar for 300 s, median after the first 60 s, GFX current is about 68 A (TDC limit) in all cases: gfxclk VDDGFX GFLOPS current flags 2030 MHz 800 mV 8915 + MGCG 2261 MHz 873 mV 9921 + MGCG, FGCG, PERF_CLK 2314 MHz 894 mV 10104 Windows 11, AMD driver 910 mV 10157-10186 GFLOPS per MHz is the same, only the current per clock goes down. Windows shows other clock sensors, so there I compare GFLOPS only. With all three flags vkpeak is within 1% of Windows. MGCG gives most of the gain, FGCG and PERF_CLK add about 2% more. Tested on one laptop, ASUS TUF A16 FA617NS (RX 7600S, PMFW 82.97.0), Fedora kernel 7.2.11, Mesa 26.2.5, with the same flags set by a local debug patch. One 300 s vkpeak run for each setting and some gaming, no amdgpu errors in dmesg. Suspend/resume and long runs are not tested yet. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/6082 Signed-off-by: Andrei Krautsou Reviewed-by: Kenneth Feng Signed-off-by: Andrei Krautsou Signed-off-by: Alex Deucher (cherry picked from commit 85e5015b7879c04f7b9aabc865cdf7bcdf3d7470) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/soc21.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -604,7 +604,10 @@ static int soc21_common_early_init(void adev->cg_flags = AMD_CG_SUPPORT_GFX_CGCG | AMD_CG_SUPPORT_GFX_CGLS | + AMD_CG_SUPPORT_GFX_MGCG | AMD_CG_SUPPORT_REPEATER_FGCG | + AMD_CG_SUPPORT_GFX_FGCG | + AMD_CG_SUPPORT_GFX_PERF_CLK | AMD_CG_SUPPORT_VCN_MGCG | AMD_CG_SUPPORT_JPEG_MGCG | AMD_CG_SUPPORT_ATHUB_MGCG |