Skip to content

Commit c488967

Browse files
Ovidiu Buneaalexdeucher
authored andcommitted
drm/amd/display: Exit idle optimizations before accessing PHY
[why & how] By default, DCN HW is in idle optimized state which does not allow access to PHY registers. If BIOS powers up the DCN, it is fine because they will power up everything. Only exit idle optimized state when not taking control from VBIOS. Fixes: be704e5 ("Revert "drm/amd/display: Exit idle optimizations before attempt to access PHY"") Reviewed-by: Charlene Liu <[email protected]> Signed-off-by: Ovidiu Bunea <[email protected]> Signed-off-by: Roman Li <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent f9d35b9 commit c488967

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
18911891
bool can_apply_edp_fast_boot = false;
18921892
bool can_apply_seamless_boot = false;
18931893
bool keep_edp_vdd_on = false;
1894+
struct dc_bios *dcb = dc->ctx->dc_bios;
18941895
DC_LOGGER_INIT();
18951896

18961897

@@ -1967,6 +1968,8 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
19671968
hws->funcs.edp_backlight_control(edp_link_with_sink, false);
19681969
}
19691970
/*resume from S3, no vbios posting, no need to power down again*/
1971+
if (dcb && dcb->funcs && !dcb->funcs->is_accelerated_mode(dcb))
1972+
clk_mgr_exit_optimized_pwr_state(dc, dc->clk_mgr);
19701973

19711974
power_down_all_hw_blocks(dc);
19721975

@@ -1979,6 +1982,8 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
19791982
disable_vga_and_power_gate_all_controllers(dc);
19801983
if (edp_link_with_sink && !keep_edp_vdd_on)
19811984
dc->hwss.edp_power_control(edp_link_with_sink, false);
1985+
if (dcb && dcb->funcs && !dcb->funcs->is_accelerated_mode(dcb))
1986+
clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);
19821987
}
19831988
bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 1);
19841989
}

0 commit comments

Comments
 (0)