Skip to content

Commit 3dc61a1

Browse files
Ayush Guptagregkh
authored andcommitted
drm/amd/display: fixed dcn30+ underflow issue
[ Upstream commit 37403ce ] [Why] Observing underflow on dcn30+ system config at 4k144hz [How] We set the UCLK hardmax on AC/DC switch if softmax is enabled and also on boot. While booting up the UCLK Hardmax is set to softmax before the init sequence and the init sequence resets the hardmax to UCLK max which enables P-state switching. Just added a conditional check to avoid setting hardmax on init. Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com> Reviewed-by: Martin Leung <Martin.Leung@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Ayush Gupta <ayugupta@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 86a159f commit 3dc61a1

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,8 @@ void dcn30_init_hw(struct dc *dc)
629629
if (dc->clk_mgr->funcs->notify_wm_ranges)
630630
dc->clk_mgr->funcs->notify_wm_ranges(dc->clk_mgr);
631631

632-
if (dc->clk_mgr->funcs->set_hard_max_memclk)
632+
//if softmax is enabled then hardmax will be set by a different call
633+
if (dc->clk_mgr->funcs->set_hard_max_memclk && !dc->clk_mgr->dc_mode_softmax_enabled)
633634
dc->clk_mgr->funcs->set_hard_max_memclk(dc->clk_mgr);
634635

635636
if (dc->res_pool->hubbub->funcs->force_pstate_change_control)

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void dcn31_init_hw(struct dc *dc)
284284
if (dc->clk_mgr->funcs->notify_wm_ranges)
285285
dc->clk_mgr->funcs->notify_wm_ranges(dc->clk_mgr);
286286

287-
if (dc->clk_mgr->funcs->set_hard_max_memclk)
287+
if (dc->clk_mgr->funcs->set_hard_max_memclk && !dc->clk_mgr->dc_mode_softmax_enabled)
288288
dc->clk_mgr->funcs->set_hard_max_memclk(dc->clk_mgr);
289289

290290
if (dc->res_pool->hubbub->funcs->force_pstate_change_control)

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ void dcn32_init_hw(struct dc *dc)
970970
if (dc->clk_mgr->funcs->notify_wm_ranges)
971971
dc->clk_mgr->funcs->notify_wm_ranges(dc->clk_mgr);
972972

973-
if (dc->clk_mgr->funcs->set_hard_max_memclk)
973+
if (dc->clk_mgr->funcs->set_hard_max_memclk && !dc->clk_mgr->dc_mode_softmax_enabled)
974974
dc->clk_mgr->funcs->set_hard_max_memclk(dc->clk_mgr);
975975

976976
if (dc->res_pool->hubbub->funcs->force_pstate_change_control)

0 commit comments

Comments
 (0)