]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: Move verify link cap after read edid
authorWenjing Liu <Wenjing.Liu@amd.com>
Thu, 3 Aug 2017 17:57:05 +0000 (13:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:16:21 +0000 (18:16 -0400)
DP link layer test 400.1.1 fails intermittently.
The test device will pull hpd low immediately
after verify link cap.
Driver reads edid when hpd low that causes the test to fail.

Move read edid before verify link cap, so driver will
read edid before starting link training

Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@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 1279eb1dfc2edbce5b208079f391b8005f4e2856..72eb6af62f457987c68c72ec3b12d28ea3a431fc 100644 (file)
@@ -666,6 +666,22 @@ bool dc_link_detect(struct dc_link *link, bool boot)
                        break;
                }
 
+               if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
+                       sink_caps.transaction_type ==
+                       DDC_TRANSACTION_TYPE_I2C_OVER_AUX) {
+                       /*
+                        * TODO debug why Dell 2413 doesn't like
+                        *  two link trainings
+                        */
+                       if (is_mst_supported(link)) {
+                               link->verified_link_cap =
+                                               link->reported_link_cap;
+                       } else {
+                               dp_hbr_verify_link_cap(link,
+                                   &link->reported_link_cap);
+                       }
+               }
+
                /* HDMI-DVI Dongle */
                if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A &&
                                !sink->edid_caps.edid_hdmi)
index 3d296b1d118f83cf315b574aee1df58de7249c06..9d5fe658d14c42336f8108a7ea65e1d731de3235 100644 (file)
@@ -2283,13 +2283,6 @@ void detect_dp_sink_caps(struct dc_link *link)
         * DP, hw_init may need check signal or power up
         * encoder here.
         */
-
-       if (is_mst_supported(link)) {
-               link->verified_link_cap = link->reported_link_cap;
-       } else {
-               dp_hbr_verify_link_cap(link,
-                       &link->reported_link_cap);
-       }
        /* TODO save sink caps in link->sink */
 }