Commit 5761a259 authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Andrzej Hajda

drm/bridge: tc358767: move video stream setup to tc_main_link_stream

The driver currently sets the video stream registers in
tc_main_link_setup. One should be able to establish the DP link without
any video stream, so a more logical place is to configure the stream in
the tc_main_link_stream. So move them there.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-8-tomi.valkeinen@ti.com
parent ca342386
...@@ -1004,15 +1004,6 @@ static int tc_main_link_setup(struct tc_data *tc) ...@@ -1004,15 +1004,6 @@ static int tc_main_link_setup(struct tc_data *tc)
return -EAGAIN; return -EAGAIN;
} }
ret = tc_set_video_mode(tc, tc->mode);
if (ret)
goto err;
/* Set M/N */
ret = tc_stream_clock_calc(tc);
if (ret)
goto err;
return 0; return 0;
err_dpcd_read: err_dpcd_read:
dev_err(tc->dev, "Failed to read DPCD: %d\n", ret); dev_err(tc->dev, "Failed to read DPCD: %d\n", ret);
...@@ -1031,6 +1022,15 @@ static int tc_main_link_stream(struct tc_data *tc, int state) ...@@ -1031,6 +1022,15 @@ static int tc_main_link_stream(struct tc_data *tc, int state)
dev_dbg(tc->dev, "stream: %d\n", state); dev_dbg(tc->dev, "stream: %d\n", state);
if (state) { if (state) {
ret = tc_set_video_mode(tc, tc->mode);
if (ret)
goto err;
/* Set M/N */
ret = tc_stream_clock_calc(tc);
if (ret)
goto err;
value = VID_MN_GEN | DP_EN; value = VID_MN_GEN | DP_EN;
if (tc->link.base.capabilities & DP_LINK_CAP_ENHANCED_FRAMING) if (tc->link.base.capabilities & DP_LINK_CAP_ENHANCED_FRAMING)
value |= EF_EN; value |= EF_EN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment