Skip to content

Commit d8ed14f

Browse files
Lewis Huangalexdeucher
authored andcommitted
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>
1 parent 0a01378 commit d8ed14f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
19131913
bool can_apply_edp_fast_boot = false;
19141914
bool can_apply_seamless_boot = false;
19151915
bool keep_edp_vdd_on = false;
1916+
bool should_clean_dsc_block = true;
19161917
struct dc_bios *dcb = dc->ctx->dc_bios;
19171918
DC_LOGGER_INIT();
19181919

@@ -2005,9 +2006,15 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
20052006
power_down_all_hw_blocks(dc);
20062007

20072008
/* DSC could be enabled on eDP during VBIOS post.
2008-
* To clean up dsc blocks if eDP is in link but not active.
2009+
* To clean up dsc blocks if all eDP dpms_off is true.
20092010
*/
2010-
if (edp_link_with_sink && (edp_stream_num == 0))
2011+
for (i = 0; i < edp_stream_num; i++) {
2012+
if (!edp_streams[i]->dpms_off) {
2013+
should_clean_dsc_block = false;
2014+
}
2015+
}
2016+
2017+
if (should_clean_dsc_block)
20112018
clean_up_dsc_blocks(dc);
20122019

20132020
disable_vga_and_power_gate_all_controllers(dc);

0 commit comments

Comments
 (0)