Skip to content

Commit 31c2bf2

Browse files
Dmytro Laktyushkinalexdeucher
authored andcommitted
drm/amd/display: Fix DPSTREAM CLK on and off sequence
[Why] Secondary DP2 display fails to light up in some instances [How] Clock needs to be on when DPSTREAMCLK*_EN =1. This change moves dtbclk_p enable/disable point to make sure this is the case Reviewed-by: Charlene Liu <charlene.liu@amd.com> Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Daniel Miess <daniel.miess@amd.com> Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b5abd7f commit 31c2bf2

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,9 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
11831183
dto_params.timing = &pipe_ctx->stream->timing;
11841184
dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
11851185
if (dccg) {
1186-
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
11871186
dccg->funcs->disable_symclk32_se(dccg, dp_hpo_inst);
11881187
dccg->funcs->set_dpstreamclk(dccg, REFCLK, tg->inst, dp_hpo_inst);
1188+
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
11891189
}
11901190
} else if (dccg && dccg->funcs->disable_symclk_se) {
11911191
dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,

drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,18 +2790,17 @@ void dcn20_enable_stream(struct pipe_ctx *pipe_ctx)
27902790
}
27912791

27922792
if (dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
2793-
dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
2794-
dccg->funcs->set_dpstreamclk(dccg, DTBCLK0, tg->inst, dp_hpo_inst);
2795-
2796-
phyd32clk = get_phyd32clk_src(link);
2797-
dccg->funcs->enable_symclk32_se(dccg, dp_hpo_inst, phyd32clk);
2798-
27992793
dto_params.otg_inst = tg->inst;
28002794
dto_params.pixclk_khz = pipe_ctx->stream->timing.pix_clk_100hz / 10;
28012795
dto_params.num_odm_segments = get_odm_segment_count(pipe_ctx);
28022796
dto_params.timing = &pipe_ctx->stream->timing;
28032797
dto_params.ref_dtbclk_khz = dc->clk_mgr->funcs->get_dtb_ref_clk_frequency(dc->clk_mgr);
28042798
dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
2799+
dp_hpo_inst = pipe_ctx->stream_res.hpo_dp_stream_enc->inst;
2800+
dccg->funcs->set_dpstreamclk(dccg, DTBCLK0, tg->inst, dp_hpo_inst);
2801+
2802+
phyd32clk = get_phyd32clk_src(link);
2803+
dccg->funcs->enable_symclk32_se(dccg, dp_hpo_inst, phyd32clk);
28052804
} else {
28062805
if (dccg->funcs->enable_symclk_se)
28072806
dccg->funcs->enable_symclk_se(dccg, stream_enc->stream_enc_inst,

0 commit comments

Comments
 (0)