Skip to content

Commit a1ec8cc

Browse files
Ovidiu BuneaSasha Levin
authored andcommitted
drm/amd/display: Exit idle optimizations before accessing PHY
[ Upstream commit c488967 ] [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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 1b04c4e commit a1ec8cc

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
@@ -1889,6 +1889,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
18891889
bool can_apply_edp_fast_boot = false;
18901890
bool can_apply_seamless_boot = false;
18911891
bool keep_edp_vdd_on = false;
1892+
struct dc_bios *dcb = dc->ctx->dc_bios;
18921893
DC_LOGGER_INIT();
18931894

18941895

@@ -1965,6 +1966,8 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
19651966
hws->funcs.edp_backlight_control(edp_link_with_sink, false);
19661967
}
19671968
/*resume from S3, no vbios posting, no need to power down again*/
1969+
if (dcb && dcb->funcs && !dcb->funcs->is_accelerated_mode(dcb))
1970+
clk_mgr_exit_optimized_pwr_state(dc, dc->clk_mgr);
19681971

19691972
power_down_all_hw_blocks(dc);
19701973

@@ -1977,6 +1980,8 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
19771980
disable_vga_and_power_gate_all_controllers(dc);
19781981
if (edp_link_with_sink && !keep_edp_vdd_on)
19791982
dc->hwss.edp_power_control(edp_link_with_sink, false);
1983+
if (dcb && dcb->funcs && !dcb->funcs->is_accelerated_mode(dcb))
1984+
clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);
19801985
}
19811986
bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 1);
19821987
}

0 commit comments

Comments
 (0)