From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Sasha Levin <sashal@kernel.org>,
dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.9 05/12] drm/bridge: tc358767: fix initial DP0/1_SRCCTRL value
Date: Sat, 9 Feb 2019 13:49:45 -0500 [thread overview]
Message-ID: <20190209184952.127009-5-sashal@kernel.org> (raw)
In-Reply-To: <20190209184952.127009-1-sashal@kernel.org>
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
[ Upstream commit 9a63bd6fe1b5590ffa42ae2ed22ee21363293e31 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/bridge/tc358767.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 8098297c5fe5..dbe403ea130d 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -834,12 +834,11 @@ static int tc_main_link_setup(struct tc_data *tc)
if (!tc->mode)
return -EINVAL;
- /* from excel file - DP0_SrcCtrl */
- tc_write(DP0_SRCCTRL, DP0_SRCCTRL_SCRMBLDIS | DP0_SRCCTRL_EN810B |
- DP0_SRCCTRL_LANESKEW | DP0_SRCCTRL_LANES_2 |
- DP0_SRCCTRL_BW27 | DP0_SRCCTRL_AUTOCORRECT);
- /* from excel file - DP1_SrcCtrl */
- tc_write(DP1_SRCCTRL, 0x00003083);
+ tc_write(DP0_SRCCTRL, tc_srcctrl(tc));
+ /* SSCG and BW27 on DP1 must be set to the same as on DP0 */
+ tc_write(DP1_SRCCTRL,
+ (tc->link.spread ? DP0_SRCCTRL_SSCG : 0) |
+ ((tc->link.base.rate != 162000) ? DP0_SRCCTRL_BW27 : 0));
rate = clk_get_rate(tc->refclk);
switch (rate) {
--
2.19.1
next prev parent reply other threads:[~2019-02-09 18:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 18:49 [PATCH AUTOSEL 4.9 01/12] ACPI: NUMA: Use correct type for printing addresses on i386-PAE Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 02/12] cpufreq: check if policy is inactive early in __cpufreq_get() Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 03/12] drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 04/12] drm/bridge: tc358767: fix single lane configuration Sasha Levin
2019-02-09 18:49 ` Sasha Levin [this message]
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 06/12] drm/bridge: tc358767: reject modes which require too much BW Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 07/12] drm/bridge: tc358767: fix output H/V syncs Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 08/12] ARM: dts: da850-evm: Correct the sound card name Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 09/12] ARM: dts: da850-lcdk: " Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 10/12] ARM: dts: kirkwood: Fix polarity of GPIO fan lines Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 11/12] gpio: pl061: handle failed allocations Sasha Levin
2019-02-09 18:49 ` [PATCH AUTOSEL 4.9 12/12] cifs: Limit memory used by lock request calls to a page Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190209184952.127009-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox