diff options
author | Thierry Reding <treding@nvidia.com> | 2015-04-08 10:58:07 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-08-13 07:47:44 -0400 |
commit | b8be0bdbd52d35aac30fb2d8c295f9a3000873f2 (patch) | |
tree | 7d3444fde4229fb16f18ae0fc94cc8daa485d98a /drivers/gpu/drm/tegra/dsi.c | |
parent | 472a6d1fd5f5d37a1c081e69f5c8ad5307ac358f (diff) |
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.c | 9 |
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, | |||
548 | 548 | ||
549 | /* horizontal sync width */ | 549 | /* horizontal sync width */ |
550 | hsw = (mode->hsync_end - mode->hsync_start) * mul / div; | 550 | hsw = (mode->hsync_end - mode->hsync_start) * mul / div; |
551 | hsw -= 10; | ||
552 | 551 | ||
553 | /* horizontal back porch */ | 552 | /* horizontal back porch */ |
554 | hbp = (mode->htotal - mode->hsync_end) * mul / div; | 553 | hbp = (mode->htotal - mode->hsync_end) * mul / div; |
555 | hbp -= 14; | 554 | |
555 | if ((dsi->flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0) | ||
556 | hbp += hsw; | ||
556 | 557 | ||
557 | /* horizontal front porch */ | 558 | /* horizontal front porch */ |
558 | hfp = (mode->hsync_start - mode->hdisplay) * mul / div; | 559 | hfp = (mode->hsync_start - mode->hdisplay) * mul / div; |
560 | |||
561 | /* subtract packet overhead */ | ||
562 | hsw -= 10; | ||
563 | hbp -= 14; | ||
559 | hfp -= 8; | 564 | hfp -= 8; |
560 | 565 | ||
561 | tegra_dsi_writel(dsi, hsw << 16 | 0, DSI_PKT_LEN_0_1); | 566 | tegra_dsi_writel(dsi, hsw << 16 | 0, DSI_PKT_LEN_0_1); |