Commit b994e53c authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarBenoit Parrot <bparrot@ti.com>
parent 46a93041
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment