Skip to content

Commit

Permalink
drm/omap: fix WBDELAYCOUNT with interlace
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Mar 1, 2018
1 parent 46a9304 commit b994e53
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions drivers/gpu/drm/omapdrm/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b994e53

Please sign in to comment.