Skip to content

Commit 30d937f

Browse files
Dillon Varonealexdeucher
authored andcommitted
drm/amd/display: Fallback to boot snapshot for dispclk
[WHY & HOW] If the dentist is unavailable, fallback to reading CLKIP via the boot snapshot to get the current dispclk. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Dillon Varone <Dillon.Varone@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 2ab7760) Cc: stable@vger.kernel.org
1 parent 389c202 commit 30d937f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ void dcn401_initialize_min_clocks(struct dc *dc)
7272
* audio corruption. Read current DISPCLK from DENTIST and request the same
7373
* freq to ensure that the timing is valid and unchanged.
7474
*/
75-
clocks->dispclk_khz = dc->clk_mgr->funcs->get_dispclk_from_dentist(dc->clk_mgr);
75+
if (dc->clk_mgr->funcs->get_dispclk_from_dentist) {
76+
clocks->dispclk_khz = dc->clk_mgr->funcs->get_dispclk_from_dentist(dc->clk_mgr);
77+
} else {
78+
clocks->dispclk_khz = dc->clk_mgr->boot_snapshot.dispclk * 1000;
79+
}
7680
}
7781
clocks->ref_dtbclk_khz = dc->clk_mgr->bw_params->clk_table.entries[0].dtbclk_mhz * 1000;
7882
clocks->fclk_p_state_change_support = true;

0 commit comments

Comments
 (0)