summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2014-10-07 16:04:42 +0200
committerThierry Reding <treding@nvidia.com>2014-11-13 16:12:44 +0100
commit7e3bc3a98fd1df5839cdc5cbce4dfdb9e4c03655 (patch)
tree5102e5b23e0b99e064e23a2ae1dced15bb6ecb25 /drivers/gpu/drm/tegra
parent030611ecc5d8b1daf8de110600c8771de45d398d (diff)
downloadop-kernel-dev-7e3bc3a98fd1df5839cdc5cbce4dfdb9e4c03655.zip
op-kernel-dev-7e3bc3a98fd1df5839cdc5cbce4dfdb9e4c03655.tar.gz
drm/tegra: dsi: Set up PHY_TIMING & BTA_TIMING registers earlier
Make sure the DSI PHY_TIMING and BTA_TIMING registers are initialized when the clocks are set up as opposed to when the output is enabled. This makes sure that the PHY timings are properly set up when the panel is prepared and that DCS commands sent at that time use the appropriate timings. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r--drivers/gpu/drm/tegra/dsi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 8940360..33f67fd 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -389,6 +389,9 @@ static int tegra_dsi_set_phy_timing(struct tegra_dsi *dsi)
DSI_TIMING_FIELD(timing.tago, period, 1);
tegra_dsi_writel(dsi, value, DSI_BTA_TIMING);
+ if (dsi->slave)
+ return tegra_dsi_set_phy_timing(dsi->slave);
+
return 0;
}
@@ -536,10 +539,6 @@ static int tegra_dsi_configure(struct tegra_dsi *dsi, unsigned int pipe,
value &= ~DSI_CONTROL_HOST_ENABLE;
tegra_dsi_writel(dsi, value, DSI_CONTROL);
- err = tegra_dsi_set_phy_timing(dsi);
- if (err < 0)
- return err;
-
for (i = 0; i < NUM_PKT_SEQ; i++)
tegra_dsi_writel(dsi, pkt_seq[i], DSI_PKT_SEQ_0_LO + i);
@@ -860,6 +859,10 @@ static int tegra_output_dsi_setup_clock(struct tegra_output *output,
*/
tegra_dsi_set_timeout(dsi, bclk, vrefresh);
+ err = tegra_dsi_set_phy_timing(dsi);
+ if (err < 0)
+ return err;
+
return 0;
}
OpenPOWER on IntegriCloud