diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-01-03 06:59:51 -0500 |
---|---|---|
committer | Andrzej Hajda <a.hajda@samsung.com> | 2019-01-09 04:49:30 -0500 |
commit | 9a63bd6fe1b5590ffa42ae2ed22ee21363293e31 (patch) | |
tree | 9a9b97eac63ceefee4ca33ea98a941016a8d20fa /drivers/gpu | |
parent | 4d9d54a730434cc068dd3515ba6116697196f77b (diff) |
drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value
Initially DP0_SRCCTRL is set to a static value which includes
DP0_SRCCTRL_LANES_2 and DP0_SRCCTRL_BW27, even when only 1 lane of
1.62Gbps speed is used. DP1_SRCCTRL is configured to a magic number.
This patch changes the configuration as follows:
Configure DP0_SRCCTRL by using tc_srcctrl() which provides the correct
value.
DP1_SRCCTRL needs two bits to be set to the same value as DP0_SRCCTRL:
SSCG and BW27. All other bits can be zero.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-5-tomi.valkeinen@ti.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/bridge/tc358767.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index fee53422c31f..ab299f4debfa 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c | |||
@@ -836,12 +836,11 @@ static int tc_main_link_setup(struct tc_data *tc) | |||
836 | if (!tc->mode) | 836 | if (!tc->mode) |
837 | return -EINVAL; | 837 | return -EINVAL; |
838 | 838 | ||
839 | /* from excel file - DP0_SrcCtrl */ | 839 | tc_write(DP0_SRCCTRL, tc_srcctrl(tc)); |
840 | tc_write(DP0_SRCCTRL, DP0_SRCCTRL_SCRMBLDIS | DP0_SRCCTRL_EN810B | | 840 | /* SSCG and BW27 on DP1 must be set to the same as on DP0 */ |
841 | DP0_SRCCTRL_LANESKEW | DP0_SRCCTRL_LANES_2 | | 841 | tc_write(DP1_SRCCTRL, |
842 | DP0_SRCCTRL_BW27 | DP0_SRCCTRL_AUTOCORRECT); | 842 | (tc->link.spread ? DP0_SRCCTRL_SSCG : 0) | |
843 | /* from excel file - DP1_SrcCtrl */ | 843 | ((tc->link.base.rate != 162000) ? DP0_SRCCTRL_BW27 : 0)); |
844 | tc_write(DP1_SRCCTRL, 0x00003083); | ||
845 | 844 | ||
846 | rate = clk_get_rate(tc->refclk); | 845 | rate = clk_get_rate(tc->refclk); |
847 | switch (rate) { | 846 | switch (rate) { |