Skip to content

Commit c6ac25f

Browse files
Chris Parkalexdeucher
authored andcommitted
drm/amd/display: Remove DTB DTO on CLK update
[Why] DTB DTO is programmed more correctly during link enable. Programming them on CLK update which may arrive frequently and sporadically per flip throws off DTB DTO. [How] Remove DTB DTO programming on clock update. Reviewed-by: Alvin Lee <[email protected]> Acked-by: Jasdeep Dhillon <[email protected]> Signed-off-by: Chris Park <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4670ac7 commit c6ac25f

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -233,41 +233,6 @@ void dcn32_init_clocks(struct clk_mgr *clk_mgr_base)
233233
DC_FP_END();
234234
}
235235

236-
static void dcn32_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr,
237-
struct dc_state *context,
238-
int ref_dtbclk_khz)
239-
{
240-
struct dccg *dccg = clk_mgr->dccg;
241-
uint32_t tg_mask = 0;
242-
int i;
243-
244-
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
245-
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
246-
struct dtbclk_dto_params dto_params = {0};
247-
248-
/* use mask to program DTO once per tg */
249-
if (pipe_ctx->stream_res.tg &&
250-
!(tg_mask & (1 << pipe_ctx->stream_res.tg->inst))) {
251-
tg_mask |= (1 << pipe_ctx->stream_res.tg->inst);
252-
253-
dto_params.otg_inst = pipe_ctx->stream_res.tg->inst;
254-
dto_params.ref_dtbclk_khz = ref_dtbclk_khz;
255-
256-
if (is_dp_128b_132b_signal(pipe_ctx)) {
257-
dto_params.pixclk_khz = pipe_ctx->stream->phy_pix_clk;
258-
259-
if (pipe_ctx->stream_res.audio != NULL)
260-
dto_params.req_audio_dtbclk_khz = 24000;
261-
}
262-
if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
263-
dto_params.is_hdmi = true;
264-
265-
dccg->funcs->set_dtbclk_dto(clk_mgr->dccg, &dto_params);
266-
//dccg->funcs->set_audio_dtbclk_dto(clk_mgr->dccg, &dto_params);
267-
}
268-
}
269-
}
270-
271236
/* Since DPPCLK request to PMFW needs to be exact (due to DPP DTO programming),
272237
* update DPPCLK to be the exact frequency that will be set after the DPPCLK
273238
* divider is updated. This will prevent rounding issues that could cause DPP
@@ -447,8 +412,6 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base,
447412
/* DCCG requires KHz precision for DTBCLK */
448413
clk_mgr_base->clks.ref_dtbclk_khz =
449414
dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_DTBCLK, khz_to_mhz_ceil(new_clocks->ref_dtbclk_khz));
450-
451-
dcn32_update_clocks_update_dtb_dto(clk_mgr, context, clk_mgr_base->clks.ref_dtbclk_khz);
452415
}
453416

454417
if (dc->config.forced_clocks == false || (force_reset && safe_to_lower)) {

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ static const struct dc_debug_options debug_defaults_diags = {
743743
.dmub_command_table = true,
744744
.enable_tri_buf = true,
745745
.use_max_lb = true,
746-
.force_disable_subvp = true
746+
.force_disable_subvp = true,
747747
};
748748

749749

0 commit comments

Comments
 (0)