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=1796389193; b=h9K2q+g791/roR/JdgOAT90FzRyuJaDBjX//NnRalDZC1nBZb41G5U4XhXTc1w7ZWne4 A2z2BS69+Tkcbb3YgVszULmGWvy7I09+/CWmFQtYOXq8hRL4tGSreIg5/7gn+qVch+2Qd XXlE9wKJSy9vnE1gvju2XSNEUbfYKzM9R1PqYtMIcv174FMu+8cQwqN1K/tQdRGdQIPJW PzNgp/SrlbapxWVjFABfuE2xL0yaR0YGCmW6rp9Pn7Go+8NAOmc/yDkju7dPBfhGFg6sO Pfqz6qwwoOxhWBPvUpE5ZOJ5xmoOKZEWeYGmv37BQhEpy4+hsyjlvMS6v83xRJK0Z5g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389193; 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=NwA/hmWmkGwvNZjXMfCuAEKhvBMZd6o01fUs3K7mYBM=; b=I4mG8HKTRNCABUllLZ9bVqxkOkL9eiMP2PyHaehodeulyepkJKrI202L803Vqmooi0xz XkPBpgQbebZdHFyv2KL03wEwS095fTR2o5byyjdlDqS5AFMNd4WVGDK4/j/Ji7zWzdlQp 1ZMdRb8NUZdlKWzjueMl4dYLae64swibQOgvnwL6SQAFMxjkh3F8ywTtC1JZ0P4SOUpRP QgvMxxZoR6WZhu21NjGl6WhugBUByohTMzXkli48BHMu0Z/nBVWa2Zca3U3xIQzts/cDG 3MhvYyiSsi2vATZqOoI7pTWm8wN5bwbs7p87dCFdyBgGNNHDPFXLS/JCbqWOOEOrhOg== 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=cDQDCMp3; 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 D18E3606A333; Fri, 4 Dec 2026 12:59:53 +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=cDQDCMp3 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C97C1F000C2; Fri, 4 Dec 2026 12:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389193; bh=NwA/hmWmkGwvNZjXMfCuAEKhvBMZd6o01fUs3K7mYBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cDQDCMp3OTq2kyN9Gs7Uy16sxng48bOF2KQ6z5+ASEhgQS2/UVMH+ea8IN4xW749o LmuxHjQViUYYUOeWJ9BSEvcjkCJQqmXVzJWBMHeSJDSBHCYoepyAps1rOlwLPqCxn0 wxwJDBpMlFqDsiSH/LdoTdq4SoTmRY2uvd5tSP14= 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.1 0900/1059] drm/amdgpu: enable MGCG/FGCG/PERF_CLK for GC 11.0.2 Date: Fri, 4 Dec 2026 19:07:11 +0900 Message-ID: <20261204100707.327423207@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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.1-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 @@ -637,7 +637,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 |