From: Rosen Penev <rosenp@gmail.com>
To: stable@vger.kernel.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Xinhui Pan" <Xinhui.Pan@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
"Ray Wu" <ray.wu@amd.com>, "Wayne Lin" <wayne.lin@amd.com>,
"Mario Limonciello" <Mario.Limonciello@amd.com>,
"Roman Li" <Roman.Li@amd.com>, "Eric Yang" <Eric.Yang2@amd.com>,
"Tony Cheng" <Tony.Cheng@amd.com>,
"Mauro Rossi" <issor.oruam@gmail.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Alex Hung" <alex.hung@amd.com>,
amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM
DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCHv2 for 6.12 07/10] drm/amd/display: Adjust DCE 8-10 clock, don't overclock by 15%
Date: Tue, 31 Mar 2026 17:39:05 -0700 [thread overview]
Message-ID: <20260401003908.3438-8-rosenp@gmail.com> (raw)
In-Reply-To: <20260401003908.3438-1-rosenp@gmail.com>
From: Timur Kristóf <timur.kristof@gmail.com>
[ Upstream commit 1ae45b5d4f371af8ae51a3827d0ec9fe27eeb867 ]
Adjust the nominal (and performance) clocks for DCE 8-10,
and set them to 625 MHz, which is the value used by the legacy
display code in amdgpu_atombios_get_clock_info.
This was tested with Hawaii, Tonga and Fiji.
These GPUs can output 4K 60Hz (10-bit depth) at 625 MHz.
The extra 15% clock was added as a workaround for a Polaris issue
which uses DCE 11, and should not have been used on DCE 8-10 which
are already hardcoded to the highest possible display clock.
Unfortunately, the extra 15% was mistakenly copied and kept
even on code paths which don't affect Polaris.
This commit fixes that and also adds a check to make sure
not to exceed the maximum DCE 8-10 display clock.
Fixes: 8cd61c313d8b ("drm/amd/display: Raise dispclk value for Polaris")
Fixes: dc88b4a684d2 ("drm/amd/display: make clk mgr soc specific")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
.../drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
index 5dbe89d9b72d..6131ede2db7a 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
@@ -72,9 +72,9 @@ static const struct state_dependent_clocks dce80_max_clks_by_state[] = {
/* ClocksStateLow */
{ .display_clk_khz = 352000, .pixel_clk_khz = 330000},
/* ClocksStateNominal */
-{ .display_clk_khz = 600000, .pixel_clk_khz = 400000 },
+{ .display_clk_khz = 625000, .pixel_clk_khz = 400000 },
/* ClocksStatePerformance */
-{ .display_clk_khz = 600000, .pixel_clk_khz = 400000 } };
+{ .display_clk_khz = 625000, .pixel_clk_khz = 400000 } };
int dentist_get_divider_from_did(int did)
{
@@ -403,11 +403,9 @@ static void dce_update_clocks(struct clk_mgr *clk_mgr_base,
{
struct clk_mgr_internal *clk_mgr_dce = TO_CLK_MGR_INTERNAL(clk_mgr_base);
struct dm_pp_power_level_change_request level_change_req;
- int patched_disp_clk = context->bw_ctx.bw.dce.dispclk_khz;
-
- /*TODO: W/A for dal3 linux, investigate why this works */
- if (!clk_mgr_dce->dfs_bypass_active)
- patched_disp_clk = patched_disp_clk * 115 / 100;
+ const int max_disp_clk =
+ clk_mgr_dce->max_clks_by_state[DM_PP_CLOCKS_STATE_PERFORMANCE].display_clk_khz;
+ int patched_disp_clk = MIN(max_disp_clk, context->bw_ctx.bw.dce.dispclk_khz);
level_change_req.power_level = dce_get_required_clocks_state(clk_mgr_base, context);
/* get max clock state from PPLIB */
--
2.53.0
next prev parent reply other threads:[~2026-04-01 0:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 0:38 [PATCHv2 for 6.12 00/10] drm: amdgpu: backport suspend fixes for CI Rosen Penev
2026-04-01 0:38 ` [PATCHv2 for 6.12 01/10] drm/amd/amdgpu: decouple ASPM with pcie dpm Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 02/10] drm/amd/amdgpu: disable ASPM in some situations Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 03/10] drm/amd/display: Disable fastboot on DCE 6 too Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 04/10] drm/amd/display: Reject modes with too high pixel clock on DCE6-10 Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 05/10] drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 06/10] drm/amd/display: Fix DCE 6.0 and 6.4 PLL programming Rosen Penev
2026-04-01 0:39 ` Rosen Penev [this message]
2026-04-01 0:39 ` [PATCHv2 for 6.12 08/10] drm/amd/display: Disable scaling on DCE6 for now Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 09/10] drm/amd: Disable ASPM on SI Rosen Penev
2026-04-01 0:39 ` [PATCHv2 for 6.12 10/10] drm/amd/display: Correct logic check error for fastboot Rosen Penev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401003908.3438-8-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=Eric.Yang2@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Roman.Li@amd.com \
--cc=Tony.Cheng@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=issor.oruam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ray.wu@amd.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@amd.com \
--cc=timur.kristof@gmail.com \
--cc=wayne.lin@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox