Skip to content

Commit bf078ed

Browse files
Ovidiu Buneagregkh
authored andcommitted
drm/amd/display: Remove PIPE_DTO_SRC_SEL programming from set_dtbclk_dto
commit a3e6079 upstream. There are cases where an OTG is remapped from driving a regular HDMI display to a DP/eDP display. There are also cases where DTBCLK needs to be enabled for HPO, but DTBCLK DTO programming may be done while OTG is still enabled which is dangerous as the PIPE_DTO_SRC_SEL programming may change the pixel clock generator source for a mapped and running OTG and cause it to hang. Remove the PIPE_DTO_SRC_SEL programming from this sequence since it is already done in program_pixel_clk(). Additionally, make sure that program_pixel_clk sets DTBCLK DTO as source for special HDMI cases. Cc: [email protected] # 6.11+ Reviewed-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Ovidiu Bunea <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ca99829 commit bf078ed

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,10 +1392,10 @@ static void dccg35_set_dtbclk_dto(
13921392

13931393
/* The recommended programming sequence to enable DTBCLK DTO to generate
13941394
* valid pixel HPO DPSTREAM ENCODER, specifies that DTO source select should
1395-
* be set only after DTO is enabled
1395+
* be set only after DTO is enabled.
1396+
* PIPEx_DTO_SRC_SEL should not be programmed during DTBCLK update since OTG may still be on, and the
1397+
* programming is handled in program_pix_clk() regardless, so it can be removed from here.
13961398
*/
1397-
REG_UPDATE(OTG_PIXEL_RATE_CNTL[params->otg_inst],
1398-
PIPE_DTO_SRC_SEL[params->otg_inst], 2);
13991399
} else {
14001400
switch (params->otg_inst) {
14011401
case 0:
@@ -1412,9 +1412,12 @@ static void dccg35_set_dtbclk_dto(
14121412
break;
14131413
}
14141414

1415-
REG_UPDATE_2(OTG_PIXEL_RATE_CNTL[params->otg_inst],
1416-
DTBCLK_DTO_ENABLE[params->otg_inst], 0,
1417-
PIPE_DTO_SRC_SEL[params->otg_inst], params->is_hdmi ? 0 : 1);
1415+
/**
1416+
* PIPEx_DTO_SRC_SEL should not be programmed during DTBCLK update since OTG may still be on, and the
1417+
* programming is handled in program_pix_clk() regardless, so it can be removed from here.
1418+
*/
1419+
REG_UPDATE(OTG_PIXEL_RATE_CNTL[params->otg_inst],
1420+
DTBCLK_DTO_ENABLE[params->otg_inst], 0);
14181421

14191422
REG_WRITE(DTBCLK_DTO_MODULO[params->otg_inst], 0);
14201423
REG_WRITE(DTBCLK_DTO_PHASE[params->otg_inst], 0);

0 commit comments

Comments
 (0)