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=1796383802; b=Pe5U+0bCKGXNqPiQUUKV1ooU54uU6QiaiMEc5zfDLC5IhEYV5KhA6pQNf6MesnDOXcRN nZaO7O+m+gdlOemdkYZdEVRSjJGH8Od9Sv3XEQUKfTvKRYU60tVgcJo896UytAdPiXyAu nffiXFY3K05VDugDOuDV0BPyz8cax1Y024190t/DTH4ejSyTTIYuSH3mrTwRxhPwyLO40 WijUKr5T172n4KJqVTQ+zcVUqHo2Y4xkoW1jNZy8Bx85+vSHJlMh/llHCgyU9dlf8Bn1s qLB6wnItW9HWRzmKS/muY8yKFXFTQCICLY+42o9VPfKd3G44Vf7S/gZqdsjGSJ4AcZA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383802; 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=LSfQdLBhNZaUVNIlv7fvsQnXKc093bWsnlvjs9l22bg=; b=h1Tq8V1D/5x8F+pmLzbMmFOwz26+tzaAktHgUj1QaP16dvXpl40UOZ9fRoC5D8k2nZEg 260rn2kvu78Y8KGR6IP5BUNBCmeWpxOLd0gznypm91/KOigXbjoyiTIKCZwbsAEBbOir6 R4gYZEhuer84dNGUlESjDR+HKm+EoZp7+Ywe5oy7+DMswOOZZSpYyaKjY5bmVT8hAWC6t 1zo3AOceLrlmiZqj/leaPkdKRH/W6Vb6EKP3c1FFbLI8QsjUA6LmLbgg8/OkX+UmidYeF BOMMV2qam/Gxvyj3tMZkucxttzJcqHAy96LHDwAstZNU1Hwj/Yq29oT7xJR8B/NcfEg== 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=2FzZnVNc; 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 86FEC606A333; Fri, 4 Dec 2026 11:30:02 +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=2FzZnVNc Received: by smtp.kernel.org (Postfix) with ESMTPSA id 239ED1F0092C; Fri, 4 Dec 2026 11:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383802; bh=LSfQdLBhNZaUVNIlv7fvsQnXKc093bWsnlvjs9l22bg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2FzZnVNcZckfSKtTo7da7XCM5EdIiqScud06pXbutRSgYUuxhsFLnv0xvYdB8uFn0 Yi4KVt8pZkUbvmhs7S3qR3IjepA0llDt/ccCC7/WtBpySl+f9VrTDqYCC2pPdbdFLH gQPdqFUtCIRz184MnzfSdi+YxRCu2jCYLZcSPgBA= 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.12 331/555] drm/amdgpu: enable MGCG/FGCG/PERF_CLK for GC 11.0.2 Date: Fri, 4 Dec 2026 19:06:14 +0900 Message-ID: <20261204100622.499085118@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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 @@ -612,7 +612,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 |