Skip to content

Commit f6015da

Browse files
Alvin Leealexdeucher
authored andcommitted
drm/amd/display: Fix DTBCLK disable requests and SRC_SEL programming
[Description] - When transitioning FRL / DP2 is not required, we will always request DTBCLK = 0Mhz, but PMFW returns the min freq - This causes us to make DTBCLK requests every time we call optimize after transitioning from FRL to non-FRL - If DTBCLK is not required, request the min instead (then we only need to make 1 extra request at boot time) - Also when programming PIPE_DTO_SRC_SEL, don't programming for DP first, just programming once for the required selection (programming DP on an HDMI connection then switching back causes corruption) Reviewed-by: Dillon Varone <[email protected]> Acked-by: Jasdeep Dhillon <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 7a259c6 commit f6015da

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base,
438438
}
439439

440440
if (!new_clocks->dtbclk_en) {
441-
new_clocks->ref_dtbclk_khz = 0;
441+
new_clocks->ref_dtbclk_khz = clk_mgr_base->bw_params->clk_table.entries[0].dtbclk_mhz * 1000;
442442
}
443443

444444
/* clock limits are received with MHz precision, divide by 1000 to prevent setting clocks at every call */

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,7 @@ static void dccg32_set_dtbclk_dto(
225225
} else {
226226
REG_UPDATE_2(OTG_PIXEL_RATE_CNTL[params->otg_inst],
227227
DTBCLK_DTO_ENABLE[params->otg_inst], 0,
228-
PIPE_DTO_SRC_SEL[params->otg_inst], 1);
229-
if (params->is_hdmi)
230-
REG_UPDATE(OTG_PIXEL_RATE_CNTL[params->otg_inst],
231-
PIPE_DTO_SRC_SEL[params->otg_inst], 0);
232-
228+
PIPE_DTO_SRC_SEL[params->otg_inst], params->is_hdmi ? 0 : 1);
233229
REG_WRITE(DTBCLK_DTO_MODULO[params->otg_inst], 0);
234230
REG_WRITE(DTBCLK_DTO_PHASE[params->otg_inst], 0);
235231
}

0 commit comments

Comments
 (0)