drm/amd/display: move MST branch initialize to before link training
authorHersen Wu <hersenxs.wu@amd.com>
Fri, 9 Feb 2018 21:35:14 +0000 (16:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:32:20 +0000 (15:32 -0500)
some MST capable scaler doesn't like recieving CLEAR_PAYLOAD_ID_TABLE after
link training.  move branch initialize to before link training

Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Tony Cheng <tony.cheng@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/amdgpu_dm/amdgpu_dm_helpers.c
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/dm_helpers.h

index 9bd142f65f9baa9b9881dcde18c6ec9d8e527416..3e157e65d7cd571d0704579628a4299bfddd4890 100644 (file)
@@ -258,6 +258,15 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
        return true;
 }
 
+
+/*
+ * Clear payload allocation table before enable MST DP link.
+ */
+void dm_helpers_dp_mst_clear_payload_allocation_table(
+       struct dc_context *ctx,
+       const struct dc_link *link)
+{}
+
 /*
  * Polls for ACT (allocation change trigger) handled and sends
  * ALLOCATE_PAYLOAD message.
index 95955ade4012313d64222b1cdc755f54b06dcf10..f40c9c7aa7335d02dc67510130e9542b81314f45 100644 (file)
@@ -1311,6 +1311,9 @@ static enum dc_status enable_link_dp_mst(
        if (link->cur_link_settings.lane_count != LANE_COUNT_UNKNOWN)
                return DC_OK;
 
+       /* clear payload table */
+       dm_helpers_dp_mst_clear_payload_allocation_table(link->ctx, link);
+
        /* set the sink to MST mode before enabling the link */
        dp_enable_mst_on_sink(link, true);
 
index ab88f07772a39cb013d48bf5ce8e1b685468bb65..53d5566f89b89a0b40eac9b6a02b522b2d3c0da5 100644 (file)
@@ -49,6 +49,13 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
                struct dp_mst_stream_allocation_table *proposed_table,
                bool enable);
 
+/*
+ * Clear payload allocation table before enable MST DP link.
+ */
+void dm_helpers_dp_mst_clear_payload_allocation_table(
+       struct dc_context *ctx,
+       const struct dc_link *link);
+
 /*
  * Polls for ACT (allocation change trigger) handled and
  */