drm/amd/display: Train DPIA links with fallback
authorJimmy Kizito <Jimmy.Kizito@amd.com>
Wed, 7 Apr 2021 22:56:19 +0000 (18:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Oct 2021 19:51:34 +0000 (15:51 -0400)
[Why & How]
Conventional links are trained with fallback during sink detection.
Have DPIA links trained with fallback too.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

index 1c397d5551baf602544f4368cb1cee1bd0073d80..6b5ddf0a29c12846d2e0835fc04cf8b68fa6b63f 100644 (file)
@@ -1862,6 +1862,12 @@ static enum dc_status enable_link_dp(struct dc_state *state,
        /* get link settings for video mode timing */
        decide_link_settings(stream, &link_settings);
 
+       /* Train with fallback when enabling DPIA link. Conventional links are
+        * trained with fallback during sink detection.
+        */
+       if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA)
+               do_fallback = true;
+
 #if defined(CONFIG_DRM_AMD_DC_DCN)
        if (dp_get_link_encoding_format(&link_settings) == DP_128b_132b_ENCODING &&
                        pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT) {
index 13bf1d5ffb25e617c480d5a5f48ed9a54287f60c..eb320790523e414db10494fba12e574435e9b672 100644 (file)
@@ -2406,9 +2406,9 @@ bool perform_link_training_with_retries(
                        dc_link_dp_perform_link_training_skip_aux(link, &current_setting);
                        return true;
                } else {
-                       if (link->is_dig_mapping_flexible)
+                       if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA)
                                status = dc_link_dpia_perform_link_training(link,
-                                                                           link_setting,
+                                                                           &current_setting,
                                                                            skip_video_pattern);
                        else
                                status = dc_link_dp_perform_link_training(link,