From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 1/7] drm/amd/display: Don't overclock DCE 6 by 15%
Date: Thu, 31 Jul 2025 11:43:46 +0200 [thread overview]
Message-ID: <20250731094352.29528-2-timur.kristof@gmail.com> (raw)
In-Reply-To: <20250731094352.29528-1-timur.kristof@gmail.com>
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 6 which
is 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 6 display clock.
Fixes: 8cd61c313d8b ("drm/amd/display: Raise dispclk value for Polaris")
Fixes: dc88b4a684d2 ("drm/amd/display: make clk mgr soc specific")
Fixes: 3ecb3b794e2c ("drm/amd/display: dc/clk_mgr: add support for SI parts (v2)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
.../gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
index 0267644717b2..cfd7309f2c6a 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
@@ -123,11 +123,9 @@ static void dce60_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.50.1
next prev parent reply other threads:[~2025-07-31 9:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 9:43 [PATCH 0/7] DC: don't overclock DCE 6-10 and other fixes Timur Kristóf
2025-07-31 9:43 ` Timur Kristóf [this message]
2025-08-04 15:54 ` [PATCH 1/7] drm/amd/display: Don't overclock DCE 6 by 15% Alex Deucher
2025-08-12 22:11 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 2/7] drm/amd/display: Adjust DCE 8-10 clock, don't overclock " Timur Kristóf
2025-08-04 15:56 ` Alex Deucher
2025-08-04 16:35 ` Timur Kristóf
2025-08-04 16:57 ` Alex Deucher
2025-08-12 22:18 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 3/7] drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs Timur Kristóf
2025-08-04 15:57 ` Alex Deucher
2025-08-12 22:32 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 4/7] drm/amd/display: Fill display clock and vblank " Timur Kristóf
2025-08-04 15:58 ` Alex Deucher
2025-08-12 22:39 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 5/7] drm/amd/display: Don't warn when missing DCE encoder caps Timur Kristóf
2025-08-04 15:59 ` Alex Deucher
2025-08-12 22:47 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 6/7] drm/amd/display: Don't print errors for nonexistent connectors Timur Kristóf
2025-08-04 15:59 ` Alex Deucher
2025-08-12 22:59 ` Rodrigo Siqueira
2025-07-31 9:43 ` [PATCH 7/7] drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3 Timur Kristóf
2025-08-04 15:59 ` Alex Deucher
2025-08-12 23:46 ` Rodrigo Siqueira
2025-08-09 20:25 ` [PATCH 0/7] DC: don't overclock DCE 6-10 and other fixes Timur Kristóf
2025-08-18 3:01 ` Alex Hung
2025-08-18 14:44 ` Alex Deucher
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=20250731094352.29528-2-timur.kristof@gmail.com \
--to=timur.kristof@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).