]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "drm/amd/display: Improve DisplayPort monitor interop"
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 24 Aug 2020 16:10:29 +0000 (12:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:49:20 +0000 (11:49 +0200)
This reverts commit 1adb2ff1f6b170cdbc3925a359c8f39d2215dc20.

This breaks display wake up in stable kernels (5.7.x and 5.8.x).

Note that there is no upstream equivalent to this
revert. This patch was targeted for stable by Sasha's stable
patch process. Presumably there are some other changes necessary
for this patch to work properly on stable kernels.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1266
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.7.x, 5.8.x
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 232cd690e30a27af768c085442e74d212c086cf3..31aa31c280ee62f62086c2718c7b038163a445b7 100644 (file)
@@ -3297,11 +3297,9 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx)
                        write_i2c_redriver_setting(pipe_ctx, false);
                }
        }
-
-       disable_link(pipe_ctx->stream->link, pipe_ctx->stream->signal);
-
        dc->hwss.disable_stream(pipe_ctx);
 
+       disable_link(pipe_ctx->stream->link, pipe_ctx->stream->signal);
        if (pipe_ctx->stream->timing.flags.DSC) {
                if (dc_is_dp_signal(pipe_ctx->stream->signal))
                        dp_set_dsc_enable(pipe_ctx, false);
index 6124af571bff659f46faecf2ff160906f9949b9e..91cd884d6f25712cde81d7384a62700f85f0f740 100644 (file)
@@ -1102,10 +1102,6 @@ static inline enum link_training_result perform_link_training_int(
        dpcd_pattern.v1_4.TRAINING_PATTERN_SET = DPCD_TRAINING_PATTERN_VIDEOIDLE;
        dpcd_set_training_pattern(link, dpcd_pattern);
 
-       /* delay 5ms after notifying sink of idle pattern before switching output */
-       if (link->connector_signal != SIGNAL_TYPE_EDP)
-               msleep(5);
-
        /* 4. mainlink output idle pattern*/
        dp_set_hw_test_pattern(link, DP_TEST_PATTERN_VIDEO_MODE, NULL, 0);
 
@@ -1555,12 +1551,6 @@ bool perform_link_training_with_retries(
        struct dc_link *link = stream->link;
        enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
 
-       /* We need to do this before the link training to ensure the idle pattern in SST
-        * mode will be sent right after the link training
-        */
-       link->link_enc->funcs->connect_dig_be_to_fe(link->link_enc,
-                                                       pipe_ctx->stream_res.stream_enc->id, true);
-
        for (j = 0; j < attempts; ++j) {
 
                dp_enable_link_phy(
@@ -1577,6 +1567,12 @@ bool perform_link_training_with_retries(
 
                dp_set_panel_mode(link, panel_mode);
 
+               /* We need to do this before the link training to ensure the idle pattern in SST
+                * mode will be sent right after the link training
+                */
+               link->link_enc->funcs->connect_dig_be_to_fe(link->link_enc,
+                                                               pipe_ctx->stream_res.stream_enc->id, true);
+
                if (link->aux_access_disabled) {
                        dc_link_dp_perform_link_training_skip_aux(link, link_setting);
                        return true;
index 2af1d74d16ad8ddae682b795db0aefae1d690802..b77e9dc1608634ca9ad7329e5ecd5081234b990e 100644 (file)
@@ -1069,17 +1069,8 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
                link->dc->hwss.set_abm_immediate_disable(pipe_ctx);
        }
 
-       if (dc_is_dp_signal(pipe_ctx->stream->signal)) {
+       if (dc_is_dp_signal(pipe_ctx->stream->signal))
                pipe_ctx->stream_res.stream_enc->funcs->dp_blank(pipe_ctx->stream_res.stream_enc);
-
-               /*
-                * After output is idle pattern some sinks need time to recognize the stream
-                * has changed or they enter protection state and hang.
-                */
-               if (!dc_is_embedded_signal(pipe_ctx->stream->signal))
-                       msleep(60);
-       }
-
 }