]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Change clean dsc blocks condition in accelerated mode
authorLewis Huang <Lewis.Huang@amd.com>
Tue, 7 Oct 2025 08:46:59 +0000 (16:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 20 Oct 2025 22:26:27 +0000 (18:26 -0400)
[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>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

index 24184b4eb3529daf0da84e693c917e39b0ef4cd1..6b0566baa2f2799a4b7324af82ed4186d7796c07 100644 (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);