diff options
| author | Jing Zhou <Jing.Zhou@amd.com> | 2026-11-05 23:20:58 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-11-18 01:46:56 -0500 |
| commit | eaf4ff850d97eb608482fa3497f1b89b2e628781 (patch) | |
| tree | 3f0eeb09ecb355980c0c56719c3b651095e3ef62 /tools/perf/scripts/python | |
| parent | 007e7bf5692d93535adf943cd93c0e49b4e20e9d (diff) | |
drm/amd/display: Seed boot clocks to avoid lowering pre-OS display clocks
[WHY]
USB4 DPIA HPD can arrive early in boot, before the first stream commit.
Its link detection runs prepare_phy_clocks(), which goes through
clk_mgr_exit_optimized_pwr_state() and clk_mgr_optimize_pwr_state()
and calls update_clocks(dc->current_state).
At that point both dc->current_state->bw_ctx.bw.dcn.clk and
clk_mgr->clks are still zero, because init_clocks() memsets them. On the
safe_to_lower path, dcn42_update_clocks() clamps the requested DPPCLK to
the 100MHz floor and programs it. This drops DPPCLK below what the
GOP-lit eDP pipe needs, and the panel flashes white.
[HOW]
1. In dcn42_init_clocks() and dcn42b_init_clocks(), seed clk_mgr->clks
dispclk/dppclk from the boot snapshot(10kHz units, x10).
2. Add a DC core helper, sync_current_state_clocks_from_clk_mgr().
After every hwss.init_hw() call (legacy_hardware_init, D0 entry in
dc_set_power_state, and dc_reinitialize_hardware), it copies
clk_mgr->clks into dc->current_state->bw_ctx.bw.dcn.clk for DCN.
A later update_clocks() before the first commit then sees the real
pre-OS clocks and does not lower them. Raising clocks is still
allowed and does not cause a flash.
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Cc: Charlene Liu <charlene.liu@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: ChiaHsuan Chung <chiahsuan.chung@amd.com>
Signed-off-by: Jing Zhou <Jing.Zhou@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2f289740a04f08a5ce4b5e3c69af6e32ab4a540e)
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
