drm/amd/display: Fix eDP will flash when boot to OS
authorBrandon Syu <Brandon.Syu@amd.com>
Wed, 3 Nov 2021 04:11:28 +0000 (12:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Nov 2021 19:45:01 +0000 (14:45 -0500)
[WHY]
With eDP DSC enabled and set 4K 60Hz, there would be screen
corruption when booting to OS or enabling the driver.

[HOW]
Avoid powering down VDD when we cannot apply eDP fast boot.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Brandon Syu <Brandon.Syu@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/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 2bd27c5..84f3545 100644 (file)
@@ -6045,7 +6045,10 @@ bool is_edp_ilr_optimization_required(struct dc_link *link, struct dc_crtc_timin
 
        req_bw = dc_bandwidth_in_kbps_from_timing(crtc_timing);
 
-       decide_edp_link_settings(link, &link_setting, req_bw);
+       if (!crtc_timing->flags.DSC)
+               decide_edp_link_settings(link, &link_setting, req_bw);
+       else
+               decide_edp_link_settings_with_dsc(link, &link_setting, req_bw, LINK_RATE_UNKNOWN);
 
        if (link->dpcd_caps.edp_supported_link_rates[link_rate_set] != link_setting.link_rate ||
                        lane_count_set.bits.LANE_COUNT_SET != link_setting.lane_count) {
index 665cf58..3d42158 100644 (file)
@@ -1833,7 +1833,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
                        }
                }
                // We are trying to enable eDP, don't power down VDD
-               if (edp_stream_num)
+               if (edp_stream_num && can_apply_edp_fast_boot)
                        keep_edp_vdd_on = true;
        }