summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2016-12-09 10:49:18 +0100
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:54:33 +0900
commit362ffb29c0a132075d96f76714b4be884c8110ba (patch)
tree1be25875985cb3761e851e72861563be9522abb5
parentef1faaaa5bb809f158ba66e1e15a5661922808a5 (diff)
drm/exynos/decon5433: fix porch calculation in interlaced mode
Interlaced mode requires different porch calculation in DECON. Change-Id: I1bfc2554cd3204ebb270ab2e4a396d0f69f5a7f4 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos5433_drm_decon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index b0f696f12f8b..c8593bbd0e3a 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -221,10 +221,12 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
writel(val, ctx->addr + DECON_VIDTCON2);
if (!ctx->i80_if) {
- val = VIDTCON00_VBPD_F(
- mode->crtc_vtotal - mode->crtc_vsync_end - 1) |
- VIDTCON00_VFPD_F(
- mode->crtc_vsync_start - mode->crtc_vdisplay - 1);
+ int vbp = mode->crtc_vtotal - mode->crtc_vsync_end;
+ int vfp = mode->crtc_vsync_start - mode->crtc_vdisplay;
+
+ if (interlaced)
+ vbp = vbp / 2 - 1;
+ val = VIDTCON00_VBPD_F(vbp - 1) | VIDTCON00_VFPD_F(vfp - 1);
writel(val, ctx->addr + DECON_VIDTCON00);
val = VIDTCON01_VSPW_F(