aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/dsi.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-04-08 16:58:07 +0200
committerThierry Reding <treding@nvidia.com>2015-08-13 13:47:44 +0200
commitb8be0bdbd52d35aac30fb2d8c295f9a3000873f2 (patch)
tree7d3444fde4229fb16f18ae0fc94cc8daa485d98a /drivers/gpu/drm/tegra/dsi.c
parentdrm/tegra: dc: Rename BASE_COLOR_SIZE* fields (diff)
downloadlinux-dev-b8be0bdbd52d35aac30fb2d8c295f9a3000873f2.tar.xz
linux-dev-b8be0bdbd52d35aac30fb2d8c295f9a3000873f2.zip
drm/tegra: dsi: Use proper back-porch for non-sync video mode
In video modes without sync pulses, the horizontal back-porch needs to include the horizontal sync width. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dsi.c')
-rw-r--r--drivers/gpu/drm/tegra/dsi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index ed970f622903..5c489c257555 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -548,14 +548,19 @@ static void tegra_dsi_configure(struct tegra_dsi *dsi, unsigned int pipe,
/* horizontal sync width */
hsw = (mode->hsync_end - mode->hsync_start) * mul / div;
- hsw -= 10;
/* horizontal back porch */
hbp = (mode->htotal - mode->hsync_end) * mul / div;
- hbp -= 14;
+
+ if ((dsi->flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0)
+ hbp += hsw;
/* horizontal front porch */
hfp = (mode->hsync_start - mode->hdisplay) * mul / div;
+
+ /* subtract packet overhead */
+ hsw -= 10;
+ hbp -= 14;
hfp -= 8;
tegra_dsi_writel(dsi, hsw << 16 | 0, DSI_PKT_LEN_0_1);