drm/dp/mst: Reverse order of MST enable and clearing VC payload table.
authorAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Fri, 22 Jan 2016 22:07:29 +0000 (17:07 -0500)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Feb 2016 05:23:49 +0000 (15:23 +1000)
On DELL U3014 if you clear the table before enabling MST it sometimes
hangs the receiver.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_dp_mst_topology.c

index 2c12a20ff08e7d1981c71690dedb6fad90f6cf67..7e5d98c7b908a2054c959476a1a67655974a425a 100644 (file)
@@ -1998,6 +1998,12 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
                mgr->mst_primary = mstb;
                kref_get(&mgr->mst_primary->kref);
 
+               ret = drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL,
+                                                        DP_MST_EN | DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC);
+               if (ret < 0) {
+                       goto out_unlock;
+               }
+
                {
                        struct drm_dp_payload reset_pay;
                        reset_pay.start_slot = 0;
@@ -2005,12 +2011,6 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
                        drm_dp_dpcd_write_payload(mgr, 0, &reset_pay);
                }
 
-               ret = drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL,
-                                        DP_MST_EN | DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC);
-               if (ret < 0) {
-                       goto out_unlock;
-               }
-
                queue_work(system_long_wq, &mgr->work);
 
                ret = 0;