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=1796382218; b=y1eN8PHEkNzCMTvb/Fvve6a+QKDinTIZA7S9bGDgJ7gv5S0kJSXJiuDJIYQYHhmp9oFv 3Pk63bjO2rBbvTo2DiUHreecNNC5BvQ9jfjxQMxLlI0jZXGsljLh8KFoOfMGDZ9eA/vb2 U2how+evhRH3AxhQoAVgo3/hZG3A2X57Z7bTTqIz0kcv0G6iM+XJa5lPkvlFbIP6Qwgiq 9qQH7p2I1OPSD5/4M4lRPb8P0lliKyo47CNIPh01knxBtCCrZ5q0LLOp1o7ZII95sgiN9 idbMA4Sjb7LY12nacHrN+qvbT3vsYF8TKf77N/6u4YSUecR8ZPRAhSNnuBunJlz32WA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382218; 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=/9kD6Laf3U2k/juC2EgpH5ccB/XMw+KWhar+ZAVVRU8=; b=vtBGeJhWioqm4qJ7r2nKhly0XfLMQw+OwnTjfmxUVaCc/5MDbccNKI0Qxiga+RFP7TDh qCozLU287g6nED11fgNVmSvtNkY6zfsvrVhxr30Pg1K3shHrznTtz3/QZ7WMt1P+DPQ1q H9G2ih118JxfIDLHeLgrHfpqyNfONFIMFaqA6UUkmWArY3ftIsANLga9aQy6dtXzKH6ou DGyyRgDx/a8gxH6Kvfh3r27KZhZyFhkwatsJkdfBP39TDOGvGWRjzCC1dplmhdRvdiwEf d/cV8jeiPB8ibvsdZSk7NKJc+ew8RiEagtNFEAOaWvmeOtbwxlmZ6LGYXXOcwHI9ACg== 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=DWZGZvfM; 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 DAA81606A322; Fri, 4 Dec 2026 11:03:38 +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=DWZGZvfM Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5458E1F000C2; Fri, 4 Dec 2026 11:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382218; bh=/9kD6Laf3U2k/juC2EgpH5ccB/XMw+KWhar+ZAVVRU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DWZGZvfMpMcpd4ZCxtOQFBtv41/IbSIi1LYcPSkinYPwUMuPQdg7T8L8dnmIK/LFK oky9tphw4zkgmn9O4GJb3SaeyDDhAf3UYaYj8Im4pYi3u1SU6bSiU2ucplwvLa4LuZ hfIh/U5zk00Vu4apEqKfF6woJZGNWQkcm2WQxLVQ= 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.18 357/703] drm/amdgpu: enable MGCG/FGCG/PERF_CLK for GC 11.0.2 Date: Fri, 4 Dec 2026 19:04:16 +0900 Message-ID: <20261204100637.308706402@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-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 @@ -613,7 +613,10 @@ static int soc21_common_early_init(struc 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 |