summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-10-26 14:40:12 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 09:18:18 +0200
commitb994e53c2c6437689873af4ff61803bef78a2330 (patch)
tree37445f4afc573383dc436b81b0345b8a57d7a046 /drivers/gpu/drm/omapdrm
parent46a930418544a5c28abec8dc3e0899d53381814a (diff)
downloadlinux-stable-b994e53c2c6437689873af4ff61803bef78a2330.tar.gz
linux-stable-b994e53c2c6437689873af4ff61803bef78a2330.tar.bz2
linux-stable-b994e53c2c6437689873af4ff61803bef78a2330.zip
drm/omap: fix WBDELAYCOUNT with interlace
Vertical blanking needs to be halved on interlace modes. WBDELAYCOUNT was calculated without such halving, resulting in WBUNCOMPLETE errors. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Benoit Parrot <bparrot@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 7398039954a5..000a3d4a27bf 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -2814,14 +2814,18 @@ int dispc_wb_setup(struct dispc_device *dispc,
/* WBDELAYCOUNT */
REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), 0, 7, 0);
} else {
- int wbdelay;
+ u32 wbdelay;
if (channel_in == DSS_WB_TV_MGR)
- wbdelay = min(vm->vsync_len + vm->vback_porch,
- (u32)255);
+ wbdelay = vm->vsync_len + vm->vback_porch;
else
- wbdelay = min(vm->vfront_porch +
- vm->vsync_len + vm->vback_porch, (u32)255);
+ wbdelay = vm->vfront_porch + vm->vsync_len +
+ vm->vback_porch;
+
+ if (vm->flags & DISPLAY_FLAGS_INTERLACED)
+ wbdelay /= 2;
+
+ wbdelay = min(wbdelay, 255u);
/* WBDELAYCOUNT */
REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);