Skip to content

Commit fdee1dc

Browse files
Ovidiu Buneagregkh
authored andcommitted
drm/amd/display: Exit idle optimizations before accessing PHY
commit c488967 upstream. [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: Greg Kroah-Hartman <[email protected]>
1 parent dd8a734 commit fdee1dc

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

18931894

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

19681971
power_down_all_hw_blocks(dc);
19691972

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

0 commit comments

Comments
 (0)