drm/amd/display: Change clean dsc blocks condition in accelerated mode

[Why]
On system resume from S4 with the lid closed,
DSC was not cleared because DPMS was already off.

[How]
In accelerated mode, to clean up DSC blocks if eDP dpms off is true
to align the DSC and dpms state when we are not in fast boot and
seamless boot.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Lewis Huang <Lewis.Huang@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lewis Huang 2025-10-07 16:46:59 +08:00 committed by Alex Deucher
parent 0a013785a2
commit d8ed14f1dc

View File

@ -1913,6 +1913,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
bool can_apply_edp_fast_boot = false;
bool can_apply_seamless_boot = false;
bool keep_edp_vdd_on = false;
bool should_clean_dsc_block = true;
struct dc_bios *dcb = dc->ctx->dc_bios;
DC_LOGGER_INIT();
@ -2005,9 +2006,15 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
power_down_all_hw_blocks(dc);
/* DSC could be enabled on eDP during VBIOS post.
* To clean up dsc blocks if eDP is in link but not active.
* To clean up dsc blocks if all eDP dpms_off is true.
*/
if (edp_link_with_sink && (edp_stream_num == 0))
for (i = 0; i < edp_stream_num; i++) {
if (!edp_streams[i]->dpms_off) {
should_clean_dsc_block = false;
}
}
if (should_clean_dsc_block)
clean_up_dsc_blocks(dc);
disable_vga_and_power_gate_all_controllers(dc);