Skip to content

Commit f357c0c

Browse files
Timur KristófSasha Levin
authored andcommitted
drm/amd/display: Don't overclock DCE 6 by 15%
commit cb7b7ae upstream. 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: 8cd61c3 ("drm/amd/display: Raise dispclk value for Polaris") Fixes: dc88b4a ("drm/amd/display: make clk mgr soc specific") Fixes: 3ecb3b7 ("drm/amd/display: dc/clk_mgr: add support for SI parts (v2)") Signed-off-by: Timur Kristóf <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Alex Hung <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 427980c1cbd22bb256b9385f5ce73c0937562408) Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 937578e commit f357c0c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,9 @@ static void dce60_update_clocks(struct clk_mgr *clk_mgr_base,
123123
{
124124
struct clk_mgr_internal *clk_mgr_dce = TO_CLK_MGR_INTERNAL(clk_mgr_base);
125125
struct dm_pp_power_level_change_request level_change_req;
126-
int patched_disp_clk = context->bw_ctx.bw.dce.dispclk_khz;
127-
128-
/*TODO: W/A for dal3 linux, investigate why this works */
129-
if (!clk_mgr_dce->dfs_bypass_active)
130-
patched_disp_clk = patched_disp_clk * 115 / 100;
126+
const int max_disp_clk =
127+
clk_mgr_dce->max_clks_by_state[DM_PP_CLOCKS_STATE_PERFORMANCE].display_clk_khz;
128+
int patched_disp_clk = MIN(max_disp_clk, context->bw_ctx.bw.dce.dispclk_khz);
131129

132130
level_change_req.power_level = dce_get_required_clocks_state(clk_mgr_base, context);
133131
/* get max clock state from PPLIB */

0 commit comments

Comments
 (0)